Question

How to know the process that blocked a file in windows, e.g.: when trying to delete a file that is in use, how to know the process that using that file?

Was it helpful?

Solution

Use Microsoft/Sysinternal's ProcessMonitor. Used to be file FileMon but I think everything is merged in ProcessMonitor now.

OTHER TIPS

I had faced the same issue. I use Process Explorer for this. This is free and is like a task manager tool with advanced features.

Just press Ctrl+F or select Find and type the full or part name of the file or drive you're looking for. Select the file from the search result. This will take you to the bottom part of the window showing the file and the process which is keeping it open.

Just right click and select Close Handle. It will ask for yes / no, select yes and you're done. This tool can also be used if you're unable to safely remove a pen-drive or similar hardware. Just search for the drive letter (eg. G:) and close all the open handles.

Please ensure that you don't mis-use this tool to close handles to system files, sabotage a system or cause harm to someone.

Hope this helps!

Vivek

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top