Delete Folder using cmd on Windows 10- Clear files using Terminal

How to Delete Folder using Command Prompt on Windows 10 OS

Delete Folders using cmd

Delete folder using cmd on Windows 10 Operating System: It is been a long way for the Operating systems which earlier used commands on terminal to control the machine. But then a total revolution happened with the arrival of Windows that totally changed the purpose and usage of an Operating system. In spite of all the latest GUI provided by various Operating systems like Windows, Linux, and Mac, each of them is loaded with the Terminal shell with which the operating system can be used to its core functionality which tells us the importance of the Command Terminal even after all these years. This is a simple article explaining How to Delete a Folder using cmd on Windows 10.

Jump to:

Delete a Folder using cmd(Command prompt) on Windows 10- Easy Steps:

Let us get into the steps directly.

  1. Open Run Command box using the shortcut Windows key + R.
  2. Type cmd and click on OK. Command Prompt will open now.
  3. The command to remove a folder as follows.
    Syntax: rmdir folder path
    Example: rmdir C:\Users\TecKangaroo\Desktop\test
  4. We will explain the above with pictorial representations.
  5. Create a Test Folder.
    Create a Test Folder
    Create a Test Folder
  6. Right Click on the folder and choose Properties.
  7. Copy the Folder path.
    Copy the Folder path
    Copy the Folder path
  8. Open Run Command box using the shortcut  Windows Key + R.
  9. Type as cmd and click OK.
    Execute cmd
    Execute cmd
  10. Type rmdir C:\Users\TecKangaroo\Desktop\test and press Enter key.

    Note: Don’t forget to add the folder name after the file path that you copied.
    Folder Delete Command
    Folder Delete Command
  11. Now the test folder is deleted.
    Deleting a Folder using rmdir command will delete all the contents of the folder permanently and the folder won’t be moved to the Recycle bin. Hence Kindly make sure of the things before you proceed.

How to Delete files of a folder using Command Prompt on Windows 10:

Here in this section, we will see How to Delete the files of a folder. Kindly follow the below steps.

Delete files using cmd
Delete files using cmd

Syntax: del -f filepath

Example: del -f C:\Users\TecKangaroo\Desktop\testfolder\testfile

The above command will ask for the confirmation before deleting the file.

Conclusion of the Article:

This is a Tutorial that will help you to delete folders and files using Command Prompt. With the arrival of Graphical User Interface on Operating systems, a lot of operations and applications have been made way simpler and it is very easy to delete a file or folder on Windows 10 using GUI. However, if you face any problem in that, then you can use this tutorial method to delete the folder using cmd and delete files using cmd.

If you have any questions, please leave us a comment. Stay tuned for more awesome posts on the latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *