File Watcher Class With Drop Box
<p>I'm trying to write a small utility service that will detect when a item(s) has been added to a synced drop box folder and then wait (to allow full sync) and move item(s) into a date stamped staging folder for further processing.  Simple enough ... </p>

<p>Here is my code: </p>

<pre><code>    static void Main(string[] args)
    {
        var watcher = new FileSystemWatcher();

        string _path = @"E:\IMPORT\Dropbox\";
        watcher.Path = _path;
        watcher.EnableRaisingEvents = true;
        watcher.Created += new FileSystemEventHandler(watcher_Created);


        Console
         .WriteLine("FileSystemWatcher ready and listening to changes in :\n\n" 
                    + _path);

        watcher.Path = _path;
        Console.ReadLine();
    }

    static void watcher_Created(object sender, FileSystemEventArgs e)
    {
        Thread.Sleep(3000);
        Console.WriteLine(e.Name + " file has been created.");

        string filename = Path.GetFileName(e.FullPath);
        string path = @"E:\IMPORT\Staging\" 
                      + DateTime.Now.ToFileTime().ToString() 
                      + @"\";

        try 
        { 
          Directory.CreateDirectory(path); 
        } 
        catch(Exception ex) 
        { 
          Console.WriteLine("Error: " + ex.ToString()); 
        }
        try 
        { 
          File.Move(e.FullPath, path + filename); 
        } 
        catch(Exception ex) 
        { 
          Console.WriteLine("Error: " + ex.ToString());
        }
    }
</code></pre>

<p>This code would work fine if one item was being added to the synced directory, however multiple items will be added and there needs to be a delay for items to be added to the dropbox.  Any ideas on how I can accomplish this ?</p>
