Back to product page

RemoteCRC method


Requests integrity check of remote file.

Type

A String value. If Blocking is set, returns calculated value received from the server.

Syntax

  • Basic
object.RemoteCRC Type, RemotePath, [FileStart], [FileLength]
The RemoteCRC(object,Type,RemotePath,FileStart,FileLength) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
TypeA IntegrityCheckEnum enumeration. Determines type of integrity check algorithm used.
RemotePathA String value. Holds full path to a file on remote system.
FileStartOptional. A Variant value. Integer value that represents starting position in the file for calculating CRC.
FileLengthOptional. A Variant value. Integer value that represents length of data in the file where CRC is calculated.

Remarks

RemoteCRC method will try to execute command on the server to calculate CRC value of remote file, if server supports such command. For CRC type it will send XCRC command (along with filename, and with start/length if you provided these values). For MD5 type it will send XMD5 command, and for SHA1 type it will send XSHA1 command. If server supports this commands, wodFtpDLX will fire Done event without errors, and provide appropriate checksum value through ListItem property. In blocking mode, this command will also return checksum value.

Please note that not all servers supports integrity check commands.

NOTE: In SFTP protocol there is no internal mechanism for CRC checks. wodFtpDLX will internally try to execute appropriate command (crc32, md5sum, sha1sum, sha256sum and sha512sum) on remote system to obtain the integrity check value. If there is no such command available on the remote, error 30037 will be returned (Not enabled in SFTP protocol). When error is returned, you can try to call RemoteCRC again using different integrity check type.

Platforms

Windows