<< back to sysax.com Product page

4.3. Verifying Downloads and Uploads

The FTPDownloadV method can be used to download a file and verify that the downloaded file is identical to the file on the remote server by comparing the CRC, MD5, or SHA hash. In the same way, the FTPUploadV method can be used to upload a file and verify that the uploaded file is identical to the local file. The "bycrc", "bymd5", or "bysha1" keywords are used to specify the type of verification to be used.

Exhibit 4.5. IDL Definition of method to verify downloads and uploads


HRESULT FTPDownloadV ([in] BSTR b_bycrcmd5sha1, [in] BSTR b_filefolder, [in] BSTR b_remotename, [in, defaultvalue("")] BSTR b_localname);
HRESULT FTPUploadV   ([in] BSTR b_bycrcmd5sha1, [in] BSTR b_filefolder, [in] BSTR b_localname, [in, defaultvalue("")] BSTR b_remotename);


Exhibit 4.6. Example usage of method to verify downloads and uploads (VBScript)


'download a file and verify using a crc hash
app.FTPDownloadV "bycrc", "file", "myfile.txt", ""

'upload a file and verify using md5 hashing
app.FTPUploadV "bymd5", "file", "myfile.txt", ""