Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to make an application in C#, it should display all the details about a file access. For example,

I have a shared directory in a server say "K:\". and the user-1 , user-2 are accessed file-1 and file-2 in the specified directory. Then I want to get a log like

--------------------.
File opened.......
"K:\file-1" by user-1
---------------------.
File opened.......
"K:\file-2" by user-2

Is there is any option to do this using C#, I tried with "FileSystemWatcher", but there is no event like file opened and username of the accessed user.
Can anyone help me on this?

-Manuprasad M
Posted

1 solution

you can use openfiles.exe[^] to quary the files opened by network users.
you can check below Code project article for more information
Monitoring Access to Your Shared Files on Network[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900