I need to automate the pull(get) of files from a big variety across different FTP services spread on different domains and that receive files on 24/7 basis.
My problem is that FTP services, in general, allow the download of a file while the file is yet being uploaded. This is one of the references to the problem that can be find at internet.
This can lead to incomplete file download.
I try replicate the situation using a windows server and a ftp FileZilla client and got half of the file as expected, so no safe mechanism was in place to prevent this. So maybe simple there is no way to prevent it from the client side.
So my question is if there is some anchor, something my client can test to check for sure that the ftp server already as the totality of the file.
I found hard to believe that a protocol has old as ftp don't provide safe mechanism, so i must be missing something, or this it is by design.
Update I am developing the automation in C#, but any technical tip can help. The solution need to bee fool prof because it is critical for the business.
update2 The upload are made by the many different clients, so it is impossible to establish a convention with all.
update3 This question is similar to question How to detect that a file is being uploaded over FTP, but has the additional restriction presented at update2.