Jugalkumar Kshirsagar asked how to delete a file that Windows insists is open.
For reasons that should be obvious, Windows can’t delete a file—or move one—if it’s in use by a program. The obvious solution is to close the program holding onto the file. But it’s not always clear what program is holding onto that file.
Here are three ways to close the file and move it to the Recycle Bin (or someplace else).
[Have a tech question? Ask PCWorld Contributing Editor Lincoln Spector. Send your query to email@example.com.]
1. Look at the error message
Sometimes, but not always, Windows is good enough to give you the information right away. If the dialog box tells you, for instance, that the file is open in Word, you should have a pretty good idea what to do next.
But if Windows doesn’t offer the information (all too common), you’ll have to find another solution.
2. Use third-party software
There are several utilities that can figure out what program is holding onto your file, name the culprit, and then set the file free for deletion. My favorite is Empty Loop’s free Unlocker, largely because of its Windows/File Explorer integration and its options for how you want to handle the file.
But be warned: If you click the link above in Chrome, the browser will refuse to let you through, warning that “Attackers on www.emptyloop.com might attempt to trick you into installing programs that harm your browsing experience…” Chrome blocks this site because the Unlocker installer has potentially unwanted programs (PUPs), which you can easily avoid while going through the installation wizard. Be careful. Select the Advanced option and refuse any additional programs it wants to install.
You can download Unlocker just fine with any other browser. And even in Chrome, you can download it from Filehippo.
Once installed, you can right-click a stubborn file and select Unlocker to start the process of freeing it up. The Process Path column will tell you which program is holding onto the file, so you can close it. If that doesn’t work, check out the options at the bottom of the window. The pull-down menu on the right lets you select what happens to a file after you free it up. You can then click Unlock to make it erasable. If that doesn’t work, try Kill Process.
3. Reboot into Safe Mode
If Unlocker fails, or if the PUPs worry you, rebooting into Safe Mode will almost certainly do the trick. Whatever holds onto that file won’t be holding it there.