mkdir command in Windows 10

Share on facebook
Share on google
Share on twitter
Share on linkedin

mkdir

Creates a directory or subdirectory. Command extensions, which are enabled by default, allow you to use a single mkdir command to create intermediate directories in a specified path.

 Note

This command is the same as the md command.

In Windows, we can create directories from command line using the command mkdir(or md). Syntax of this command is explained below.

Syntax

mkdir [<drive>:]<path>

Parameters

PARAMETERS
Parameter Description
<drive>: Specifies the drive on which you want to create the new directory.
<path> Specifies the name and location of the new directory. The maximum length of any single path is determined by the file system. This is a required parameter.
/? Displays help at the command prompt. https://computerthang.com/p/dell-3430-workstation-a198/

We can create multiple directories hierarchy(creating folder and sub folders with a single command) using mkdir command.

Examples

To create a directory named Directory1 within the current directory, type:

mkdir Directory1

To create the directory tree Taxes\Property\Current within the root directory, with command extensions enabled, type:

mkdir \Taxes\Property\Current

To create the directory tree Taxes\Property\Current within the root directory as in the previous example, but with command extensions disabled, type the following sequence of commands:

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