If you are a Windows user, you may have come across the problem of file not deleting, stating that the file is being used by a program even, or just won’t delete. Here are the methods that you should give a try to force delete a file.
Basic Solutions if a File is Not Deleting
Before moving on to the advance option try some simple solution that solves more than 70% of the problems:
- Close all the applications currently running on your PC, and try to delete your target file.
- Close the Windows Explorer from the Task Manager. You can open the Task Manager by pressing Ctrl + Shift + Esc on your keyboard.
- After opening Task Manager, Right-click on Windows Explorer and then click on End task.
- Restarting your system can also help you out. It’s worth giving a try as lots of issues get solved after a system restart.
- You can also use an Antivirus for scanning your computer, and find out if there’s any virus that’s preventing you delete a particular file.
Give a shot to all these basic solutions as mentioned above. If the problem still exists, then here are some other methods that you should implement to overcome this issue.
How to Force Delete a File using CMD
- First of all, open the command prompt as administrator. Hit Win + R on your keyboard, type cmd and press Enter, hit Ctrl + Shift + Enter and allow the administrator’s access.
- Type in the command line del *file path* and hit Enter. It should look something like this: del C:\users\example\documents\words.txt (If you want to delete word file)
How To Force Delete a File using Safe Mode
If the previous solutions didn’t work out for you, try booting your computer into Safe Mode and deleting your target file. As you may know, Safe mode is also called the diagnostic mode of a computer OS, so it may work.
Steps to Boot into Safe Mode
- Hit Win + R on your keyboard.
- Type in msconfig and hit Enter/OK.
- A dialogue box will appear, click on the Boot tab at the top.
- Mark the Safe boot checkbox, and click OK.
- Now, you will be asked to restart your system. Restart your computer and try deleting the file that you can’t remove.
Once you are done in safe mode:
- Follow the same steps as above till the 3rd step.
- Unmark the Safe boot checkbox, and click OK.
- Now, restart your computer. It should boot in normal mode.
Hope this will get you out of problem. If not feel free to share with us in the form of comment.