Have you ever tried to close a program or delete a file only to be told that it can't be done because a file is in use? Many programs or processes put locks on files that they have in use so they can't be changed or deleted while the program is accessing them. This is fine and dandy if you are not trying to move or delete a file but if you are then you may find yourself stuck.
This can also be quite annoying because many times you will not be told what program or process has the file locked. Then you usually end up having to reboot your computer to release the lock on the file so you can then delete it. Fortunately there is an easier way to find what program or process is keeping you from doing what you need to do to your files and that is thanks to a free utility called LockHunter.
LockHunter will tell you what process has a lock on your file and can help you get past the lock allowing you to move, rename or delete the file in question. It is capable of removing the locking process form your hard drive and will also let you kill the process that is responsible for the lock. Another nice feature is that you have the option to delete the file right from LockHunter itself. LockHunter offers a 32 and 64 bit version of the program as well.
After you install LockHunter you simply run the program and browse to the location of your locked file.
Once you find the responsible process that has the lock on the file you can click on Unlock It! to have the file unlocked. We have tried this out and it doesn't work 100% of the time so your results will vary. Clicking on Delete It! will allow you to delete the file on the spot assuming LockHunter can unlock it first. The Other option will let you close the locking process that is holding the file or delete the locking process from the disk.
When you attempt to unlock a file you will get a message warning you that you might lose data by performing the unlocking process so make sure you are sure you want to go ahead with the process.
You will get a similar message when trying to delete a file.
If LockHunter is successful at removing the lock on your file then you can continue to go about your business. If not then it looks like it will be time for a reboot!
LockHunter can be downloaded for free from their website.
Using Windows Task Manager