Which files are opened by a specific application?

24

3

Is there a way to list all files that are currently opened by a specific process in Windows?

I mean files that got have an fopen, but never got an fclose by a specific process.

I tried to use Sysinternals Process Monitor, but I couldn't figure out how to list the current opened files – but only when the opening happens.

clamp

Posted 2009-09-29T13:29:39.377

Reputation: 1 074

Related question (with relevant answers to this question): http://stackoverflow.com/questions/15708/lsof-equivalent-for-windows

– Anderson Green – 2013-02-22T19:43:04.777

Answers

18

You could try Sysinternals Process Explorer instead of Process Monitor. Process Monitor is design for watching what processes do as they do then. Process Explorer is more for seeing the current state of processes; it's Task Manager but with about 10x the functionality.

Sysinternals also have handle.exe which is a command line tool that tells you which files a process has open.

Dave Webb

Posted 2009-09-29T13:29:39.377

Reputation: 10 126

30

Check out Process Explorer from Sysinternals.

To see the open files for a process, select a process from the list, select the View->Lower Panel View->Handles menu option. All of the handles of type "File" are the open files.

Also, a great way to find which application has a file open is by using the Find->Handle or DLL menu option. Just enter the name of the file you are looking for and hit "Search" to find the processes with a file open matching the search string.

heavyd

Posted 2009-09-29T13:29:39.377

Reputation: 54 755

+1 for addressing his problem with the tools he's using. IMO this should be the correct answer. There is no need to use handle.exe when you are already using and familiar with process explorer. – BoldAsLove – 2018-11-29T16:12:50.750

4

+1 for anything from Sysinternals... btw, a direct link: http://live.sysinternals.com/procexp.exe

– fretje – 2009-09-29T13:33:04.520

5

Process Explorer from Sysinternals is actually pretty useless when it comes to dealing with file handles (as opposed to DLL's, etc.). Use Windows Resource Monitor, click on CPU tab. Next to Associated Handles type the name of the file and you will see who has it open.

Will Nitschke

Posted 2009-09-29T13:29:39.377

Reputation: 51

read @heavyd answer, its not useless. The second part is still a valid solution. – BoldAsLove – 2018-11-29T16:14:41.137

-2

As Dave rightly said, use Process Explorer from SysInternals, apart from that they offer varying set of utils. Checkout: http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx

ssiva

Posted 2009-09-29T13:29:39.377

Reputation: 127