nbrege Posted May 15, 2006 Posted May 15, 2006 I have set up a FileSystemWatcher component in my program to watch a certain folder for new files. It is working fine except that it is firing 2 or 3 times whenever a new file is created in the watched folder, which is causing problems elsewhere in my program. Is there a way in which I can set the FileSystemWatcher component to fire only once for each new file that gets created? I have tried changing the .NotifyFilter property to the various options, but I still get the multiple events firing. Thanks for any help... Quote
Leaders snarfblam Posted May 16, 2006 Leaders Posted May 16, 2006 Which event(s) are being fired, and how are the files being created/placed? Quote [sIGPIC]e[/sIGPIC]
nbrege Posted May 16, 2006 Author Posted May 16, 2006 The files are just text files that are created with notepad. How do I determine which events are being fired? Quote
Leaders snarfblam Posted May 20, 2006 Leaders Posted May 20, 2006 Are the files being saved over? Newly created? Any copying? And the best way to determine which events are being fired is to handle them. You can throw a MessageBox or something in the handler to tell you that the event was fired. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.