Convert drive letter to actual network path

The story goes as follows:

I want to take note of the location of some files stored on a mapped drive, however, instead of taking the drive letter I would like to know the actual path to which the drive letter points to.

If anyone can help with this it would be much appreciated

Thanks

K

[318 byte] By [keisslada] at [2007-10-3 11:14:57]
# 1
I dont really understand the question!Do you have a drive as a shared resource like C$ and do you want to use a network path instead of the drive letter?
MelGohana at 2007-7-15 13:38:58 > top of Java-index,Core,Core APIs...
# 2
I dont really understand the question!Do you have a drive as a shared resource like C$ and do you want to use a network path instead of the drive letter?
MelGohana at 2007-7-15 13:38:58 > top of Java-index,Core,Core APIs...
# 3
HeyI have a network share - something like \\server\mainbut I mapped a drive to this location, so X: now points to \\server\mainWhat I want to do is translate the mapped drive letter (X:) into the actual location (\\server\main)Thanks for the reply
keisslada at 2007-7-15 13:38:58 > top of Java-index,Core,Core APIs...
# 4

I'd bet that's impossible in Java, because it is too platform specific. I can imagine an easy workaround by issuing an exec of "net use", then parsing it to find out, and create a Map of all the pairs ("X:", "\\server\location") you found. Later, you would use that map for resolving path names. Somewhat ugly but it may work in your environment.

oscar2004a at 2007-7-15 13:38:58 > top of Java-index,Core,Core APIs...
# 5
I guess you cant, I just cant imagine a way to do java recognize it, maybe if you find a DOS command to do that you can use it in java too via Runtime.getRuntime ().exec ("Defined command");But I am not sure if this is possible.
MelGohana at 2007-7-15 13:38:58 > top of Java-index,Core,Core APIs...