Full path name of shared folder

delphi package - easy access to security apis
Post Reply
venkat_kgs
Posts: 3
Joined: Wed Nov 25, 2009 7:59 am
Location: India

Full path name of shared folder

Post by venkat_kgs »

Hi,

Few folders are shared in my pc. I wanted to get the full name (like UNC path) of the shared folders.

I tried to use IShares & IShare. Though i could get only the path and net name, i couldn't get the full name.

For eg.

Computer name = VS1
Shared folder = 'E:\VSInst'
Share Name = VSInst

Shr1 := Shares([stdisk],'*','');
Shr1[0].NetName //giving only VSInst
Shr1[0].path //giving E:\VSinst

I wanted something like \\VS1\VSInst directly from IShare object.

i.e in format
\\<<ServerName>>\<ShareName>>

Is it possble ? or shld i manually concatenate Computername and sharename ?

Tks in Adv
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Sorry for the late reply.

So you want the UNC path from a share on your own PC? In this case simply use GetComputerName and append the share name.
Post Reply