Trying to delete a file or folder without success? It happens to all of us all the time. Some files on your computer are too stubborn and won’t let you clean up your disk and free up space by deleting them.
Usually, any attempt to delete these ghost files will result in error messages such as “item not found”, “sharing violation”, etc. Also, some Trojan or virus files exhibit this behavior, preventing any possibility of deleting or modifying the file by modifying the system registry.
Now, if you’re stuck with illegible files, third-party software can help you do the same in no time. There are many third-party tools that can unlock locked files and allow the user to delete them. You can also delete ghost files by using the command line and also by changing the file type.
If you cannot remove unrecoverable, locked or ghost folders or files on your Windows computer, use CMD or File Deletion to remove unrecoverable and locked folders and files in Windows 10/8/7.
Sometimes you just can’t remove a file or folder on a Windows computer. When you try to delete such phantom or unrecoverable files or folders, you may get an error message: This article was not found.
You may also receive the following messages:
- The file cannot be deleted : Access denied
- Violation of division rules.
- The source or destination file may be in use.
- The file is being used by another program or user.
- The file or directory is corrupt and cannot be read.
- Make sure that the disk is not full or write-protected and that the file is not in use.
In this article, we will introduce you to some programs that you can use to remove unplayable files on your Windows computer. Finally, take a look at the cool command line and file type changing prompts for removing files without software.
Note: By default, Windows locks files and folders necessary for the system to work properly. However, if you are sure you need to delete a backup file, be sure to create a system restore point and then proceed to the next step.
With a System Restore Point, you can restore your PC to an earlier time in case something goes wrong or you delete an important file or folder.
What causes this problem in Windows 10?
When you want to permanently delete a file or folder, errors can be caused by malware, spyware, adware, or Trojan horses, and sometimes the error is due to system malfunction. In some cases, the file is used by Windows Explorer, which prevents it from being deleted. So, here is a cool method to help you remove all the unrecoverable files on your Windows computer. To do this, please refer to the full method below.
How to delete a stubborn and unrecoverable file or folder in Windows 10.
File in Use Scenario.
There are many programs that can help you unlock a file/folder with an application.
Utilities such as Unlocker and Process Explorer help you force close the file or folder manager and then delete the file or folder.
Before using these programs, first, check to see if you can delete the stubborn file after logging out and back in or after rebooting. In most cases, this helps. It is best to start Windows in safe mode and delete the stubborn file or folder.
If you want to delete a file or folder without restarting Windows, you can use tools like Process Explorer or Unblocker. These tools help you find the program/executable file that is causing the problem, unblock it, and remove the file.
Restart File Explorer.
File Explorer can sometimes have a lock on multimedia files, usually caught by its shell extensions. In this case, a clean exit from the Explorer shell will help.
Here’s how to exit and restart Explorer shell cleanly in Windows 7-10.
Note that in Windows 7 and later versions, the “File Used” dialog box will show the name of the program using the file. Just close the program first.
A third-party program adds a context menu extension to files and folders. Right-clicking a file or folder and clicking a third-party program displays the program using the target file or folder.
The third-party program also offers you these features, which are clear even to end-users:
- Unblock and delete
- Unlock and rename
- Unlock and move
- Unlock and copy
- Forced mode
You can try “forced mode” if a third party fails in normal mode. This is an aggressive mode that kills associated processes instead of just closing the file/folder manager.
- Run the Process Explorer as an administrator.
- Use the Search option (Ctrl + F), type part of the file name, and press ENTER.
- You will see the process that is using the file. Simply close the program manually and then delete the stubborn file.
- Still, in Process Explorer, you can close the file manager using the view at the bottom of the window.
- However, it is best to exit the program.
MoveFile.exe from the Windows SysInternals
The MoveFile utility (to run from the administrator command line window) allows you to schedule move and delete commands for the next reboot. The MoveFile utility works not only for files but also for folders! The work was done perfectly after the reboot! The MoveFile utility uses the MoveFileEx API to rename or delete a file. It saves the delete or renames operation in a MULTI_STRING registry value called PendingFileRenameOperations in the following branch:
On the next reboot, Session Manager performs the delete or rename task by reading the saved rename and PendingFileRenameOperations registry value removal commands. As you can see in the screenshot above, Windows Defender seems to have scheduled the delete operation after updating the signature (to get rid of the outdated driver file).
Incorrect NTFS permissions
If your User Account Control does not have the necessary permissions to edit a file or folder, you will see a “Permissions Denied” dialog when you try to delete it.
Simply take ownership of the file or folder and assign full control to your account before you delete the file. You can take ownership of files/folders and assign them permissions through the Properties, Security tab. However, some users prefer the command line method using Takeown.exe and ICacls.exe.
Once this is done, you should be ready!
Frequently Asked Questions
At the command line, type the file name del /f, where the file name is the name of the file or files you want to delete (you can specify multiple files with commas).
- Go to the Start menu, type "Task Manager" and select "Task Manager" to open it.
- Find the application that is currently using the file and select "Exit Task."
- Then try removing the file from your Windows computer again.
Option 1: Restart the Explorer shell.
Option 2: Use the IOBit unlocker.
Option 3: Use the Process Explorer to close the handle.
Option 4: Use MoveFile.exe to delete or rename a file/folder on reboot.
- Look at the properties of the drive-in Windows Explorer.
- Click the Tools tab.
- Select Error Checking.
- You will need to reboot CHKDSK to make it work during boot.
- The corrupted folder will either be restored to a readable state or deleted.