Microsoft DOS md and mkdir command

Quick links

About md and mkdir
Availability
Syntax
Examples

About md and mkdir

Allows you to create your own directories in MS-DOS.

Availability

The md and mkdir commands are internal commands that are available in the below Microsoft operating systems.

All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7

Syntax

Creates a directory.

MKDIR [drive:]path
MD [drive:]path

If Command Extensions are enabled MKDIR changes as follows:

MKDIR creates any intermediate directories in the path, if needed.
For example, assume \a does not exist then:

mkdir \a\b\c\d

is the same as:

mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d

which is what you would have to type if extensions were disabled.

Examples

md test

The above example creates the "test" directory in the current directory.

mkdir "computer hope"

The above command would create a directory called "computer hope", if you want a space in your directory name it must be surrounded in quotes.

md c:\test

Create the "test" directory in the c:\ directory.

Additional information

  • See our directory definition for further information and related links on this term.