Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning UNC path with GetFile()
Message
De
30/08/2000 16:57:06
 
 
À
30/08/2000 16:22:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00411000
Message ID:
00411026
Vues:
17
>Hi,
>
>I'm wondering if there is a way of returning, say,
>
>myserver//mydirectory/myfile.txt
>
>instead of :
>
>L:\mydirectory\myfile.txt
>
>My thinking is that there is way to do this, although perhaps not with getfile().
>

Take the drive letter and use either the Scripting.FileSystemObject automation object (part of the WSH) or a call to WNetGetConnection() in the Win32 API to retrieve the UNC of a mapped drive. The WSH docs detail how the FSO works, and there are samples both in the FAQ and the Windows API areas of UT that show how to call WNetGetConnection().

An alternative is to use Bela Bodecs' control in the Files section which provides a much-enhanced GetFile() capability.
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