In our previous guide, we explained how to create a New Folder using CMD. Since CMD is not limited to creating a New Folder on Windows.
There are tons of users who want to use CMD to delete folders. While you are here, you must be wondering how to delete folders using CMD or command prompts.
Irrespective of whether you have created a folder using CMD or by simply right clicking and selecting New Folder, you can delete those folders by using a Command Command.
To make your work easier, we have created a guide explaining two different ways or commands to delete Folders.
To know what those commands are and how they work, keep on reading.
Without any further ado, let’s get started:
Deleting New Folders Using CMD – 2024
As mentioned above, we will teach you two different methods to delete a folder using CMD. Since both methods need a different CMD, we will explain them separately.
Here are all ways to delete a Folder using CMD:
Method 1: Using Del Command
In this method, we are going to use the del command to delete folders by using the Command Prompt.
After opening the Command prompt, you have to change the directories where the files are located by using the CMD command.
Once you find the directory in which the file is located, you have to run the below command to delete the file.
For example, you have to delete the test file.txt then you have to run this command,
del “test file.txt”
When you run this command, it will ask you to confirm if you want to delete the file. To confirm the action, type “Y” and hit the Enter button.
When you do so, the selected folder or file will be deleted from your PC.
Method 2: Using rmdir Command
The next command that you can use to delete a folder on your PC by using CMD is rmdir. As I mentioned earlier, you have to switch the directory in which your folder is located.
Once you find the directory, you have to run the following command to delete folders using the rmdir command,
That’s all you need to know about how to delete folders using CMD or Command Prompts.