Changes the default Visual FoxPro directory to the directory you specify.
Parameters
-
cPath
-
Specifies one of the following:
-
A drive designator
-
A drive designator with a directory
-
A child directory
-
Any of the above using MS-DOS shorthand notation ( \ or ..). When you include .. to change to the parent directory, you must include a space between CD or CHDIR and the two periods.
Remarks
Example
The following example uses SET DEFAULT to change the default Visual FoxPro directory to the startup directory. It uses MKDIR to create a new directory named mytestdir, and CHDIR changes to the mytestdir directory. GETDIR( ) shows you the directory structure in the Select Directory dialog box. You can then use SET DEFAULT to move your position back to the startup directory, RMDIR to remove the newly created directory, and GETDIR( ) to display the original directory structure.
| | Copy Code |
|---|
SET DEFAULT TO HOME()
MKDIR mytestdir
CHDIR mytestdir = GETDIR()
SET DEFAULT TO HOME()
RMDIR mytestdir = GETDIR() |
See Also