Syntax
MkDir Name$
Remarks
Creates the folder specified by Name$. An error occurs if the folder already exists. If you don't specify a path, Name$ is interpreted relative to the current folder. On the Macintosh, note that if Name$ begins with a colon, Name$ is a relative path; if Name$ contains a colon elsewhere in the folder specification, Name$ is an absolute path.
Examples
This example creates the folder "OUTPUT" by specifying a path. Note that the TEST folder must already exist; MkDir cannot create both folders at the same time. On the Macintosh, substitute a folder name such as HD:TEST:OUTPUT.
MkDir "C:\TEST\OUTPUT"
Each of the following examples creates a subfolder within the current folder:
MkDir "OUTPUT" 'Windows or Macintosh MkDir ".\OUTPUT" 'Windows MkDir ":OUTPUT" 'Macintosh
The following Windows example creates a folder at the same level as the current folder:
MkDir "..\OUTPUT"
The following is the Macintosh equivalent of the previous example:
MkDir "::OUTPUT"
See Also
ChDir, CountDirectories(), Files$(), GetDirectory$(), Name, RmDir