How to Delete ‘File in Use’ In Windows

4 minutes read

Have you ever encountered that frustrating message in Windows, telling you that a file is in use and cannot be deleted? It can be incredibly annoying when you’re trying to clean up your computer or make space for new files. Fortunately, there are ways to tackle this issue and regain control over your files. In this article, we’ll explore various methods to delete files that are seemingly held hostage by your Operating System.

Written By
Updated On

Deleting files is a simple and easy process. We delete files for various reasons, like to free up disk space or because we don’t need that file anymore. And we also delete files by accident which is a common scenario. But sometimes, deleting files can be a daunting task if you get an error message saying - you cannot delete the file that is in use.

If you get this message, it means that the file is still open or used by another application, or maybe the file is corrupt. You can get this message not just on the files you opened recently but also on files that you never touched for ages! Windows only tell you that the file is in use but does not guide you to what is causing the problem. So what's the solution? Is there a way to delete a file in use?

Well, below are some of the methods to check what is causing the problem and how to delete the file in use:

Solution 1: Is The File Really Closed?

Most of the time, the file in question is still open in another application. To resolve this:

  • Check if the file is open in any application.
  • Close any applications that might be using the file.
  • Try deleting the file again.

Solution 2: Try Closing Windows Explorer 

Windows Explorer can sometimes lock a file. To resolve this:

  • Create a new folder and move all your files except the stubborn one.
  • Attempt to delete the folder containing the file.
  • If this doesn't work, restart Windows Explorer:
    • Right-click the Taskbar and select "Task Manager."
    • Find "Windows Explorer," right-click it, and choose "End Task."
    • To restart Windows Explorer, click the "File" tab in Task Manager, select "Run New Task," type "explorer.exe," and press Enter.
  • Try deleting the file again.

Interesting Read: Find out how to recover deleted files from a Windows server.

Solution 3: End The Program Through Safe Mode

If previous methods fail, boot your computer into Safe Mode:

  • For Windows 7 and earlier:
    • Restart your PC and press the F8 key repeatedly during startup.
  • For Windows 8 and 10:
    • Go to Start Menu, then Settings, then Update and Security.
    • Select Recovery, then Advanced Startup, and click "Restart Now."
    • In the reboot options, choose Troubleshoot, then Advanced Options, and select Startup Settings.
    • Restart and select Safe Mode from the list.
  • Attempt to delete the file in Safe Mode.

Solution 4: Delete The File Via Command Prompt 

You can use Command Prompt to delete the file:

  • Press "Windows + R," type "cmd.exe," and press Enter to open Command Prompt.
  • Type 'del' followed by the file path to delete the file.
  • Ensure Windows Explorer is closed to release file locks.
  • Return to Command Prompt and press Enter to execute the command.
  • Restore Taskbar and Start Menu by clicking on Task Manager's "File" tab, selecting "Run New Task," typing "Explorer," and hitting Enter.

Refer to this article to find out how to recover files deleted by chkdsk.

Solution 5: Restart Your PC

When all else fails, consider restarting your computer:

  • Restarting often resolves minor issues and clears RAM.
  • It's a simple and safe solution to try when troubleshooting problems.

Conclusion

While deleting a file in use can be frustrating, these troubleshooting steps should help you resolve the issue. If you encounter persistent problems or accidentally delete important files, consider using specialized recovery software to retrieve them.

About the Author: John Harris

With a decade of experience in data recovery, John Harris, Senior Editor at Remo Software, is your go-to specialist. His focus includes partition management, Windows solutions, and data troubleshooting, delivering insightful content that serves both users and search engines. John's expertise shines through in illuminating blog posts, untangling data loss intricacies across diverse storage platforms.…