In Windows, we can create directories from command line using the command mkdir(or md). Syntax of this command is explained below.
Create a folder from command line:
For example, to create a folder named ‘newfolder‘ the command is:
Create directory hierarchy
We can create multiple directories hierarchy(creating folder and sub folders with a single command) using mkdir command.
For example, the below command would create a new folder called ‘folder1′ and a sub folder ‘folder2′ and a sub sub folder ‘folder3′.
The above command is same as running the below sequence of commands.
mkdir folder1 chdir folder1 mkdir folder2 chdir folder2 mkdir folder3