How to Delete a Folder Using Command Prompt

All versions of Windows have included a Command Prompt where users can implement certain commands to execute a particular function. In some cases, the user might need to delete a particular folder but it won’t delete. This is quite common on all versions of Windows and the message “The Folder is currently in Use” is displayed while trying to delete the folder. However, this problem can easily be tackled by deleting the folder through Command Prompt.

Command Prompt

Therefore, in this article, we will teach you the method to delete a folder using Command Prompt. Make sure to follow the steps carefully to avoid any conflicts.

How to Delete a Folder Using Command Prompt?

All files and folder on the computer can be deleted through the Command Prompt. In order to delete a folder through Command Prompt, follow the guide below:

  1. Press the “Windows” + “R” buttons simultaneously to open the Run Prompt.
  2. Type in “cmd” and press “Shift” + “Alt” + “Enter” to open an elevated Command Prompt.
    Typing cmd in the Run Prompt and pressing Shift + Alt + Enter to open an elevated Command Prompt
  3. Click on “Yes” in the “Do You Want to Allow This App to Make Changes to Your Device?” dialogue box.
  4. Type in the following Command in the command prompt
    RD /S /Q "The Full Path of Folder"
    Adding the command to the command prompt
  5. In order to identify the full path of the Folder, Navigate to the directory which contains the folder.
  6. Once inside the directory, open the folder and click on the address bar on the top.
  7. Select the address and press “Ctrl” + “C” to copy it onto the clipboard.
    Selecting the address from the address bar
  8. This address can later be pasted inside the Command Prompt by pressing “Ctrl” + “V“.
  9. For example, after pasting the address becomes
    RD /S /Q "E:\New folder (2)"
  10. Press “Enter” once the command has been copied inside Command Prompt to execute it.
  11. The folder will automatically be deleted.
    Note: Be careful while entering the address because command prompt deletes the folder as soon as the command is entered without asking for any confirmation. You can confirm the path by opening a new Windows Explorer window and pasting the link on the address bar above.

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.