Description
The ChDir
function sets the current working directory.
Usage
It is used to change the current working folder. This statement is automatically generated in Recording mode when you start Recording mode by Launching an application and you specify in Launching a program dialog box a working folder.
Syntax
ChDir(<directory_name>)
or
ret=ChDir(<directory_name>)
Parameters
<directory_name>
, string, name of the new working directory file. Equivalent to the DOS command CD; but whereas DOS CD cannot be used to change the drive and directory simultaneously, ChDir can.
Return Value
ret
, numeric return code. When successful, the function returns 0, otherwise use this return code for Error Handling.
See Also
CurDir$
Examples
ChDir("I:\docword")
or
direct$="c:\program files"
ChDir(direct$)