Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How determine strartup folder inside app started from VF
Message
From
30/09/1998 06:56:59
 
 
To
30/09/1998 06:38:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142271
Message ID:
00142284
Views:
36
>>
>>Better to use FULLPATH(CURDIR()); SYS(5) doesn't work with UNCs.
>>
>>>
>Well, well. There's a function I never used, although I am fully aware of its existance. I'm sure you're right about that Ed. :)

It's actually an interesting problem, and is mostly an issue with Novell servers. If I'm using an MS Network client, and I say:

CD \\NTSERVER4\D_Share\WorkDir

SYS(5) returns "\\NTSERVER\D_Share", the UNC in \\MachineName\PathName format, and CURDIR() returns "\WorkDir\". IOW, it works OK via the Client for Microsoft Networks on a consistent basis. However, NetWare with certain clients creates problems, because it allows you to map anywhere in the netowrk path as a root drive, so:

CD \\NOVSERV1\VOL1\WorkDir

isn't sure if it should resolve the resulting path from the UNC as a drive "\\NOVSERV1\VOL1" with a CURDIR() of "\WorkDir\", or a drive of "\\NOVSERV1\VOL1\WorkDir", with a CURDIR() of "\". With some NetWare clients and some versions of VFP, the result is a SYS(5) return of "\:", completely unhelpful. Using the alternative FULLPATH(CURDIR()) really doesn't care how CURDIR() is resolved, FULLPATH() will take a relative path and resolve it to a fully qualified path unambiguously.
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