Don't scan for files yourself, make the operating system notify you of changes in the filesystem (inotify or similar APIs). Make sure your code starts processing only after a new file (opened for writing) is closed. For inotify, this seems to be indicated by the IN_CLOSE_WRITE event.
Alexander
In reply to Re^3: File::Copy - move() function corrupting files
by afoken
in thread File::Copy - move() function corrupting files
by myelinviolin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |