Creating directories with CLI on Windows

A command line tool is one of the most used tools in the world of technology and computer science. There is a reason why people still rely on this old way of communicating with the system rather than utilising the GUI (Graphical User Interface). The reason is simple enough, it is the fact this is a fast and effective way doing things rather than going around with GUI. In addition to it, it allows you to work under heavy security. In a place where security matters the most, you definitely will have to work with Command Line Interface or CLI.

A brief overview of the most crucial system commands

One of the most useful and most used commands you want to remember is the cd, dir, <drive letter>:. With the cd command you are able to change the focus of the directory from one to another. You can navigate your way around the folders with this command. So basically the cd command is our navigation tool. Dir command is used to view the list of contents under such directory you focus on with cd. In this case, the dir command is your explorer tool which you can use to view or select any files, document etc. <drive letter>: is used to change or switch the hard drive volume.

Let’s say you are in the drive C:> , if you type d: , assuming you have a drive with the letter d assigned to it, your drive will be changed to d from c. So, it will show you like D:>.

With these commands under your belt you are ready to move around your system from the command line interface. Now, how about we learn to create or make directories or folders inside a directory? No, not from right clicking and looking to make a ‘new’ folder from the drop down but straight off the command line prompt?

Creating new folders and directories with a command line on Windows

md is the mighty command we are looking for to make a directory anywhere where we are allowed to do so. There is also one other universal command for this, which is mkdir. This is used and works on any operating system. md is used only on the Windows operating system. It is highly advised to practice creating directory inside your own user folder. Meaning, C:Users\<user name>. If you are not there, try using the cd command and navigate there. Once you are sure, start practicing creating directories there with either mkdir or md.

Notice that the moment you hit enter, Windows do not give you any information about what you have just done and whether the folder was successfully created or not. In order to learn about it, you need to use the dir command and see if the new folder was created. The command line simply moves on to the new line. Notice that you need to name your folder after cd like cd<space> <name>. This will create the folder. Look for the name and you will find the folder. Without a name, you will see an error message like ‘The syntax of the command is incorrect’. Same goes for the mkdir. Without the name, it will throw the same message.