Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:08:52+00:00 2026-06-04T22:08:52+00:00

Environment: Windows7 64 bit/ C# I have folder named Folder50, which has 50 files

  • 0

Environment: Windows7 64 bit/ C#

I have folder named “Folder50”, which has 50 files inside it. When I copy this folder to the File System watch folder using ctrl + C and ctrl +V commands, sometimes system generating 51 events including the root folder.

But sometimes, system generates just one event for the root folder.

   void onCreated(object source, FileSystemEventArgs e)
   {
        Console::WriteLine( "File: {0} {1}", e.FullPath, e.ChangeType );
   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:08:53+00:00Added an answer on June 4, 2026 at 10:08 pm

    I’ve experimented with the FileSystemWatcher quite a bit and experienced the same issues you’re having. After a bit of research I came to find out this seems to just be the way that it operates. I had some success with setting up timers to ignore additional events if they occurred within a specified time period of the last event, but obviously concurrent copies of different files would be missed as well.

    More weirdness occurs if you watch all of the events available. Copying a file will trigger a delete and new file creation events, and sometimes multiples of each. Saving a file can throw a ton of writes. Overall, FileSystemWatcher is very inconsistent.

    I found some help from the following website, and after a bit of modification to the code it suited my needs.

    http://spin.atomicobject.com/2010/07/08/consolidate-multiple-filesystemwatcher-events/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed Java 1.7.0 in the following folder C:\Program Files\Java . My operating system
I have a SQL Server 2008 in production environment (Windows 2003 -64 bit) and
I'm running the following code on a file that has been uploaded to this
We have a 32-bit .NET application which makes use of the 32-bit version of
I have set JAVA_HOME = C:\Program Files\Java\jdk1.6.0_26 in user defined variables and system variables
I have a small project containing 1 HTML file and 4 JavaScript files. Recently,
I have the following environment: Windows 7 Ultimate 64-bit MS office (with Access) 2010
I have Installshiled script which define CATALINA_HOME as environment Variable initially. same script after
Our production environment runs 3 32-Bit Java 6 JVMs on each Windows 2003 server.
Is it possible in the Windows environment to detect if a file is being

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.