Command line options for retrieving all of the files being accessed by a particular program

65 Views Asked by At

I'm trying to access the files being used by a given program in Windows, via a command line prompt in a .bat script. I've found the program Process Monitor, but can't find a CLI way to do this. How might I do this?

1

There are 1 best solutions below

0
yonisha On

What you're looking for is Handle (also from Sysinternals), not Process Monitor. Handle application must run elevated (administrator)

handle -p myproc

Will return all handles for processes begin with the 'myproc'.

handle -pid 1234

Will return all handles for process with pid 1234.

You could also use Process Explorer if you want GUI.