Computer and Software Support


mkdir 

This page is from Microsoft

Updated: January 21, 2005

 

Creates a directory or subdirectory.

 
Syntax
mkdir [Drive:]Path

md [Drive:]Path

Parameters
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.
Remarks
  • 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.
Examples
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

Format Meaning
Italic Information that the user must supply
Bold 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