[TriLUG] Scripting & C++ question

Brian McCullough bdmc at bdmcc-us.com
Fri Nov 11 23:35:41 EST 2005


On Fri, Nov 11, 2005 at 05:50:47PM -0500, Mark Freeze wrote:
> 
> My situation is that I want to monitor an incoming ftp directory and
> process files as they complete the upload.
> 
> My next challenge, which was discussed a couple of months ago, but I
> still don't have a good handle on, is how to monitor the directory for
> the files and know that the ftp session had ended, indicating that all
> of the files are uploaded.  Some days we may have 1 file, but some
> days we may have five 50mb files that need to be processed
> individually and then concatenated before the next step is taken. I've
> still got to figure out how to handle that one...


One solution, off the top of my head, is to create a, basically, zero
length file and transfer that _after_ you have transferred either each
data file, or all of the data files, as you wish.  Your "watcher" then
watches for the "semaphore" file, rather than the data file.


Brian



More information about the TriLUG mailing list