To know which process has locked a file, you may use Process Explorer. It can shows you information about which handles and DLLs processes have opened or loaded the file that is locked.
- Click the Find menu, and choose Find Handle or DLL…
- Type the file name (this is the name of the file that you cannot access/delete)
- After typing the search phrase, click the Search button
- Once it returns the list of application that is accessing your file you can either close the application manually or use Process Explorer to terminate it
