0

I'm writing an application that runs on a file server and monitors files being dropped in a shared folder.

I'm using a FileSystem watcher and it's working well with files, however I would like to process folders as well so if someone drops a folder into the share then it gets zipped up and treated like the files.

I don't know however how to check when all the files in the directory (and sub directories) have finished copying.

My best idea so far has been to start a timer and test every 10 seconds to see if the contents is different from the previous 10 seconds and if any of the files are still locked. Then when no files are locked and the file contents is the same after 10 seconds then process the folder.

Is there a better way of doing this?

Matt
  • 1,436
  • 12
  • 24

0 Answers0