If you are a Windows user, then I’m sure that you got “Cannot delete Folder/File” and “The Source File May Be in Use” errors at least a couple of times. Usually you get those errors when the file you want to delete is used by some program or process. Or you might get an “Access Is Denied” error if you are not logged in as administrator and don’t have permission to access that file or folder. However, if you are logged in as administrator and you’re still getting those errors, there are two cool free apps to help you.
Unlocker is a small Windows Explorer extension. It removes file-access restrictions that prevent a user from deleting, moving, or renaming a file. All you need to do is right-click on a file or a folder and select Unlocker.
It will display information about that file, such as Path Locked, PID, Handle, and Process Path. You can select Copy, Move, Rename, or Delete functions for a locked file from the drop-down menu on the left. Select a file and click Unlock to unlock it, or Unlock All to unlock all files on the list. Also you can terminate the process that is locking the file by selecting it and clicking Kill Process.
Sometimes a file cannot be accessed because of Windows file-access bugs that make Windows tell you that a file is in use even if it’s not. Unlocker can effectively bypass this bug's restrictions - it disables whatever is preventing the user to access the file.
Another great tool is LockHunter:
Just like Unlocker, it integrates itself into Explorer right-click menu. It’s especially effective when a file you’re trying to delete is locked by malware. To find out what’s locking the file right-click it and choose What is locking this file? Then it’s pretty straight-forward – click Unlock It! to unlock the file, or Delete It! to remove it.
If you want to delete or close the process that’s locking the file, go to Other and choose the right option. If you’re deleting a process, make sure it’s malware and not a system process. Otherwise you’ll damage your computer. You can check which is which using Fileinspect or Processlibrary.