FTP and local file compare lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cybersmyth · 2011-03-22 11:29 This might be a really dumb question, but I just want to make sure... I'm working on an FTP client using lNet and want to be sure uploads and downloads complete fully. My thought is to do a FTP listing and compare the file size of the local file to the remote file to verify it uploaded fully. Is the workable? Are there any situations where a file might have uploaded properly but the directory listing would show a different size than the local file? Thanks! -Joe ---------------------------------------------------------------------- joseme · 2011-03-22 17:02 Your proposal is workable, but if you want to cath file corruption I think you can use Ciclic Redundance Check, putting a small text file with the CRC of files to download, and later calculating the CRC for the received files and comparing. ---------------------------------------------------------------------- TurboRascal · 2011-03-22 20:18 It is possible that there is some difference in filesize counting, but I believe if both are got in bytes it should be ok. CRC is not a bad idea for file upload, although there is no similar possibility to check downloads. And there is always a risk of getting a corrupted download, even when bytesizes are identical (bit flipping errors etc.) and there is no way to check for that.