Microsoft DOS md and mkdir command

Updated: 09/15/2017 by Computer Hope

About md and mkdir

Allows you to create directories in MS-DOS.


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
Windows 8
Windows 10

Md and mkdir 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.

Md and mkdir 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.