?
Solved

C# Directory Monitoring

Posted on 2011-09-06
8
Medium Priority
?
227 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

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!

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline
Suggested Courses

864 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