?
Solved

C# Directory Monitoring

Posted on 2011-09-06
8
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 500 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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