Specifies the default drive and directory.
SET DEFAULT TO [cPath] |
Parameters
- cPath
-
Specifies one of the following:
-
A drive designator
-
A drive designator with a directory name
-
A child directory name
-
Any of the above using Microsoft MS-DOS shorthand notation (В \В or ..)
-
A drive designator
Remarks
SET DEFAULT changes the default directory to the directory you specify.
MicrosoftВ® Visual FoxProВ® searches for a file in the default Visual FoxPro directory. The default directory is the one from which you start Visual FoxPro. However, you can specify a different default directory in your Visual FoxPro configuration file or in a startup program. If Visual FoxPro cannot find a file in the default directory, it then searches the Visual FoxPro path if one has been specified. Use SET PATH to specify the Visual FoxPro path.
If you create a file and do not specify where to place it, the file is placed in the default Visual FoxPro directory.
The SET DEFAULT command is not supported in either single or multithreaded DLL servers. This command changes the default directory of the entire process, so all threads which are part of the process are affected. Use the SET PATH command in DLL servers, in place of CD and CHDIR.
Tip: |
---|
SYS(5) returns the default drive. SYS(2003) returns the default directory with no drive designator. SYS(5) + SYS(2003) returns the default drive and the directory. |
You can change the default drive to drive A using either of the following commands:
В | Copy Code |
---|---|
SET DEFAULT TO A SET DEFAULT TO A: |
You can specify a specific directory:
В | Copy Code |
---|---|
SET DEFAULT TO A:\sales SET DEFAULT TO C:\sales\data |
You can specify a child directory. If the root directory on drive C is the default Visual FoxPro directory, issue the following command to change the default directory to C:\Sales:
В | Copy Code |
---|---|
SET DEFAULT TO sales |
You can use MS-DOS shorthand notation. If the current directory is C:\Sales\Data, issue the following command to make the root directory the default directory:
В | Copy Code |
---|---|
SET DEFAULT TO \ |
You can also move the default directory one directory toward the root directory with the following command:
В | Copy Code |
---|---|
SET DEFAULT TO .. |