Previous Topic: SetDirectory - Change the Current DirectoryNext Topic: SetStatus - Return Status Value


SetDrive - Change the Current Drive

Valid on Windows only

The SetDrive function changes the current drive.

Function format:

SetDrive(n1 as Integer) as Boolean
n1

Indicates the drive number. The parameter n1 specifies the drive as follows: 1 for A, 2 for B, 3 for C, and so on.

On successful completion, the function returns TRUE, otherwise, returns FALSE.

Example:

Rem switch to drive d.
If Not(SetDrive(4)) Then
	Print("Drive 4 not available");
	exit
End If