title: Seeing multiple events with Python watchdog library when folders are created
body: <p>I am having issues where I am seeing additional events that I am not expecting. </p>
  
  <p>I am watching the folder <code>C:\Users\kvasko\Downloads\data</code>. If I copy a folder <code>2017\07\25\LogFile.xml</code> I will see the following 3 "created" events, when I would expect to only see 1. If I create the date folder structure ahead of time (but while the application running watching the folders) it will only generate one event like I expect. I never get an event for just a folder creation. It is like the events are being generated for the creation of the folders, but when inspecting the actual event messaged on my <code>on_created(self,event)</code> all three look events look exactly the same. What is going on here?</p>
  
  <p>Here is the sample output and minimum example.</p>
  
  <pre><code>2017-09-22 13:58:10,182 - root - INFO - Watchdog: file created C:\Users\kvasko\Downloads\data\2017\07\25\LogFile.xml
  2017-09-22 13:58:11,184 - root - INFO - Watchdog: file created C:\Users\kvasko\Downloads\data\2017\07\25\LogFile.xml
  2017-09-22 13:58:12,187 - root - INFO - Watchdog: file created C:\Users\kvasko\Downloads\data\2017\07\25\LogFile.xml
  </code></pre>
  
  <p>I would expect:</p>
  
  <pre><code>2017-09-22 13:58:12,187 - root - INFO - Watchdog: file created C:\Users\kvasko\Downloads\data\2017\07\25\LogFile.xml
  </code></pre>
  
  <p>Is there a way to detect if its actually multiple events from folder creation?</p>
  
  <p>The following is my observer configuration. </p>
  
  <pre><code>folder = "C:\\Users\\kvasko\\Downloads\\data"
  observer = Observer(MyProcessHandler(patterns=["*.xml"]), folder, recursive=True)
  observer.start_observer()
  
  os.mkdirs("C:\\Users\\kvasko\\Downloads\\data\\2017\\07\\25")
  shutil.copy2("C:\temp\LogFile.xml", "C:\\Users\\kvasko\\Downloads\\data\\2017\\07\\25")
  
  try:
      while True:
          time.sleep(5)
  except:
      print("Error")
  </code></pre>
  
  <p>The following is my handler class.</p>
  
  <pre><code>import logging
  from watchdog.events import PatternMatchingEventHandler
  
  class MyProcessHandler(PatternMatchingEventHandler):
  
  def on_created(self, event):
      logging.info("Watchdog: file created " + str(event.src_path))
  </code></pre>
  
  <p>Edit:</p>
  
  <p>Here is a minimum working example:</p>
  
  <pre><code>import time
  import os
  import shutil
  import datetime
  from watchdog.observers import Observer
  from watchdog.events import PatternMatchingEventHandler
  
  class   TestEventHandler(PatternMatchingEventHandler):
      def on_created(self, event):
          print (str(datetime.datetime.now()) + " " + str(event))
  
  if __name__ == '__main__':
      path = "C:\\Temp"
      event_handler = TestEventHandler(patterns=["*.xml"])
      observer = Observer()
      observer.schedule(event_handler, path, recursive=True)
      observer.start()
  
      os.makedirs("C:\\Temp\\2017\\07\\25")
      shutil.copy2("C:\\Temp2\\2017\\07\\25\\test.xml", "C:\\Temp\\2017\\07\\25")
  
      try:
         while True:
             time.sleep(1)
      except KeyboardInterrupt:
         observer.stop()
      observer.join()
  </code></pre>
  
  <p>Prints out:</p>
  
  <pre><code>2017-09-22 15:49:51.334262 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  2017-09-22 15:49:52.335468 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  2017-09-22 15:49:53.340998 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  </code></pre>
  
  <p>Edit2:</p>
  
  <p>Change on_created() to on_any_event(). This is what was produced.</p>
  
  <pre><code>2017-09-23 13:14:57.288792 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  2017-09-23 13:14:58.291327 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  2017-09-23 13:14:59.293334 &lt;FileCreatedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  2017-09-23 13:14:59.293334 &lt;FileModifiedEvent: src_path='C:\\Temp\\2017\\07\\25\\test.xml'&gt;
  </code></pre>