473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Monitoring Directories

Hi All,
I want to watch all fixed drives on a computer.Is there any reliable
way to do that.I am watching for create , delete , change , rename
events for all files and folders.I am using filesystemwatcher but its
not very reliable at all especially for high trafiic activity.I am
using empty string for the filter property.I have changed
internalbuffersize to 32 KB.I don't want to miss any event , if any
event fires two or three times that is not a problem.I in the
notifyfilters i have set that property to
NotifyFilters.Size|NotifyFilters.LastAccess|Notify Filters.LastWrite|NotifyFilters.FileName|NotifyFil ters.DirectoryName|NotifyFilters.CreationTime|Noti fyFilters.Attributes
even after that i am having troubles with word documents especially
when i write into a word document and save it sometimes it fires
changed event and sometimes i am not able to get the event .it is not
showing the internal buferoverflow exception on that time either.and
when i am copying a large directory say having around 13000 files then
internal buffer overflow exception occurs.on msdn site they have given
that with a 4 KB buffer size we can watch change for around 80 files so
may be i have to use very large buffer size.Is there any other Class or
Win32 API available which can do the task so that I must be able to
watch all the events and don't miss any event.Thanks in Advance.

Sep 12 '05 #1
2 1542
Hi rakesh,

The FileSystem watcher API in .NET is not designed for such high
traffic analysis. Your best bet is to use the Win32 Process and Handle
monitoring APIs to track what is going.

However, what ever it is your doing doesn't sound very wise as you'll
overload the OS with such fine grained analysis. If you want you track
file usage, use File System Autiding using SACLs.

Good Luck,
Jan

Sep 12 '05 #2
Hi Ralesh,

Here's an artical about using System Access Control Lists for audit
file system object access:
http://support.microsoft.com/default...310399&sd=tech

Good Luck,
Jan

Sep 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ron Vecchi | last post by:
Hi all, Can someone point me in the direction on this one, resources or examples. I am writing a Windows Service to monitor a folder. When I file is modified within the folder or any subfolders...
0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
1
by: Edward Yang | last post by:
I setup web.config with impersonation="true". On our local server the project works great. I did the same procedures on our staging server, but it failed with an impossible error: Server Error in...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
5
by: Jay Ge | last post by:
I searched this issue in internet, but they still cannot solve my issue, so your help/suggestion will be preciated. this page is placed on serverA, and it will touch files on serverB.(but it...
0
by: AC [MVP MCMS] | last post by:
I have a web application that is throwing a common error, but in a very unusual state. I'm specifically receiving the following error: "Failed to start monitoring changes to 'd:\inetpub\wwwroot'."...
2
by: rakesh_nits | last post by:
Hi All, I want to watch all fixed drives on a computer.Is there any reliable way to do that.I am watching for create , delete , change , rename events for all files and folders.I am using...
1
by: russell.lane | last post by:
This is a health monitoring for web applications / web services question. I'm trying to set up health monitoring for web services and a web application. To start very simply, I want to turn on...
2
by: Alan Bak | last post by:
HI I am running Active Perl on a Windows XP machine. I am hoping to get some advise on a strategy to monitor and copy files that are arriving in a directory and need to be copied to a second...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.