5

I'm looking for a way to find out which file a program reads or modifies and save all that to a log file. This is a pretty simple task by itself, but I can't find any apps that do it, surprisingly.

Required features:

  • Filter by process or only show activity for the selected process;
  • Show full path of the accessed file;
  • Show operation type (read/write);
  • Write log in real time.

Time of operation would be nice, but not necessary.

There are apps like Process Explorer which kinda show the file handles for a moment, but they don't provide logging, so most of the operations are missing from display and it's somewhat difficult to automate saving the view to file every second, so it's a no-go.

The OS is Windows 7.

  • What about Process Monitor. Have you looked into that? – rrirower Dec 15 '14 at 13:37
  • Which OS are you looking to do this for and are you looking to deploy to users machines or are you testing one specific programme? – Steve Barnes Dec 15 '14 at 14:00
  • @rrirower I couldn't get it to run. It says "Process Monitor is obsolete now, so use Process Explorer instead" and shuts down. I was very upset. Oh wait you just linked to a working version :D This is actually great! – user1306322 Dec 15 '14 at 16:19
  • I don't know why that is. I just ran it on Windows 8.1 and it ran correctly. Are you using the latest version? – rrirower Dec 15 '14 at 16:21
  • @rrirower you can post an answer with that. This is a fine tool to get just what I want. – user1306322 Dec 15 '14 at 16:29
3

Windows Sysinternals provides a tool called Process Monitor. The name is unfortunate because it is often confused with "Process Explorer". However, it has the features you've requested including filtering and logging.

| improve this answer | |
2

You can monitor a given process including which files are open and counters for the number of bytes written and read by using python + psutil and log the results to a file at whatever rate you choose.

The psutil file io counters are in Process io_counters() and there is the list of files open in process open_files().

Both python and psutil are cross platform, free, open source tools.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.