This is a much more common problem than many think. You are trying to delete a file or document and Windows does not allow you to do so because “it is being used by another program .” When Windows says a file is in use, it basically tells us that it is currently open and that therefore it cannot be deleted.
How to delete a file that is open or in use by another application
When this happens, the only way to solve it is by closing the program that is holding the file we want to delete captive . In theory it may seem simple, but in many cases it is almost impossible to identify the application that is causing the block.
For example, if the file that we want to delete is a text document, we will most likely solve it by closing Microsoft Word, Notepad or any other word processor that we have installed on the PC. Now, things change when we have already closed all possible programs and the system continues to deny deletion.
1- Close the program from the Windows Task Manager
Sometimes, even if we close a program, it continues to run in the background . This occurs when the program hangs or runs erratically, and.
- Right click the mouse on the Windows taskbar.
- Select “Task Manager.”
- Within the administrator, in the “Processes” tab, select the program you want to close and click on “End task”.
If the program had hung and you have closed and opened it several times, it is possible that you will see several instances of the application in the task manager. Make sure all of them are closed and try again to delete the file.
2- Restart the PC
The easiest way to make sure that there is no program messing with us is to restart the computer. In this way, any application that has the file open will “drop it” and we can erase it without problems.
This will fix the problem in 99% of cases. If not, we will have to use ourselves a little more thoroughly.
3- Delete the file using commands
The next step will be to delete the file using commands from a terminal window. For this, it is necessary that we close the Windows explorer first . This will make all the folders that we had open disappear, as well as the Windows taskbar. Don’t panic, we’ll easily get them back later!
- First of all, open Windows Explorer and navigate to the folder where the file you want to delete is located. Copy the route that appears in the address bar of the browser.
- In the Windows search engine type “cmd” and select “Open as administrator” the Command Prompt application.
- Navigate in the terminal window until you are in the folder where the file we want to delete is located. You can use the command “cd” to enter a folder and the command “cd ..” to exit a folder. You can also use the “dir” command to see the contents of the folder you are in. In any case, you can go much faster by typing “cd” and then pasting the path that we copied from Windows Explorer a few moments ago.
Now we will proceed to close Windows Explorer:
- Open the Task Manager, and in the “Processes” tab locate Windows Explorer. Right click on it and select “End Task.”
- You will see that the desktop is practically empty. Press the key combination “ALT + TAB” and return to the terminal window that we had open.
- Write the following command:
- del “filename.doc”(without quotes, and replacing “filename.doc” with the name and extension of the file we want to delete.
- Hit enter.
The file will automatically be deleted from the system without even going through the Recycle Bin.
- Finally, open the task manager by pressing the key combination “Control + ALT + DELETE”.
- Go to “File -> Run New Task” and type the command “explorer.exe” (without quotes). Click on “Accept”.
In this way we will have restored Windows Explorer and everything will have returned to normal, with the exception that we will have already gotten rid of that annoying document.
4- Install an application to unlock files
Has none of this worked? In this case, you can choose to install a specialized program that is responsible for releasing locked files. Most of these tools are free and freely downloadable.
- Unlocker: Simply locate the file and Unlocker will take care of unlocking it. | Download from Softpedia
- LockHunter: Once the tool is installed, when we right click on a file, a new function will appear called “What is blocking this file?”. Press and you will see all the processes that are blocking the file. From here we can unlock the file or delete it automatically on the next PC restart. | Download from LockHunter website
- Microsoft Process Explorer: This is a more advanced version of Windows Explorer. Use it to find the file you want to delete and you will be able to check all the processes to which it is associated. Then use the Task Manager to end these processes and release the file. | Download from Microsoft website
Solved? Now yes? If after carrying out all these actions you cannot solve the problem in a definitive way, consider reinstalling the program that usually traps files, or even reinstalling Windows from scratch.