Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UNC path
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00537252
Message ID:
00537280
Vues:
11
>I'm sitting here in front of a VFP training class telling them just how smart everyone out here is sooooooooo....
>
>How do you get a UNC path (\\ServerName\directory\file) from a absolute path like you get back from GetFile()?
>
>Come on now...don't make me look bad here...I'm counting on all you!

There are several ways to do this:

(1) Use the Wscript.Network object of the WSH to translate the drive letter from the path you received from GetFile()

(2) Use the Scripting.FileSystem object from the WSH to do the same thing by examining it's Drives collection

(3) Use the Windows API WNetGetConnection() call to translate the UNC into a path.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform