Jump to Key Sections
You want to delete a file or a folder, but Windows returns you an error message indicating that the operation is impossible? There are several tricks to overcome these recalcitrant elements.
Contents
- Why does Windows refuse to delete a file?
- Delete a recalcitrant file with a reboot
- Delete a recalcitrant file by copy and paste
- Delete a recalcitrant file in safe mode
- Delete a file or folder that cannot be found
- Delete a file used with the command prompt
- Locate and stop the application preventing a file from being deleted
Item not found, file impossible to delete, file opened in another program… You may have already experienced this kind of abstruse error message with Windows. It is the kind of situation that annoys, and can even drive you crazy. Without understanding why, following a wrong manipulation or a bug, you find yourself with a file or a folder impossible to delete in Windows Explorer. Sometimes it is even impossible to move or rename it… Fortunately, there are some tricks to get rid of these recalcitrant elements.
Why Does Windows Refuse to Delete A File?
There are several reasons why Windows fails to delete a file or a folder.
- The file or folder to be deleted is already in use by an application.
- The folder to be deleted contains hidden files or subfolders.
- The file or folder is read-only.
- The storage medium has a problem or its file system has errors.
- The PC is infected with a virus.
- The file or folder to be deleted was created by another Windows 10 user who did not leave the deletion rights.
Depending on the case, different error messages may appear.
- Error while deleting the file or folder.
- Unable to delete the file: Access denied.
- Item not found.
- Sharing violation.
- This action cannot be performed because the file is open in another program.
- Check that the disk is not full or write-protected and that the file is not currently in use.
There are various solutions to these different problems of impossible deletion. Not all of them work systematically, and sometimes you have to try several before you find the right one, starting with the simplest methods.
How to delete a recalcitrant file with a PC restart?
Sometimes Windows displays the error message: File used. This action cannot be performed because the file is open in another program. Close the file and try again.
- First check that your file is not actually being used by an application whose window is hidden or minimized – it happens…
- If this is the case, close the application in question and try to delete the file again.
- If the file is not used or resists, close all open applications and restart the computer.This will ensure that the file will not be loaded into memory. This is the first thing to do when faced with a stubborn file.
- After restarting, try to delete the file – or folder – normally.
If this method – the easiest one – fails, move on to try another technique.
How to delete a stubborn file by copy and paste?
A simple trick for deleting a stubborn file is to try to replace it with a file with the same name, which forces Windows to overwrite it.
- Open a window with Windows Explorer. Right-click on an empty area and select New from the context menu, then click on Text Document from the cascading submenu.
- A new file is immediately created with the extension .txt.
- Double click on the file name (or use the F2 key), then select the full name with the extension to change them and name it exactly like the file to be deleted, with the same extension (.docx, .avi, .xlsx, .mp3 or other).
- Windows displays a warning window asking if you really want to change the extension. Click OK to confirm.
- Drag or copy and paste the renamed file to the folder where the file you can’t delete is located.
- Windows 10 will display a warning window indicating that a file with the same name exists at the chosen destination and asking you to choose an action. Click Replace File in Destination.
- If all goes well, the recalcitrant file is deleted, overwritten by its replacement, which you just have to delete normally!
How to delete a recalcitrant file in safe mode?
Safe Mode is a mode in which Windows only loads the essential. It works in a light version, without the burden of certain services and programs, and that is why it is often used to solve problems.
The way to start a PC in Safe Mode has evolved. In older versions of Windows, all you had to do was press the F8 key on the keyboard during the first few seconds of the computer’s startup, before Windows launched, and choose Safe Mode from the options presented in a minimalist screen. With Windows 10, Microsoft has implemented another method, richer in options, but also more complex to remember. To learn everything about Safe Mode in Windows 10, see our special fact sheet.
In any case, start your C in Safe Mode, then try to delete the recalcitrant file. If that doesn’t work, hold another method.
If none of the previous methods work, you can use specialized utilities that unlock access to files that cannot be deleted.This is the case, for example, with Unlocker, a free and very easy-to-use software that you can download from our site.
- Download, install and open Unlocker.
- In the software’s only window, browse your PC’s tree to locate the file you want to delete.
- Click on the file name, then click OK.
- The file is now unlocked, allowing you to rename, move or delete it.
How to delete a file or folder not found in Windows 10?
In the screenshot below, you can see an example of the Item Not Found error message that Windows 10 sometimes displays when you want to delete a file. No matter what manipulation you try, this error message "Item not found. It no longer exists in… Check its current location, and try again" will appear and Windows will refuse to delete this file or folder.
But you can easily delete this unfound item without typing any command line and without going through Windows Safe Mode. The trick is to bypass Windows 10 Explorer and go through a file compression and archiving software, such as 7-Zip or WinRAR. If you don’t have any file compression software installed on your computer, you can download one for free through our selection.
- Open your compression and archiving software.
- Once in the interface of the software, navigate through the folders of your PC to find the file to be deleted.
- Click on the name of the "not found" file to select it, then click on Delete.
- Confirm the deletion of the file by clicking Yes.
- Now you just have to empty the Windows recycle garbage can to get rid of your untraceable file…
How to delete a file used with the Windows command prompt?
A fairly effective method of deleting a file is to use the Windows command prompt – or PowerShell, its replacement in Windows 10. Although rustic – it’s the legacy of the old MS-DOS system of the first PCs… – this tool is still powerful and very effective for certain operations, and it often manages to delete files that resist Windows. For more information and tips on how to use the command prompt, please refer to the practical sheet devoted entirely to it.
- Type the shortcut Windows + R. The Run window opens. In the input field, type cmd and confirm with OK or the Enter key.
- After the blinking cursor, type the command cd followed by the path to the directory containing the file to be deleted and validate with cd.
- Then type the command del name_of_your_file and press the Enter key to validate and start the deletion. Your file is in principle deleted.
How to locate and stop the application preventing the deletion of a file?
Sometimes Windows prevents the deletion because an application – or one of its processes – that you can’t see is actually using the file. In this case, you need to be able to identify the application and force it to stop. This can be done with specialized – and free – software such as Process Explorer, which you can download here. This utility is in English, but it is very easy to use.
- Download and install Process Explorer on your PC and open the software.
- Click on Find in the menu, then on Find handle or DLL.
- Enter the name of the file you want to delete in the Handle or DLL substring field, then click on the Search button.
- Process Explorer then searches for the process that uses your file. Locate the running application and stop it by right-clicking on its name and clicking Kill process.
- The process is stopped – by force -, and your file is freed. Then try to delete it normally.