On Windows 10, my build process is copying a read-only file to several different locations. once in a few builds, the original file becomes writable and its "modified date" updates.

I'm trying to find which process or command touches the file. Are there any methods to do that? Here's my unlucky experience with sysinternals Process Monitor (ProcMon): Filter setting:

ProcMon filter settings

Note, the only filters are for the file path - I've deleted all the defaults. So, nothing should be hidden by ProcMon.


ProcMon run

There is a clear WriteFile operation. Is there any reason why the system would touch the file's date?

I've posted the question here since it seems like a file system issue.

  • When the date is modified, does the file's contents change too? A hash (crc/md5/etc) is different? – Xen2050 Feb 10 at 9:17
  • No, file remains the same. – gil_mo Feb 10 at 10:32
  • Assuming your filters in procmon are set correctly, the only reason I can think of why procmon doesn't show you what happened is because it's not set at the right altitude. Note that this would also mean that the lower level driver doesn't pass the event up to the chain. All unlikely but it's something you might want to try. – Lieven Keersmaekers Feb 10 at 11:56
  • 1
    ProcMon shows all file activity, you’re not using it right if you aren’t seeing the event, or the event didn’t happen. – Appleoddity Feb 10 at 15:06
  • 1
    The filter `path is C:` will only show paths that are exactly C:\. You probably mean to use the condition begins with. If you want to find operations on the file temp.txt, use the condition contains "temp.txt" – Twisty Impersonator Feb 10 at 18:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.