 |
The Question is:
I am planning to forward a file that is being copied into a directory to which
I have access. My forwarding job will run periodically. How do I ensure that
I am not forwarding (i.e. copying via COPY) a file that is in the process of
being received?
The Answer is :
The FTSO package would be one approach. Capturing and processing the
file lock error would be another, and such error handling is generally
recommended regardless of other steps taken. Using a transfer that
renames the arriving file after it has completed the transfer would
be a third. Using a stub file or another notification mechanism from
the remote node, after the completion of the transfer, would be another
obvious option. Or, of course, you could have the local node pull the
file via FTP (directly, via http, or otherwise).
Using FTP to transfer the file to a temporary name and then have FTP
do a rename after it completes will remove most of the access contention
issues, and guarantee that you will not inadvertantly process an incomplete
file resulting from a problem with the FTP transfer.
This question is related to Ask The Wizard topics (4818) and (5527).
|