473,383 Members | 1,716 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,383 software developers and data experts.

Deriving UNC Path from local drive

I want to be able to convert:

C:\Program Files\MyApplication

into

\\MyServer\TheShareNameForCDrive\Program Files\MyApplication

Does anyone know how to do this?

- Jerry
Nov 21 '05 #1
2 4576
"Jerry Spence1" <je**********@somewhere.com> schrieb:
I want to be able to convert:

C:\Program Files\MyApplication

into

\\MyServer\TheShareNameForCDrive\Program Files\MyApplication

Does anyone know how to do this?


Notice that there is not necessarily a one-to-one mapping between local
paths and UNC paths, because there can be multiple shares. You can use
p/invoke on 'WNetEnumResource' to get a list of shares on the server.

<URL:http://groups.google.de/groups?threadm=u7G9U0KzCHA.1768%40TK2MSFTNGP12>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Very Many thanks Herfried

- Jerry

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Jerry Spence1" <je**********@somewhere.com> schrieb:
I want to be able to convert:

C:\Program Files\MyApplication

into

\\MyServer\TheShareNameForCDrive\Program Files\MyApplication

Does anyone know how to do this?


Notice that there is not necessarily a one-to-one mapping between local
paths and UNC paths, because there can be multiple shares. You can use
p/invoke on 'WNetEnumResource' to get a list of shares on the server.

<URL:http://groups.google.de/groups?threadm=u7G9U0KzCHA.1768%40TK2MSFTNGP12>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Rodger | last post by:
Hi all, I am getting the following error. ***************************** Microsoft JET Database Engine error '80004005' 'O:\DATA\DSR\DSR_DATA.MDB' is not a valid path. Make sure that the...
4
by: Ian | last post by:
I would like to set a path to a schema where both the xml file and the schema are on my local hard drive (e.g. c:\XML\auto.xml and c:\XML\auto.xsd) Thank you, Ian
7
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) ...
15
by: (Pete Cresswell) | last post by:
I've got a .BAT file that I use for executing various MS Access apps that I wrote way back in the days of 2.0. It's evolved over time, but it still contains a number of possible paths to...
3
by: Jon | last post by:
I'm calling Server.MapPath from global.asa through this line of code: Application("reports_dir") = Server.MapPath("Reports") The web application opens on a testing web server (not mine) at this...
1
by: Arthur | last post by:
Hi All, I know there have been previous posts with this topic but the issue for most seems to be the security permissions on the shared drive. My scenario is as follows : I have IIS on local...
4
by: rony_16 | last post by:
Hi , I am writing a program that part of than program if to add a new network drive to the user. The adding part i know how to do (by win api "WNetAddConnection2A") but i want to check first if...
0
by: M Cavanagh | last post by:
I am fairly new using functions to return file info and I made an assumption that a function working on a local machine would work fine on a server. I have searched several Access books to find a...
3
by: wreed | last post by:
Is there a way on a button press to create a browse for a file box and then when they pick a file on a share drive to convert it to a UNC path and that way I would save the unc path into a table...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.