conerting UNC network path to mapped drive path?
say i have a unc path like \\computer\share\folder
How could i convert that UNC path to reflect the mapped drive path instead?
for example if \\computer\share is mapped to drive D then the path for that folder would be D:\folder
hope it's clear :sick:
1 Attachment(s)
Re: conerting UNC network path to mapped drive path?
Re: conerting UNC network path to mapped drive path?
You can also use WMI and list the drive letters using the Win32_LogicalDisk WMI class. Then its a matter of checking the DriveType property in order to find the ones that are "Network Drives"...
Look at my post (#9) in this thread if you wish to see an example of this...
http://www.vbforums.com/showthread.php?t=387657
Re: conerting UNC network path to mapped drive path?
thanks guys
SEEMS to be the way to do it :D
only if i could do this in MFC hehe
Re: conerting UNC network path to mapped drive path?
hey kleinma, just a note that you need to convert both paths to lowercase (to ignore case when comparing) and also to make sure both do or don't end with a "\". Otherwise a valid match could be accidentally thrown out :) thanks for the code