CHDRIVE statement

Purpose

Change the current default drive.

Syntax

CHDRIVE drive

Remarks

drive is a string expression whose first character is a letter from A to the highest logical drive letter.  The trailing colon (:) that DOS uses is optional in PowerBASIC.  If drive does not indicate a valid drive, a run-time Error 76 occurs ("Path not found").

See also

CHDIR, CURDIR$, MKDIR, RMDIR

Example

SDrive$ = "C"
CHDRIVE SDrive$   ' change to the C: drive