How to delete files and folders with Command Prompt in Windows 10

  • Share

In some cases, Windows is not allowing some users to delete their files or folders. You can use the command prompt to delete a file or a folder if you encounter such a problem. In this article, we will show you how exactly you can use this method to delete files and folders.

  • How to delete files on Windows 10 with CMD
  • How to delete folders on Windows 10 with CMD
  • Force Uninstall

Deleting files on Windows 10 with command prompt

The built-in del command can help you delete files on Windows 10. You have to point out the specific path to this file on your PC.

To use this method do the following:

  1. Open the Start Menu and in the search bar type “cmd”. Right-click on the result and select “Run as Administrator”
  2. Type in the field the following command where PATH will be replaced with the full path to the file you want to delete.
    del path
    delete file with command prompt
  3. After that press Enter

Lets’ see this example to clarify the whole process:

You want to delete a file called Info.txt that is located on your desktop. Use the following command in the Command Prompt where you replace username with your own username:

Del “C:\Users\username\Desktop\Info.txt”

After you enter this command the file will be deleted from the Desktop.

There are several commands that you can use to modify a bit the del command.

For instance, you can add the /p parameter to the command to get Command Prompt to be asked for confirmation before deleting a file.

You can also add the /f parameter to force delete a read-only file.

You can also use Revo Uninstallers’ force uninstall feature if you have trouble removing stubborn programs.

To delete folders in Windows 10 with CMD you have to use the rmdir command

This command will remove all folders including the subfolders and files in them.

To use this command do the following:

  1. Open the Start Menu and in the search bar type “cmd”. Right-click on the result and select “Run as Administrator”
  2. Type in the field the following command where PATH will be replaced with the full path to the file you want to delete.
    rmdir PATH
    remove folder with command prompt
  3. Press Enter to finish the process

For example, to delete a folder named “Info” on your desktop, use the following command where you will replace username with your own username:

rmdir “C:\Users\username\Desktop\Info”

After you press Enter the folder named “Info” on your desktop will be deleted.

If you want to delete all the files and subfolders in the folder you want to delete, add the /s parameter. This will ensure that the folder is removed including the subfolders and files in it.

Conclusion

As you’ve noticed, commands to delete files and folders in Windows 10 can be pretty handy if you have trouble deleting them the regular way.

icon of revo uninstaller pro

We can help you every time when…

  • you cannot find the program in the Apps & Features list
  • the program's built-in uninstaller is non-functional
  • you have a lot of leftovers slowing down your computer's performance
  • you want to batch uninstall
  • many more things
Download now

No Comments

Leave a Reply

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

We use cookies to improve content and ensure you get the best experience on our website.
By continuing to browse our website you agree to our privacy policy.
For more information please view our Privacy & Cookie Policy