Ever had a problem deleting, moving, or renaming a file only to get a message box with an error saying something like "The file is in use by another program or user" or that access is denied or a sharing violation has occurred?
To work out what program or process has already claimed ownership of the file you can use Microsoft's Process Explorer program. Process Explorer was written by Mark Russinovich in his Winternals days, but then subsumed in to Microsoft when that company was taken over. The program is regularly updated and available from technet.microsoft.com/en-gb/sysinternals/bb896653.aspx.
Download the application zip file and extract it to your hard disk in a place that you'll remember. The program itself doesn't need to be installed as it is a self contained executable.
Find out which handle or DLL is using a file
- Open Process Explorer.
- Click the “Find” menu and select “Find a Handle or DLL”.
- A search dialog box will open.
- Type in the name of the locked file or other file of interest. Partial names will also work.
- Click the "Search" button.
- A list will be generated.
- An individual file handle in the list can be killed by selecting it and pressing the delete key. However, care is necessary when doing this as you can possibly close required system files and inadvertently blue screen your machine, so tread with care!
If this doesn't work don't forget, just "turning your PC off and on again", will often free a locked file.