FTP File locking How to avoid picking up partial or incomplete files from FTP/sFTP site.

Document created by pete_mccoy1.3055586893899446E12 Employee on Jan 21, 2015Last modified by dave_lesshafft on Mar 1, 2016
Version 2Show Document
  • View in full screen mode
Attempting to pick-up files from a FTP or sFTP site, and  you want to only pickup complete files.
s/FTP protocol, does not provide a standard locking solution for incomplete files.
Possible Solutions to this inherent behavior are:
1. Coordinate the naming of the files so that they would not be picked up by the process until they were complete and renamed. (This would need to be done by whomever places the files on the FTP/sFTP server. For instance filename.tmp while being written, and renamed to filename.txt when complete.  Your search selects *.txt)
2. Coordinate the final location of the files on the FTP/sFTP server. (Again, this would need to be performed by whomever places the files on the server). Once the files are complete, a move command would be issued, and the files would exist in their entirety at the final location.  Your operation is performing it's get from the "Move" folder/location.

 

3.  Check with the FTP/sFTP server administrator to determine if there is some custom locking configuration available for the server/directory where the files reside.

Attachments

    Outcomes