>>>>One of the solutions could be like this:
>>>>oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>>>
>>>>lo= oFSO.GetFile(getfile())
>>>>?lo.Drive.ShareName
>>>
>>>Yuri, first thank you for your help.
>>>
>>>Can you think why when I run your simple code (above), I get empty value of .ShareName? Could it be because I choose a file from my local drive?
>>
>>I do not get it: if you choose the file from the local drive, then what UNC you expect?
>
>You can always convert c:\sub\dire\cto\ry into \\127.0.0.1\c$\sub\dire\cto\ry (if the local IP is known, it can be used instead), but that's cheating, and I don't see any purpose to it.
Very interesting. So, if we access a table using local IP and found it slow, we may get its actual path instead using a reverse code of Yuri's?
If it's not broken, fix it until it is.
My Blog