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
Solved

C# Directory Monitoring

Posted on 2011-09-06
8
216 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

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

Suggested Solutions

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

809 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