How to create folders and directories from CMD in Windows

The Windows command terminal is a very useful tool when you want to perform modifications or functions as an administrator . Including the opportunity to create folders and directories from CMD, as well as to send messages to other Windows computers on a network .

Learn how to create folders and directories from CMD in Windows. This step-by-step guide will help you organize your files efficiently and save time.

Creating folders and directories from the Command Prompt (CMD) in Windows is a straightforward process. Here’s a tabular guide to help you understand the basic commands and their functions:

Command Description Example
md or mkdir Creates a new folder or directory. md MyFolder creates a folder named ‘MyFolder’ in the current directory.
cd Changes the current directory. cd MyFolder changes the current directory to ‘MyFolder’.
cd.. Moves up one directory level. cd.. moves up one level from the current directory.
cd\ Moves to the root directory of the current drive. cd\ moves to the root directory of the current drive.
rd or rmdir Deletes a folder or directory. rd MyFolder deletes the folder named ‘MyFolder’. Note: The folder must be empty.

Here’s a basic workflow using these commands:

  1. Open CMD: Press Win + R, type cmd, and press Enter.
  2. Create a folder: Type md MyFolder and press Enter.
  3. Move into the folder: Type cd MyFolder and press Enter.
  4. To create a subfolder, repeat step 2 within the current folder.
  5. To return to the parent folder, type cd.. and press Enter.
  6. To delete an empty folder, type rd MyFolder and press Enter.

Remember, these commands are case-insensitive and can be used interchangeably in uppercase or lowercase. Also, be cautious when deleting folders, as this action cannot be undone easily.

Despite being used mainly by those who have knowledge of the programmatic language on which the Windows operating system is based, many users resort to this function to perform a specific task.

Since it is directly related to the administrator permissions that make up Windows, it could be said that no modification is considered impossible .

Although within the directories you can create all the files that the user wants, some choose to create folders from CMD due to its ease and benefits. Others, just for customization and user taste, choose to change the color of the Windows CMD console .

That is why if you are trying to learn one of the different operations that can be handled from the terminal, keep reading this article to discover how to achieve it.

What is the command to create folders from CMD?

Although there are several standard options through which a folder or directory can be created within the computer, CMD also has a way to achieve this.

Since the result will be the same, having this knowledge is quite useful if you are executing an action within this tool and you need to create folders from CMD. Avoiding wasting time between different windows to do it manually.

Therefore, to start with this function, it will be necessary to open CMD with administrator permissions and thus be able to write the commands in the CMD necessary to create a folder.

The key command to do this is recognized as ” MD ” and is the one that performs the same function as when you press “Create a folder” within the directory menu.

But for that very reason the command does not end there. Well, we clearly mentioned that folders are created in a specific destination or directory, and the terminal is no exception.

So accompanying the “MD” command must be the address where the folder or directory that will be in charge of containing it and its title is located .

A clear example is when you want to create a folder from CMD within the local disk, which is recognized as “C: \”. The folder itself will be in charge of containing the files that are downloaded from Softonic.

Inside the terminal you must write the beginning of the command, accompanied by the recipient and the name that the file to create will acquire. That is, as follows:

  • ” MD C: \ Softonic “

By pressing “Enter” you will be able to see how a folder with the name Softonic is automatically created within the local disk. This is empty and fully available to manage files within it.

Create a directory with the command ” MD “

Besides creating a folder from CMD, this command can also be used to create file libraries known as directories, in case you also need one.

The sequence of information is almost the same. The only difference is that each folder to be created is named. For example:

  • ” MD soft1 soft 2 soft2 “.

Hide folders from CMD

Another of the useful functions that the terminal fulfills is to be able to hide the amount of files that we need. To prevent third parties from manipulating them.

In this case, the ” Attrib ” command is the one in charge of giving the order to establish an attribute to a specific aspect. In this case to a folder.

Within the different existing parameters, “H” is responsible for hiding the content and “S” blocks it so that it is read-only and also acquires the system file characteristic.

Since to add the attribute to the folder, the parameter must be accompanied by a positive or negative symbol, the command would be as follows:

  • ” Attrib + s + h C: \ Softonic “

In this way, in addition to creating and deleting folders like a professional programmer , you have also protected their content, all with total comfort and following these simple steps.

Mastering the art of creating folders and directories from CMD in Windows can greatly improve your file organization and productivity. With just a few simple commands, you can create folders and subfolders effortlessly, saving valuable time and effort. By utilizing the power of the Command Prompt, you can take control of your file management and create a more structured system. So, don’t hesitate to dive into CMD and start organizing your files with ease!

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment