HB_CWD
Change working directory
Syntax
HB_CWD( [ <cNewWD> ] ) -> <cPrevWD>
Argument
<cNewWD> : New working directory name to set
Return
<cPrevWD> : previous path if new one is set by optional parameter
Description
HB_CWD() can be use as DirName() and/or DirChange() depending on <cNewWD>.
Note
HB_CWD() seem as synonym of DirChange() with some extra features, such as : HB_CWD() function sets FError(). Programmer can check if HB_CWD() succeed checking result of FError() function, i.e.
HB_CWD( cNewPath ) IF FError() != 0 ? "Cannot set working directory to:", cNewPath ELSE // stuff ENDIF
Example
? HB_CWD() ? HB_CWD( '\TEMP' )
Seealso