“There is a file on my desktop which cannot be deleted. It says the action can’t be completed because the folder or a file in it is open in another program. And I do definitely not open it. And my desktop is running with Windows 10. What should I do to delete files that cannot be deleted?”
Why can’t delete files?
Sometimes, you may find that you can’t delete a file or a folder on your computer. No matter how many times you try, you still can’t delete the file, and it would come along with some information like “The action can’t be completed because the folder or a file is open in another program”.
The reason why the file can’t be deleted might be that a program may be currently occupying it. If so, the windows will lock the file, so you can’t delete, modify, or move it. In this case, you can press “Ctrl + Alt + Delete” and click the “Task Manager” option. End unnecessary programs, and then try to delete the file.
Besides, you can restart your computer and run anti-virus software to check if you can delete the files. If these files are still there and cannot be deleted, you can refer to the next content to find a solution.
4 Methods: delete files that cannot be deleted in Windows 10/8/7
There are 4 methods of force deleting a file provided in the following content; you can try them to solve your problem.
Method 1. Delete files with Command Prompt
You can use the built-in tool, Command Prompt to execute a deletion command to delete a file or a folder.
Step 1. Type “cmd” on the search box, and open Command Prompt.
Step 2. In the Command Prompt window, type “del [/f] [/q] [/a] + the file directory”, as the picture shows. And press Enter to execute the deletion
✍Note: The Del command syntax meanings:
/f = delete read-only files.
/q = turn off delete confirmation.
/a = delete archived files and folders
Method 2. Enter Safe Mode to delete files
If Command Prompt can’t delete a locked file as expected, you can enter Safe Mode to delete the file or folder.
Step 1. Click “Start” on the desktop, and go “Settings” > “Update & Security” > “Recovery” >Advanced Startup, and click the "Restart now".
Step 2. Click “Troubleshoot” >“Advanced options” >“Startup Settings” >“Restart”.
Step 3. In the Startup Settings, press “F4” or “F5” to enter Safe Mode
Step 4. The computer will be started to Safe Mode, and then, delete the file or folder in the Safe Mode.
✍Tip: If your computer is using Windows 7 system, just restart your PC, and tap “F8” to enter “Advanced Boot Options” and choose “Safe Mode”.
Then restart your PC, it will exit the Safe Mode.
Method 3. Repair disk errors
Another cause of failing to delete files is errors on the disk. You can close all opened files, and check if there is an error on your disk, and fix it.
Step 1. Open “This PC” on the desktop or start menu.
Step 2. Right-click the disk on which the files you want to delete stored.
Step 3. Click “Properties” in the drop-down menu.
Step 4. Under the “Tool” tab, click “Check”. And it will check if there is error on the disk.
If there is an error, this program will fix the error automatically.
Method 4. Free Software to delete files that cannot be deleted
If the 3 methods above still can’t delete the files you want to delete, you can try professional third-party wiping software to delete files that cannot be deleted-AOMEI Partition Assistant Standard. It can force delete a hard disk or a partition by writing zeros in a few simple steps.
✍Note: Using writing zeros to force delete the files would wipe the whole partition preventing most of recovery tools from lifting information from it. So before wiping the files, please back up the other useful files.
Step 1. Install and open AOMEI Partition Assistant, right-click the partition where the undeletable files stored, and select “Wipe Partition”
Step 2. You can choose the “Fill sectors with Zero” wiping method to force delete files. And click “OK”.
✍Note: You can also upgrade to Professional Edition to choose the other 3 wiping methods, which can delete files more thoroughly.
Step 3. Then go back to the main interface, click “Apply” to commit the operation.
After that, the files that cannot be deleted will be wiped. And it is worth mentioning that this method should not be applied to deleting files from SSD, because it entirely differs from HDD. If you are using SSD, you might need to use another feature called “SSD Secure Erase” provided by AOMEI Partition Professional Edition.
After the partition is deleted, you will see it become unallocated. You can also use the Professional Edition to add the unallocated space to C partition or create a new partition.
That is all about how to delete files that cannot be deleted. These 4 methods can be applied Windows 10/8/7, and other most of Windows OS. Hope you can solve your problem with them.