Click or drag to resize

DirChange Function

Change the current Windows directory.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION DirChange(
	pszDir AS PSZ
) AS LONG
View Source

Parameters

pszDir
Type: Psz
The name of the directory to change to, including the drive.

Return Value

Type: Int32
0 if successful; -1 if there is an argument error; otherwise, the DOS error code.  For a complete list of DOS error codes and accompanying descriptions, see Appendix A.
Remarks
DirChange() changes the current subdirectory or determines if a directory exists.  Be aware that if, after issuing a DirChange(), you change to another drive (via DiskChange(), for example), another Windows task might change the directory of the disk on which your original DirChange() was issued.
Examples
This example uses DirChange():
X#
siError :=  DirChange("c:\dos")
IF siError != 0
        ? DOSErrString(siError)
ENDIF
See Also