Use CHDIR to change to a specified directory
Syntax:RetVal = CHDIR(DirectoryName AS STRING) Return Value:
Parameters:
|
DIM IsIt% DIM DirectoryName$ DIM RetVal% DirectoryName$ = "C:\Windows\Temp" IsIt% = EXIST(DirectoryName$) IF IsIt% = 1 THEN RetVal% = CHDIR(DirectoryName$) IF RetVal% = 0 THEN PRINT "CHDIR changed the current directory to " & CURDIR$ ELSEIF RetVal% = -1 THEN PRINT "CHDIR could not change the current directory." END IF ELSEIF IsIt% = 0 THEN PRINT DirectoryName$ & " directory does not exist." END IF
CHDIR changed the current directory to C:\Windows\Temp