A
Al Reid
I have been asked to write a program to monitor a certain directory
structure and to copy all files created there to optical media for archival
storage. It seems that it would be simple to monitor the directory for
file creation and just copy the files. I am concerned that while doing the
copy a "Created" event may get lost and the file not get archived. How
would I handle this?
Would it be feasible to put the paths of the newly created files into a FIFO
queue and to have a separate thread monitor the FIFO and do the copying?
Would that work? If so, how would I go about creating and running the
separate thread. I've never dealt with threads before. Also, would it be
better to have more that one thread, or is that asking for trouble?
TIA,
structure and to copy all files created there to optical media for archival
storage. It seems that it would be simple to monitor the directory for
file creation and just copy the files. I am concerned that while doing the
copy a "Created" event may get lost and the file not get archived. How
would I handle this?
Would it be feasible to put the paths of the newly created files into a FIFO
queue and to have a separate thread monitor the FIFO and do the copying?
Would that work? If so, how would I go about creating and running the
separate thread. I've never dealt with threads before. Also, would it be
better to have more that one thread, or is that asking for trouble?
TIA,