Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UNC Names
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00297612
Message ID:
00297651
Vues:
23
>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform