Previous | Contents | Index |
Returns the current default directory name string. The F$DIRECTORY function has no arguments, but must be followed by parentheses.
F$DIRECTORY()
None.
You can use the F$DIRECTORY function to save the name of the current default directory in a command procedure, to change the default to another directory to do work, and to later restore the original setting.
$ SAVE_DIR = F$DIRECTORY() $ SET DEFAULT [CARLEN.TESTFILES] . . . $ SET DEFAULT 'SAVE_DIR' |
This example shows an excerpt from a command procedure that uses the F$DIRECTORY function to save the current default directory setting. The assignment statement equates the symbol SAVE_DIR to the current directory. Then the SET DEFAULT command establishes a new default directory. Later, the symbol SAVE_DIR is used in the SET DEFAULT command that restores the original default directory.
Note that you can use the F$ENVIRONMENT function with the DEFAULT keyword to return the default disk and directory. You should use the F$ENVIRONMENT function rather than the F$DIRECTORY function in situations involving more than one disk.
Previous | Next | Contents | Index |