FileSystemWatcher event handler
-
Hi, I would like to use the FileSystemWatcher to run and external command if a file is renamed. For example, if a file is renamed to *.__old the file is copied to a new location. So far I was able to make it work for 1 or 2 simultanious changes but there could be potentially 50 to 100 changes at the same time and it appears that there is a timeout waiting on the first command to execute. Could someone tell me how I could get the FileWatcher to handle multiple commands at the same time? Thanks....
-
Hi, I would like to use the FileSystemWatcher to run and external command if a file is renamed. For example, if a file is renamed to *.__old the file is copied to a new location. So far I was able to make it work for 1 or 2 simultanious changes but there could be potentially 50 to 100 changes at the same time and it appears that there is a timeout waiting on the first command to execute. Could someone tell me how I could get the FileWatcher to handle multiple commands at the same time? Thanks....
Perhaps your event handler should start a new process for each change and use an asynchronous callback to let the FileSystemWatcher process know that it's done? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.