The command line is still a powerful thing to use in Microsoft Windows. You may need to learn how to create a directory from the command line if you’re writing a script, or want a simpler way to create multiple folders. Here’s how it’s done.
- Select the “Start” button,type
cmd
then choose “Command Prompt” in the list that appears.
- To switch to another drive, simply type the drive letter followed by a colon, then press “Enter“.
- To switch to another directory, type cd followed by the path to the directory, then press “Enter“.
- Type
mkdir
followed by the name of the folder you wish to create, then press “Enter“.
Example:mkdir mynewfolder
Example showing switching to the G drive, then to the test folder and the creation of a folder called “mynewfolder”.
Creating multiple folders is easier from the command line. You can type mkdir followed by the names of each folder, separated by a space to do this.
mkdir mynewfolder1 mynewfolder2 testfolder1
Note: Alternately, you can use the md command in place of mkdir. They do the same thing.
hp llaptop says
hi , when i do this the folder doesnt show in my desktop but in my local disk drive.
Daniel says
thanks for simple and usefull tutorial
Michael h Noel says
Thank you so much. Bless
Geogina Launeka says
Thanks a lot. This answered my question.
Sylvester says
That was very useful. Thank you!
David Callaway says
This answered my question precisely. Thank you.