>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.