Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flexibility in seth path to
Message
From
06/02/2000 17:41:33
 
 
To
06/02/2000 17:17:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00328102
Message ID:
00328104
Views:
23
>How can i make a set path to flexible like if when a default directory
>is changed.
>
SET PATH can be altered programmatically at runtime to reflect the current environment. You can use relative paths - paths that are in part based on the current working directory - so that if the directory hierarchy remains the same, but the base path changes, the relative paths ad just to the new base directory.

IOW, if I have a directory called c:\APP, with two subdirectories c:\APP\DATA and C:\APP\MISC, and I were currently positioned in C:\APP, the following SET PATH wouldsearchthese three directories:

SET PATH TO ., DATA, MISC

If I had another directory D:\Foo, with subdirectories D:\Foo\DATA and D:\Foo\MISC, I'd be able to search them by simply changing my current directory:

CD D:\Foo

The SET PATH, based on the relative paths, would adjust accordingly. Absolute paths would not be changed.

SET PATH is only used to resolve things whose absolutey path is not specified.

It is important torealize that the VFP PATH is not the same as the Windows\DOS path, so that Windows components and executables us e a different set of paths to resolve their locations.
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