- Some files on your computer are too stubborn and won’t let you clean up your disk and free up space by deleting them.
- Some Trojan or virus files exhibit this behavior, preventing any possibility of deleting or modifying the file.
- 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.
This tutorial shows you how to remove “undeletable” folders from Windows 10 and Windows 11. You may be unable to delete a folder if it is a system folder or one utilized by another program.
We all have experienced problems trying to delete a file or folder on our computer that wouldn’t let us free up our disk space.
You can delete a file or folder (or multiple selected files) by clicking on the file and selecting Delete. If you select a folder by selecting the folder, all its contents will be deleted.
Listed below are ways you can delete files or folders that are locked or undeletable.
There may be times when File Explorer is unable to open media files via its shell extensions. The good news is that cleanly terminating the Explorer shell and restarting it can solve the problem.
If you try to delete these ghost files, you’ll usually get error messages like “item not found”, “sharing violation”, etc. The registry may also be modified by Trojan or virus files to prevent deletion or modification of the file.
You can now unlock locked files and delete them with third-party software if you are stuck with illegible files. A number of third-party tools allow you to open locked files and delete them as well as use the command line to delete ghost files.
How To Force Delete A File Windows 10
You can delete a folder with Command Prompt . This tool allows you to run commands that delete selected folders.
In Windows 10, 8, 7 or XP, you can use CMD or File Delettion to remove unrecoverable, locked, or ghost folders and files.
Remove Directory Force
Linux directories can be forced removed by using the rm command with -f, force option.
Windows computers sometimes can’t remove phantom files or folders. You may receive an error message saying: This article was not found when you try to delete such files.
These messages could also be received by you:
- There is an access problem preventing you from deleting the file:
- Division rules violated.
- There may be a conflict between the source and destination files.
- Other programs or users are using the file.
- It is not possible to read the corrupted file or directory.
- In order to transfer a file, it needs to be empty and not locked by write protection or full.
Check out this article for tips on removing unplayable files from Windows computers. Finally, learn how to perform file type changes and remove files with the command line.
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.
Folder In Use Cannot Delete
Locate the folder containing the file, which you wish to delete, on your PC (don’t enter the folder).
When you delete an important file or folder, you can restore your PC to a previous point in time with a System Restore Point.
This problem is a result of Windows 10’s Windows 10 reinstallation.
You may experience errors when you try to permanently delete a file or folder due to malware, spyware, adware, or Trojan horses, or even due to system malfunctions. There are times when the file cannot be deleted because it is being used by Windows Explorer. Here is a way to get rid of all those files, so check out the detailed method below to see how to do it.
How to delete an inexplicable and non-recoverable Windows 10 file or folder
File in Use Scenario.
You can use an application to unlock a file or folder using a variety of programs.
File or folder managers can be force-closed and then deleted using utilities such as Unlocker and Process Explorer.
You should first log out and back in or reboot to see if you can delete the stubborn file. The best way to do so is to start Windows in safe mode.
Using tools such as Process Explorer or Unblocker, you can find and unblock programs causing the problem without restarting Windows.
Restart File Explorer
A clean exit of the Explorer shell is the best way to unlock a multimedia file locked by Windows Explorer.
Using Windows 7-10, you can close the Explorer shell and restart it without losing any data.
A “File Used” dialog box will appear in Windows 7 and later versions when a file is used. Simply close the program before you open it.
Files and folders can be displayed in a third-party program’s context menu by right clicking on them and clicking the third-party program.
rmdir ‘directory name’ is all you need to do to get rid of a directory.
Deadlock is yet another free force file deleter software for Windows. This force file remover helps you delete all files and folders which are causing problems. Generally, when a file causing a problem during deletion, that means file is being used by some other application. So, in that case, it is necessary to unlock the file first from the application which using it. This software provides an Unlock option in its Edit menu. Using it, you can unlock one file at a time. After unlocking the file, you can now easily delete that file from its Edit > Unlock > Remove option.
Even end users are aware of these features provided by the third-party program:
- Delete the blocked content
- Rename after unlocking
- Unlock and move
- Unlock and copy
- Forced mode
The forced mode mode does not close the file/folder manager but kills associated processes instead. This mode is helpful if a third party does not work in normal mode.
- Administrator rights are required to run Process Explorer.
- By pressing Ctrl + F and typing part of the file name, you will be able to search for the file.
- If that file is being used by a program, just close it manually and delete it.
- However, Process Explorer includes a view at the bottom that lets you close the file manager.
- The program should be exited, however.
MoveFile.exe is available from the Windows SysInternals
It is possible to schedule commands to move and delete files for the next reboot using the MoveFile utility (in the administrator command line window). In addition to files, the MoveFile utility also works for folders! After a reboot, the work was completed perfectly! Renaming or deleting a file is done by using the MoveFileEx API from the MoveFile utility. In the following branch, it saves the deletion or rename operation as a MULTI_STRING registry value called PendingFileRenameOperations in the following registry value:
It is located in HKEY_LOCAL_MACHINESystemCurrentControlSetControlSessionManager.
The Session Manager reads the saved rename and the PendingFileRenameOperations registry value removal commands on reboot to perform the delete or rename task. When Windows Defender updated the signature, it scheduled the delete operation (to get rid of an outdated driver file), as shown in the screenshot above.
Incorrect NTFS permissions
The “Permissions Denied” dialog will appear when you try to delete a file or folder if User Account Control doesn’t have the necessary permissions.
Before you delete a file or folder, you need to take ownership of it and give your account full control. You can do this by clicking the Properties, Security tab and assigning permissions to the files or folders. There are also some users who prefer the command-line method through Takeown.exe and ICacls.exe.
You are now ready to go!
RECOMMENATION: Click here for help with Windows errors.
Most 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.
Mark Ginter is a tech blogger with a passion for all things gadgets and gizmos. A self-proclaimed "geek", Mark has been blogging about technology for over 15 years. His blog, techquack.com, covers a wide range of topics including new product releases, industry news, and tips and tricks for getting the most out of your devices. If you're looking for someone who can keep you up-to-date with all the latest tech news and developments, then be sure to follow him over at Microsoft.