By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

Determining which folder is a shared folder

P: n/a

As the subject suggests,

If I have a file path;

C:\My documents\UMS\Cat1\File.txt

and UMS is a shared folder shared as 'UMSPictures', is there any way I
can test if each folder in the string is shared and if so return what
the share name is?

I want something like:

Function GetShareName("C:\My documents\UMS\Cat1\File.txt")

that returns "UMSPictures".

Lets see how good/god-like we are. :)
Cheers,
Mr. Smith.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mr. Smith" <Mr.Smith@Large> wrote in message news:<40***********************@news.syd.swiftdsl. com.au>...
As the subject suggests,

If I have a file path;

C:\My documents\UMS\Cat1\File.txt

and UMS is a shared folder shared as 'UMSPictures', is there any way I
can test if each folder in the string is shared and if so return what
the share name is?

I want something like:

Function GetShareName("C:\My documents\UMS\Cat1\File.txt")

that returns "UMSPictures".

Lets see how good/god-like we are. :)
Cheers,
Mr. Smith.


I'll try for a lucky shot from ignorance. See if the API function
WNetGetUniversalName works.

James A. Fortune
Nov 13 '05 #2

P: n/a
James Fortune wrote:
"Mr. Smith" <Mr.Smith@Large> wrote in message news:<40***********************@news.syd.swiftdsl. com.au>...
As the subject suggests,

If I have a file path;

C:\My documents\UMS\Cat1\File.txt

and UMS is a shared folder shared as 'UMSPictures', is there any way I
can test if each folder in the string is shared and if so return what
the share name is?

I want something like:

Function GetShareName("C:\My documents\UMS\Cat1\File.txt")

that returns "UMSPictures".

Lets see how good/god-like we are. :)
Cheers,
Mr. Smith.

I'll try for a lucky shot from ignorance. See if the API function
WNetGetUniversalName works.

James A. Fortune

Thanks for that, I shalll follow it up.

Cheers
Mr. Smith
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.