String mode:        @CRC32[s[a|8],string[,start[,length]]]

File mode:        @CRC32[[d,][f,]filename[,start[,length]]]

Binary mode:        @CRC32[[b,]handle[,start[,length]]]


Returns the CRC32 value (using the same algorithm as PKZIP or WINZIP) of the characters in string, the contents of the file filename, or the contents of the binary buffer.


If the first parameter is s for a Unicode UTF16 string, sa for an ASCII string, or s8 for a UTF8 string, any leading or trailing whitespace characters in string are included. If the first argument is a b, the filename argument should be the handle returned by @BALLOC.


If the first argument for file mode is a d, @CRC32 will return the result in decimal (base 10) format. (This is the same format as POSIX 1003.2.) Otherwise, the result is returned in hexadecimal format.


Filename may be specified with or without an optional f. @CRC32 returns -1 if the file does not exist, or it cannot be read.


Since Take Command handles all internal strings as Unicode, @CRC32 will return different results for a string and the identical string in an ASCII file.


See also: @SHA256, @SHA384, @SHA512, and @MD5..




echo %@crc32["C:\windows\explorer.exe"]



echo %@crc32["%comspec"]



echo %@crc32[d,"%comspec"]