
Getting share name for a local resource
Hi,
I need some help, please.
Could anybody tell me how to:
- check if a local resource is shared
- if it is, get it's share name?
For example, if there is a file in my C:\MyDocuments\Public folder named
AnyFile.txt, and my C: is shared as MyC, I need something like:
'\\deanv\MyC\MyDocuments\Public\AnyFile.txt'.
Or, if C: is not shared, but the Public subfolder in MyDocuments is shared
as MyPublicShare, I should get something like this:
'\\deanv\MyPublicShare\AnyFile.txt'.
('deanv' is a machine name).
First, of course, I need to know if the resorce is shared at all.
Thanks for any help.
Dean