We have an application that needs to download ftp files in a time critical manner. What we need to do, is detect a new file and then download it. This shouldn’t be a problem. However, what happens in the case of a large file - we may detect the file on the ftp server - but it has not finished uploading yet. How do I ensure that I download the entire file?
It’s possible that the FTP server will lock the file until it’s completely written such that download attempts will fail anyway. If not, then you can set the AutoXcrc property = true. Assuming your FTP server supports the XCRC command, it causes the component to automatically issue an XCRC command after downloading the file to check the CRC of the local file against the CRC on the server. If the file on the server is different, the CRC will be different and the download will return a failed status.