Hi, I am using a FileSystemWatcher which uses the Created event to listen for when I copy files into this directory. this method is below:
private void fileSystemWatcher1_Created(object sender, System.IO.FileSystemEventArgs e)
{
System.IO.Directory.Move(fileSystemWatcher1.Path+@"\"+e.Name, fileSystemWatcher1.Path + @"\Processing\"+e.Name);
}
The problem is if I copy a big file into this directory, such that it takes about 30 seconds to copy, this method is called as soon as the first byte is written to the folder and tries to move a file which is being used by another process so fails.
Any thoughts?
thanks