| Description |
The GetDir procedure stores in the passed parameter Directory string the drive plus path name of the default directory on the specified Drive.
Drive values :
| 0 | = Default drive |
| 1 | = A: drive |
| 2 | = B: drive |
| 3 | = C: drive |
| 4 | = D: drive |
| and so on. | |
|
|
| Related commands |
|
|
|
|
| Example code : Getting the directory for the C: drive |
var
DirName : string;
begin GetDir(3, DirName); // Store C: directory in the DirName variable
ShowMessage(DirName);
end;
|
| Show full unit code |
The following output is representative, and will necessarily vary
from PC to PC:
C:\Program Files\Borland\Delphi7\Projects
|
|