Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning UNC path with GetFile()
Message
From
30/08/2000 16:57:06
 
 
To
30/08/2000 16:22:57
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00411000
Message ID:
00411026
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform