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

Getting a "hard" path?

I'm writing a little app in which people open up text files that get massaged
and then used to update other files.

They us Common File Dialog to navigate to the input files.

I'd like to record which files were chosen, but at the
\\ServerName\ShareName\DirectoryName level.

Seems like the Common File Dialog will always(?) return a path that starts with
a drive letter instead of the full ServerName/ShareName/DirectoryName info.

Anybody know how to resolve a drive letter to ServerName/ShareName? Seems like
something that there's probably an API call for...
--
PeteCresswell
Apr 13 '06 #1
3 2137
On Wed, 12 Apr 2006 21:15:16 -0400, "(PeteCresswell)" <x@y.Invalid>
wrote:

That's not my experience. Of course if someone selects a file on the
say M-drive, that will be returned, but if they select a file using
UNC, then that is what will be returned.

What you wrote is not even possible. Think about it. What if our
network has more than 26 shares. Surely not each one of them can be
represented by a drive letter A-Z.

-Tom.
I'm writing a little app in which people open up text files that get massaged
and then used to update other files.

They us Common File Dialog to navigate to the input files.

I'd like to record which files were chosen, but at the
\\ServerName\ShareName\DirectoryName level.

Seems like the Common File Dialog will always(?) return a path that starts with
a drive letter instead of the full ServerName/ShareName/DirectoryName info.

Anybody know how to resolve a drive letter to ServerName/ShareName? Seems like
something that there's probably an API call for...


Apr 13 '06 #2
Per Tom van Stiphout:
What you wrote is not even possible. Think about it. What if our
network has more than 26 shares. Surely not each one of them can be
represented by a drive letter A-Z.


I think it came out backwards.

The situation is that the user may choose something on drive "M".
Storing drive "M" doesn't do anything for me because anybody could have "M"
pointing to anywhere. Instead I want to store the ServerName/ShareName that the
user currently has their "M" drive pointing to.

Or is there some option in the Common File dialog that makes it return the UNC?
--
PeteCresswell
Apr 13 '06 #3
Hi, Pete.
Anybody know how to resolve a drive letter to ServerName/ShareName?
Seems like
something that there's probably an API call for...
Correct. You'll find the code for the API functions and the fGetUNCPath( )
function on the following Web page:

http://www.mvps.org/access/api/api0003.htm

You'll just need to parse out the drive letter returned from the Common File
Dialog, pass it to fGetUNCPath( ), and it will return the UNC.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
"(PeteCresswell)" <x@y.Invalid> wrote in message
news:3b********************************@4ax.com... I'm writing a little app in which people open up text files that get
massaged
and then used to update other files.

They us Common File Dialog to navigate to the input files.

I'd like to record which files were chosen, but at the
\\ServerName\ShareName\DirectoryName level.

Seems like the Common File Dialog will always(?) return a path that starts
with
a drive letter instead of the full ServerName/ShareName/DirectoryName
info.

Anybody know how to resolve a drive letter to ServerName/ShareName?
Seems like
something that there's probably an API call for...
--
PeteCresswell

Apr 13 '06 #4

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

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
0
by: anders thoresson | last post by:
Is it possible to resort the rows in a table like in a query where using ORDER BY, but have to new sort order stored in the table structure? -- anders thoresson -- MySQL General Mailing List...
4
by: Larry R Harrison Jr | last post by:
I have them working now, courtesy of the link given in the prior thread--the HVMenu over at Dynamic Drive myself. http://www.dynamicdrive.com I have them working as side-bar menus, not...
4
by: Jimmy Clay (www.songofthecoyote.com) | last post by:
On my website I have Guestmap that is written in PHP. I did not write it but got it from a freeware site. Anyway it works well, except I've discovered that if someone writes a message and uses the...
19
by: Christian Fowler | last post by:
I have a VERY LARGE pile of geographic data that I am importing into a database (db of choice is postgres, though may hop to oracle if necessary). The data is strictly hierarchical - each node has...
9
by: Patrick | last post by:
I have an ASP.NET page that searches for someone in the corporate Active Directory. It had been working fine until recently when I changed from Basic Authentication on IIS6 back to Integrated...
1
by: uli2003wien | last post by:
Dear group, i am a seasoned DB2-veteran (6 years exp.) on the Windows- and Linux-Server platform. Once in a while i had a look into DB2 on the mainframe but mostly only watching other people do...
4
by: Gérard Talbot | last post by:
Hello fellow stylers, What would be the best CSS equivalent of MSIE's wrap="off" and wrap="hard"? hard Text is displayed with wordwrapping and submitted with soft returns and line feeds. ...
169
by: JohnQ | last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post). It would be more than a little bit nice if C++ was much "cleaner" (less complex) so that it wasn't a major world wide...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.