How to test if incoming FTP transfer is done?

I am running OS X Server 10.3. When a file is being FTP’ed into this server, I want to be able to process the file (i.e., print it) AFTER it is completely uploaded.

The problem I am having is that the file busy flag (from “info for”) as well as the locked flag are both FALSE throughout the file transfer. In fact, I am able to copy / open / move the active file (a large PDF) even BEFORE it completely arrives. In my specific case, if I double-click on a PDF in the middle of a lengthy transfer, Acrobat gives an error message about the document being damaged. Once the file is completely transfered, however, Acrobat is able to open the document properly.

Using bash with the “-w” test (“is file writable”) always returns TRUE, so that test is not useful either.

Any thoughts on how to know when the file transfer is completed? I don’t want to have to depend on parsing the FTP log if possible.

Thanks

Jerry