DirChange Function | |
Change the current Windows directory.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION DirChange(
pszDir AS PSZ
) AS LONG
public static int DirChange(
Psz pszDir
)
Request Example
View SourceParameters
- pszDir
- Type: Psz
The name of the directory to change to, including the drive.
Return Value
Type:
Long
0 if successful; -1 if there is an argument error; otherwise, the DOS error code.
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():
1siError := DirChange("c:\dos")
2IF siError != 0
3 ? DOSErrString(siError)
4ENDIF
See Also