Creates a directory or subdirectory.


mkdir [Drive:]Path

md [Drive:]Path


Drive: : Specifies the drive on which you want to create the new directory.

Path : Required. Specifies the name and location of the new directory. The maximum length of any single path is determined by the file system.

/? : Displays help at the command prompt.


When you enable command extensions (that is, the default), you can use a single mkdir command to create intermediate directories in a specified path. For more information about enabling and disabling command extensions, see cmd in Related Topics.


To create a directory named Taxes with a subdirectory named Property, which contains a subdirectory named Current, type:

mkdir \Taxes\Property\Current

This is the same as typing the following sequence of commands with command extensions disabled:

mkdir \Taxes
chdir \Taxes
mkdir Property
chdir Property
mkdir Current 

Formatting legend



Information that the user must supply


Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output



Command-line reference A-Z

© 2017 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies