Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

January 24, 2008

Downloading an FTP file that hasn’t finished uploading?

Question:
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?

Answer:
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.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.