CMD Command To Create Folders in Windows

In the Windows command prompt, we create folders using the mkdir command. The syntax of the mkdir is as follows:

mkdir path

For example, to create an empty directory called documents in the current working directory, use the mkdir command as follows:

mkdir documents

You can include the path to create a folder on a specific location. For example, the following command creates a new folder named documents in the C:\data directory:

mkdir c:\data\documents

The mkdir command can also create multiple folders at once. Here is an example:

mkdir dir1 dir2 dir3

In the following example, we include the full path while creating multiple folders:

mkdir c:\data\dir1 c:\data\dir2

Some more useful CMD commands when working with directories: CD, DIR, XCOPY, and rmdir.

CMD Command To Create Folders in Windows