MkDir Statement

Description

Creates a new directory or folder.

Syntax

MkDir path

The path argument is a string expression that identifies the directory or folder to be created. The path may include the drive. If no drive is specified, MkDir creates the new directory or folder on the current drive.

Remarks

In Microsoft Windows, if you use MkDir to create a directory whose name contains an embedded space, you may be able to access it with some applications, but you can’t remove it using standard operating system commands. To remove such a directory, use the RmDir statement.

See Also

ChDir Statement, CurDir Function, RmDir Statement.

Example

This example uses the MkDir statement to create a directory or folder. If the drive is not specified, the new directory or folder is created on the current drive.


MkDir "MYDIR"            ' Make new directory or folder.