How to find out which process is using this file?

When I delete a file that is being used by some process, I get an access denied error stating that the file cannot be deleted because it is currently being used. Is there any way to know which process uses this file in WINDOWS?

+50
windows file conflict
Aug 25 '10 at 11:11
source share
4 answers

For Windows 7 and Windows 8, you can use the built-in resource monitor for this. You can find it by searching for Resource Monitor in the Start menu.
Select the Related Handles section on the CPU tab and enter the file you want.

When you find a process that uses this file, right-click and select "End Process"

enter image description hereenter image description here

If you want to unlock the entire folder or file that is used by any program, you can download the Unlocker program from here

+72
Jun 09 '14 at 18:49
source share

On Windows, you can use handle.exe from Sysinternals:

handle <name of file> 

http://technet.microsoft.com/en-us/sysinternals/default.aspx

On Linux you can use lsof

+13
Aug 25 '10 at 11:13
source share

If you are a developer / system administrator, then at the command line use:

 tasklist /m path\filename.extension 

For example:

 tasklist /mc:\test\test.dll 

to find this process. I used this with *. DLL files. I am not sure about extensions like .avi or .mp3

+7
Jun 24 '13 at 5:41
source share

The fuser and / proc combination should work for linux / unix:

fuser - identify processes using files or sockets

0
Aug 25 '10 at 11:14
source share



All Articles