Have you ever wanted to delete a file, but Windows wouldn’t allow you to do it? These things happen to me all the time, especially when I’m at a client’s house trying to get their machine clean of spyware.
The main reason behind this is that the explorer.exe process locks files that are in use, effectively preventing you from deleting them. Usually, these files should not be touched, but sometimes, situations arise when you really need to get rid of some troublesome ones.
Fortunately, there are a few easy solutions around this problem.
Solution #1: Kill explorer.exe
Solution #2: Use The Windows Recovery Console
Just stick your Windows CD in your CD tray, boot on it, and at the “Welcome to Setup” screen, press “R“. Once the recovery console has started, navigate to the location of your locked file, and delete it.
Solution #3: Use unlocker
Unlocker is a very useful freeware that will allow you to unlock any files that are currently in use by Windows. You’ll know if this is happening if you are getting any of these messages when trying to delete a file:
- Cannot delete file: Access is denied
- There has been a sharing violation
- The source or destination file may be in use
- The file is in use by another program or user
- Make sure the disk is not full or write-protected and that the file is not currently in use
Unlocker will make things right again for you.
You’ll notice that right after installing the software, a new option named “unlocker” will appear when right clicking any files or folders in Windows Explorer. To unlock a locked file, just right click it, select unlocker, and the unlocker software will start. Then, click “unlock all” and close the software. Now that your file is unlocked, just delete it in Windows Explorer, as you always do.
Personally, I find this a much easier solution than the first two options.