I am looking for a method for obtaining the 'real' UNC path from a mapped network drive - a common question here but not using the language or method that I desire.
I would like users to be able to select a file using an HTML form but not upload it (the files are enormous). All I want to obtain is the full UNC path to the file. The trouble is that users will typically select files out of their mapped network drive (e.g. g:\file.txt) which is of no use to me - I must have the full \\server\user\file.txt
path.
I know that in Windows you can use net use
at the command line for information about mapped drives, and you can also obtain the information from the HKEY_CURRENT_USER\Network\driveletter
, but I need a method to obtain this from an HTML form.
My initial thought was some form of Javascript, but I doubt the registry key will be accessible in this way.