Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any API call to get the Base path from a UNC path?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00180686
Message ID:
00180954
Views:
14
>Hi Ed and George!
>
>Here is the reason for my request.
>
>When using NetFileEnum, you need to provide a server as well as, a base path.
>
>In my example, if I want to find out who has \\continuum\putz\recon\recon_check.dbf opened, I would have to call NetFileENum passing "\\continuum" as my server, and "d:\putz\recon\recon_check.dbf" as the base path (this is the physical base path on that server, NOT a mapping).
>
>My issue is that, if I need to know who is using \\continuum\putz\recon\recon_check.dbf, I have no way of knowing what the actual path is on the workstation/server. Therefore, I need to have \\continuum\putz\recon\recon_check.dbf be evaluated as d:\putz\recon\recon_check.dbf".
>
>Ed, I tried implementing your sample source, however, I can not instansiate Wscript.Network. What am I missing? Currently using WIN/NT 4.0 w/SP3.

You need the Windows Scripting Host, which can be installed from Option Pack 4.0, or downloaded from Microsoft's Web page.
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