>Does anyone know how to take something like c:\mydir\junk.txt and turn it into \\computerName\computerDrive\mydir\junk.txt
>
>I want to use the file selection dialog and return the UNC path instead of the path with a drive letter.
>
>I want to set up an application using UNC names instead of drive letters so users can access their files from any workstation on a network.
>
There's a Win32 API that converts a mapped drive letter into the corresponding UNC - the FAQ contains a small code example showing how it works.
If the drive is not mapped, but is a local resource, it's a considerably more difficult problem, since there's no assurance (1) that the drive is accesible by anyone on another machine, or if it is shared, (2) what share to use as a base reference if more than one UNC can resolve the path.
>thanks,
>
>scott