GetCurrentDir subroutine
Description
Returns the current directory (the directory from which the application is running).
Syntax
GetCurrentDir(null,CurrentDirectory)
Parameters
The GetCurrentDir subroutine has the following parameter.
Parameter | Description | |
---|---|---|
null | Pass a null value to the first parameter | |
CurrentDirectory | Variable which must be initialized. After the call, CurrentDirectory will contain the current directory name. |
Remarks
Note: In versions 9.1 and above, it is not necessary to pass a null variable as the first parameter. The only parameter necessary is the current directory.
In 9.1 and above:
GetCurrentDir("", CurrentDirectory) and GetCurrentDir(CurrentDirectory) will return the current directory.
In 9.0. and prior:
GetCurrentDir("", CurrentDirectory) will return the current directory. GetCurrentDir(CurrentDirectory) will return the current directory in most situations but not all.
Example
/* after GetCurrentDir() is called, currdir will contain the current directory name. */ declare subroutine GetCurrentDir currdir = '' call GetCurrentDir('',currdir)