Encountering the error message “Can’t delete file because it’s open in Windows Explorer” can be frustrating, especially when trying to clean up your system. This issue occurs when a file is locked by a process, preventing you from deleting it. Fortunately, there are several methods to resolve this problem effectively. Below, we explore reliable fixes to help you regain control over your files.
Close Windows Explorer Processes
Sometimes, Windows Explorer itself may be the culprit, keeping the file in use. Follow these steps to close it:
- Press Ctrl + Shift + Esc to open Task Manager.
- Locate Windows Explorer under the Processes tab.
- Right-click it and select Restart.
- Try deleting the file again.
Check for Background Applications
Certain programs may be using the file in the background. To close them:
- Open Task Manager using Ctrl + Shift + Esc.
- Look for any applications that may be using the file.
- Right-click the application and choose End Task.
- Attempt to delete the file once more.

Use Safe Mode
If a file is persistently locked, booting into Safe Mode can help:
- Press Win + R and type msconfig, then press Enter.
- Go to the Boot tab and check Safe boot.
- Click OK and restart your computer.
- Once in Safe Mode, navigate to the file and delete it.
To return to normal mode, repeat the steps above and uncheck Safe boot.
Disable the Preview Pane
Windows Explorer’s Preview Pane can sometimes lock files. To disable it:
- Open File Explorer.
- Click on the View tab.
- Click Preview pane to disable it.
- Try deleting the file again.

Delete via Command Prompt
For stubborn files, the Command Prompt provides a reliable solution:
- Press Win + R, type cmd, and hit Enter.
- Navigate to the file location using the cd command.
- Type the command del /f /q filename and press Enter.
- The file should now be deleted.
Use Third-Party Software
If none of the manual methods work, specialized software like Unlocker or IObit Unlocker can help:
- Download and install a file unlocking tool.
- Right-click on the file and choose Unlock or Delete.
- The program will remove the file lock and delete it.
Restart Your Computer
If all else fails, restarting your computer can reset file locks and allow deletion. Simply reboot and attempt to delete the file again.
Final Thoughts
Dealing with locked files in Windows Explorer can be annoying, but with the right approach, it is easily fixable. By following the steps outlined above, you can successfully remove problematic files and keep your system running smoothly.