Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UNC path
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00537252
Message ID:
00537280
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform