This tutorial explains how to delete an undeletable file using Command Prompt in Windows 10. This is a very simple option as you can delete undeletable/locked files with a very simple command. You must have faced difficulty when you were not able to delete some file because it is locked, location is changed, or you simply don’t have permissions. In such cases, you can try this option to delete an undeletable file using Command Prompt in Windows 10.
Using this option, the file is deleted permanently. So you should be sure before executing the command. Only one file at a time can be deleted using this option. Also, this method doesn’t work to delete locked/undeletable folders. But this method is useful to delete text file, image file, or any other file.
How to Delete an Undeletable File Using Command Prompt In Windows 10?
Step 1: Start Command Prompt window. You must start Command Prompt with administrative rights. For this, you can type cmd in Search box and then right-click on Command Prompt window visible in Search box pop-up. There you will see “Run as administrator” option. Use that option.
Step 2: Now you have opened elevated Command Prompt, you need to execute the delete command for the file that is locked. The simple command is: DEL “sourcefile”
Enter the command and press Enter. This will delete that undeletable file.
Step 3: This is an optional step. In case the undeletable file is not deleted using above command, then you can try the other command that I have covered in this step. The command is: DEL /F /Q /A “Source file”
Execute the command and it will delete the file.
For some cases, Shift+Del hotkey works to delete a locked file, but not in all cases. In that scenario, you can try this method and check if you are able to delete an undeletable file using Command Prompt in your Windows 10 PC. If this method doesn’t work, then you can try some free software to delete locked/undeletable files. If you first want to try native option before installing some third-party tool, then you can try it to delete an undeletable file using Command Prompt in Windows 10.