Name

md or mkdir

Synopsis

Create a new directory (folder).

Syntax

md [drive:]path
mkdir [drive:]path
                  

Description

Windows XP, like its predecessors, uses a hierarchical directory structure to organize its filesystem. On any physical disk, the filesystem begins with the root directory, signified by a lone backslash.

md and mkdir accept the following option:

[drive:]path

Specifies the directory to create.

Examples

Create a subdirectory named harry in the current directory:

C:\tom\dick>md harry

Create a new directory called newdir under the c:\olddir directory:

C:\>md c:\olddir\newdir

If c:\olddir doesn’t exist, it will be created as well.

Create two new directories, c:\rolling and c:\stones:

C:\>md rolling stones

Create a single new directory, c:\rolling stones:

C:\>md "rolling stones"

(Enclose directory names in quotation marks to accommodate spaces).

Notes

  • The md and mkdir commands are functionally identical.

  • You can also create new folders in Windows Explorer by going to File New Folder.

  • You may indicate an absolute or relative path for the path parameter. When absolute, the new directory is created as specified from the root directory. When relative, the directory is created in relation to the current directory.

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.