title: Watch a Directory and Process Copied Files -Check for Copy Completion and Open Handles
body: <p>I need to watch a directory for image files(jpeg,png,tif,gif,bmp) and process new files placed there.Im trying to implement this using FileSystemWatcher </p>
  
  <pre><code>private void watch()
  {
    FileSystemWatcher watcher = new FileSystemWatcher();
    watcher.Path = path;
    watcher.Filter = "*.*";
    watcher.Changed += new FileSystemEventHandler(OnChanged);
    watcher.EnableRaisingEvents = true;
  }
  </code></pre>
  
  <p>But how can i make sure that the file is copied in full and there is no handle locking the file before trying to open it?</p>