Solved

C# Directory Monitoring

Posted on 2011-09-06
8
215 Views
Last Modified: 2012-05-12
I need to monitor a directory for changes to files and directories. Ideally i wish to be able to see who has made the changes.

I have been looking at the C# File System Watcher, and that looks good, but i cannot see how i can get the user information? Anyone have any ideas if this is possible to be able to obtain the username of some making changes to a folder or file in C#?
0
Comment
Question by:alnunn
  • 5
  • 2
8 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 250 total points
ID: 36490656
only way that can be done is if the  user list information is stored in the folder and the folder itself was an application


you can use it to determine WHAT was changed but not by who with just that class

http://www.techrepublic.com/article/use-the-net-filesystemwatcher-object-to-monitor-directory-changes-in-c/6165137
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 36490672
0
 
LVL 1

Author Comment

by:alnunn
ID: 36490710
I tought this might be the case. Without creating some standalone application, Is there some library that can be used to maybe assist with this? No way to tie in with process monitoring or something like that?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 22

Expert Comment

by:plusone3055
ID: 36490728
hate to be the bearer but as i said before unless the folder was an application itself with the user database in it you cannot determine on a machine what user last modified a folder

I monitor changes to projects in databases all day only way it can be done is with a database :(

0
 
LVL 12

Assisted Solution

by:rajapandian_81
rajapandian_81 earned 250 total points
ID: 36494758
Hi,

Try File Sight Pro:
http://www.poweradmin.com/file-sight/
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 36495232
as Rajapandin confirmed thats an entire Application
as I have originally stated thats the only possible way
0
 
LVL 1

Author Comment

by:alnunn
ID: 36497705
I'm still unconvinced... That application doesnt appear to store files within an application. It is monitoring a directory, and logging the usage data to a database.

If this application can do what i want to do, i cannot believe there is not an easy enough way of doing this. However, for $199 i'd be inclined to look at that rather than looking at how to code something.
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 36504329
its not a question of storing files.. Its a question of storing user information...

heres an example

you have a a work machine that has a requires a password
10 people know this password

I go in and change a folder at 2pm and change the folder
person number 2 goes in and changes the folder 5 min later
you go in and it says last changed @ 2:05pm

How is it supposed to know who logged in last when were all using the same password to access the machine ???

Answer is it wont beucase there is nothing to unique identify who has logged onto the machine and that particular folder...


No one is trying to trick you.. there just is not a simple way...

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question