473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Determining which folder is a shared folder


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
2 1858
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hubert Wong | last post by:
Hi, I am writing some C# code that moves files from a source folder to a target folder on the same machine. However, if the target folder is a shared folder, using the File.MoveTo method alone...
1
by: Jon | last post by:
I have one class file which I would like to share across several asp.net apps in VS 2005. I would like changes I make to that shared file to reflect in all the apps. By default when I add the...
2
by: John | last post by:
Hi, What is best folder to put database (location of database)? This is because when administrator restricts user rights to read (read and execute), and doesn't give permissions to write in C:...
6
by: jzdeng | last post by:
Hi, All I use VS 2005 to create a web service. The web service is used to create a sheared folder. It works fine we I run it from VS 2005. But, when I move it to inetpub, it does not work...
17
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 -...
7
by: Zeb | last post by:
Hi all I've developed a shopping cart in C# and to allow moderators to upload product images, news images and downloadable PDFs, the app creates a folder for each product. I start out with the...
0
by: Tulgaa | last post by:
When i manually create a shared folder, the shared folder was non password protection. but when i create a shared folder from a program, the shared folder is become password protected. I use...
3
by: Gordon | last post by:
I am currently working on some code for my CMS that creates a site folder, then creates all the necessary child folders inside it. The method that creates folders needs to insert into 2 tables so...
5
by: Web Search Store | last post by:
Hello, I made a web page using visual studio. I also made a public class in the app_code folder called 'allvars' In the main web page durning the page startup, I can refer to public shared...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.