ChDrive Statement

Description

Changes the current drive.

Syntax

ChDrive drive

The drive argument is a string expression that specifies an existing drive. If you supply a zero-length argument (""), the current drive doesn’t change. If the argument drive is a multiple-character string, ChDrive uses only the first letter.

See Also

ChDir Statement, CurDir Function, MkDir Statement, RmDir Statement.

Example

This example uses the ChDrive statement to change the current drive.


ChDrive "D"            ' Make "D" the current drive.