Process Explorer is a fantastic alternative to Task manager.
Process Explorer Main Screen
Ever wondered which program has a particular file or directory open? Now you can find out. Process Explorer shows you information about which handles and DLLs processes have opened or loaded.
This freeware program is excellent when you get those annoying error messages
Annoying message given by Windows
Its called Unlocker and basically it can run in the background or it can be run manually so that when you delete a file it will let you know if any processes have a lock on that file or not.
Unlocker Right-Click Menu
It then allows you to kill that process and delete the offending file.