Click here to Skip to main content
14,390,153 members
Rate this:
Please Sign up or sign in to vote.
See more: , +

I am looking for C# code where I give specific file/directory name, I can get list of information about applications and programs accessed that file in Windows..!

What I have tried:

I've tried with Filesystemwatcher available in VS
Updated 21-Jun-18 5:59am
Richard MacCutchan 21-Jun-18 10:43am
There is no audit trail of file accesses, so FileSystemWatcher is the only option.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't - windows does not keep a record of what applications accessed which file by default.

You may find this interesting though: Auditing File Access on File Servers – Premier Field Engineering[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100