Tim,
The UNC is made up of the format \\server\sharename
(Sorry Chris, it has nothing to do with the time)
Although there must be a way to get access to the collection of system
shares (I don't know the method name), I can't imagine how you will know for
sure that a particular share is pointing absolutely to the file or folder
you want. You would not be able to simply test each share for the word
"System" and know for certain that you are in the Windows system directory
(for instance). Remember that at install time you can name folders anything
you want to name them. Shares and UNC(s) are designed specifically to allow
a program to redirect its connections to various files on various servers or
machines. I think that a share name or UNC needs to be specifically
specified and verified by a human before use.
Regards
"Tim Marsden" <TM@UK.COM> wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
Hi
How do I determine the UNC path of a file in VB.NET.
for example if I am given "D:\folder\file.txt", I want to obtain
"\\Computer\Drive\Folder\file.txt"
Tim