473,320 Members | 1,993 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,320 software developers and data experts.

Help: FileSystemWatcher weird problem!

Hello,

I have some weird problem with the FileSystemWatcher. I have developed
an application that monitors a network directory for file changes of a
certain file type. The program runs well for a week. Then suddenly the
monitored network server starts to behave crazily. It sends to my Sync
Server dozens of replicated file change events. Say one file was
changed two days ago, but the monitored server still keeps sending me
many many events of that file. It sends me 9000 events in a minutes
and keeps sending me so many events hour by hour. This drives me
crazy!! Our network server is a Windows 2000 Server. It's a important
server that many people here need to access it and modify files on the
monitored directory.

Why that network server keeps sending me false 'file change' event? Is
that some kind of worm? What windows service does FileSystemWatcher
events rely on? I have check the event log, but it doesn't help much.
Please help! THANKS.

Here is some code in my application. I don't think my code have some
problem, because the server can run for serveral days without any
problem. The problem is my sync server got toooo many false events!!

--------------------------
watcher.Path = srcdir; // monitored network directory
watcher.Filter=filetype; //certain file type such as"*.doc"
watcher.IncludeSubdirectories = true;
watcher.NotifyFilter =
NotifyFilters.FileName|NotifyFilters.LastWrite|Not ifyFilters.DirectoryName|NotifyFilters.Size;
watcher.InternalBufferSize=8192*8;

// Setup event handlers
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnDeleted);
watcher.Renamed += new RenamedEventHandler(OnRenamed);
watcher.Error += new ErrorEventHandler(OnError);

// Enable the FileSystemWatcher to notify events
watcher.EnableRaisingEvents = true;
Jul 19 '05 #1
0 2943

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

Similar topics

13
by: David | last post by:
I have been working on trying to write a directory watcher service. One of the requirments is that it be able to watch multiple directories, not sub directories of one parent directory, but just...
3
by: Stampede | last post by:
Hi, I write an application which waits for incomming files in a specified directory. I thought, that using the FileSystemWatcher would be the best, as it does exactly what I need. But now I have...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
1
by: PadovaBoy | last post by:
Hi! I try to develop a simple system for monitoring a sub directory of a web site and remake an xml file every time a sub-dir change it's name. I don't wont to use a window.service because, i want...
2
by: kmcnet | last post by:
Hello Everyone and thanks for your help in advance. I have been battling a problem for nearly a month with the FileSystemWatcher component. Basically, what I am trying to do it to monitor three...
0
by: cxw0106 | last post by:
Hello, I have some weird problem with the FileSystemWatcher. I have developed an application that monitors a network directory for file changes of a certain file type. The program runs well for...
2
by: Ian Toltz | last post by:
I've got a form element (a wizard, actually) which is giving me problems when I try to invoke some of its methods from one of the methods of a filesystemwatcher. Basically the watcher sits there...
5
by: =?Utf-8?B?Sm9obiBT?= | last post by:
I am trying to find out if there is a way to tell if there is already a filesystemwatcher (created by a webservice) monitoring a folder. I have a webservice that creates a filesystemwatcher,...
3
by: pantagruel | last post by:
Hi, the following: FileSystemWatcher watcher = new FileSystemWatcher(); RenderingQ = ConfigurationSettings.AppSettings; //RenderingQ = "C:\\RenditionServerQ\\InjectorQ\\OnDemandQ";...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.