Get_Drive_Directory
Obsolete
This command is replaced by the Get_Directory command.
Purpose
To read the path of the user's current directory for a specific drive into the program.
Syntax
get_drive_directory drive to variable
Argument Explanation
- drive: Must be, or contain, an Integer value ordinally identifying the drive.
What It Does
Get_drive_directory returns the current path for the named drive in the variable.
string oldDirA
get_drive_directory 1 to oldDirA
In this example, the value of the current directory for the first drive on the system (typically A:) is moved to the string variable oldDirA. If the drive's current directory was \MIKE S\UI\UI_PROG, that would be the value of oldDirA.
The directory returned will be the one that is current for the specified drive. A drive of 0 will return the directory for the user's current drive.
Notes
-
You may provide users the opportunity to change directories while program execution is suspended with
runprogram wait, but upon return to the program, the current directory will be the same as it was beforerunprogram wait. -
Users' current directories cannot be changed while a DataFlex program is running.
-
The files in a directory can be displayed with the
directorycommand and can be read into the program with thedir:driver of thedirect_inputcommand.