Wondershare Recoverit

Hard Drive Recovery

  • Recovers deleted or lost files from hard drive effectively, safely and completely.
  • Supports data recovery from 500+ data loss scenarios, including computer crash, partition loss, accidental human error, etc.
  • Supports 1000+ file formats recovery with a high success rate and without any quality loss.
Free Download Free Download Free Download Learn More >

4 Methods to Fix the Cannot Delete Files Error

Wondershare Recoverit Authors

Feb 19, 2024 • Filed to: Recover Files • Proven solutions

It is very annoying to see the message with "the file cannot be deleted" when you try to get rid of the files you don't need anymore. In some cases, there are simple circumstances to avoid this kind of message or ways to manage easier the situation. But there are also situations where novices cannot handle the deletion of certain files. If this is your case, the best solution is to speak with a Windows expert who knows what is NTFS for example.

However, in this article are shown simple facts to avoid or be careful at. The actions are intended to give guidance for novices and experts as well.

Possible reasons that the "can not delete file" problem occurs

1. The file you are trying to delete is in use

The file in use could be open somewhere or it could be in the pending deletion status. To see all the files and running processes, open Start Task Manager and close from there the files by clicking End Task.

2. Access to the file is denied

If you are struggling with a file system corruption, this prevents access to the file. In most cases, you are not able to delete the file if the file system is corrupted and the solution could be to run a Windows utility to solve this problem.

3. The file name includes an invalid name, including the space in the name

If you search for a file named " text.txt" and you didn't find it, probably is the case that you have used the space before that word. Thus, if your file is named "text.txt", you must use the file name exactly.

4. Your file name includes a reserved name in Win32

There are specific files with names reserved only for Windows operating system. To rename this kind of files, you can use a non-Win32 program.

Method 1: Force to Delete a File

If even after several tries, you are repeatedly falling in deletion of a file or folder, it’s better to go for the force to delete a file option. Usually, the problem occurs when the file you want to delete is in use or opened in another program. Read the guide for the force to delete a file and get rid of the cannot delete files error.

force to delete a file - 1

Step 1: Open “Task Manager” on your PC by pressing the keys “Ctrl + Shift + Esc.” This is the best shortcut of running Task manager.

force to delete a file -2

Step 2: Navigate and search the application, which is using the file you are trying to delete. Click on the “End Task.”
Step 3: Now, try to delete the same file again, and you will find it easy to do right now.

Method 2: Delete Files/Folders Using CMD

CMD is a great program that can do anything if the system is not working right. Try to delete a file or folder using CMD if the error is not letting you do so. This is a more efficient and effective program for deleting a file. The step-by-step guide to delete a file or folder is given as follows.

Step 1: Launch the run command using the "Windows key + R" and type CMD to open the Command Prompt. An alternate way is to type Command Prompt on the Search box and click on “Run as Administrator”.

open command prompt

Step 2: When the command prompt window opens, type the command line with the del and file/folder location. For instance; del c:\users\John\Desktop\text.txt. The file will be deleted automatically.

Method 3: Use Safe Mode to Unlock and Delete Files

If a file is locked and you want to delete it, using the safe mode is an ideal option for unlocking and deleting that. However, one can also restart the device and unlock the file. When this does not work, you need to boot into safe mode and then delete the file quickly.

Step 1: Run "Settings" on your desktop and click on "Update & Security" > "Recovery" > "Restart now" button present under “Advanced Startup”

Step 2: Now click on "Troubleshoot" > "Advanced options" > "Startup Settings"

click trouble shoot and choose the following settings

Step 3: Hit the "Restart" button.

Step 4: As the "Startup Settings appear," press F4 to turn on the Safe Mode. Run File Explorer to search and delete the locked files. Thereafter, restart the device.

Method 4: Repairing Disk Errors on Windows

Probably, the disk errors on Windows can be one of the main reasons for causing cannot delete file error. Corrupted files infect your PC, and this can be determined by checking the disk for bad sectors.

Step 1: Open the Command Prompt using the search box on the taskbar or by pressing “Windows Key + R” and clicking on “Run as Administrator”.

Step 2: Input the command chkdsk C: \f\r\x. The computer will start scanning for any disk error and fixes it within a few minutes.

Bonus: How to recover files deleted by accident

Suppose you are deleting useless files or folder from the system and end up deleting an important file. In that case, what can you do? You would like to recover the deleted file. The fact is deleted files are not removed permanently from any device. There's always a way to backup them, but this will require you to download third-party software. Our trust is with professional Recoverit Data Recovery Tool and patented technology for retrieving any deleted files and folders. It also empowers users to repair corrupted video files and do much more than you can imagine. The software is packed with a bundle of features that you can read them below.

Key Features:

Step-by-Step Tutorial:
The steps to backup the files with Recoverit Free Data Recovery tool are as follows:

Step 1: Launch Recoverit

Download the Recoverit Free Data Recovery tool on your PC or Mac. Install and wait for the program to launch automatically. On the home interface, choose the device or hard disk to start.

quick scan to search lost data

Step 2: Scan the Device

It will begin the scanning of the disk to search the lost data in a few minutes.

quick scan to search lost data

Step 3: Preview and Recover Lost Files

Preview the recovered files and decide, which ones you want to save. Select them and click on the “Recover” button to retrieve files.

preview and recover data


These are some of the typical ways of fixing cannot delete file error. Recoverit Data Recovery is a reliable tool to rescue any data. Moreover, you don't have to depend on any other software for the recovery of data. Adopt a straightforward approach for the file retrieval process. We have covered many things here, and you have to be careful while performing all the above steps.

Recoverit author

Amy Dennis

staff Editor

Home > Resources > Recover Files > 4 Methods to Fix the Cannot Delete Files Error