Calculate File Checksum Action
<AMCALCHASH FILE="Text" HASHTYPE="Text" RESULTVARIABLE="Text" />
Generates a hash (checksum) value for a file and places it into the specified AutoMate variable. While CRC is the default algorithm, the actions also supports MD5 and several SHA variants (in order from quickest but least accurate to slowest and most efficient).
Used to validate the integrity of data by calculating a checksum using the selected algorithm. The result is placed in a variable, which can be stored for later validation of the file or compared with an earlier checksum to verify the file's integrity.
Specifies the path and file name for the file.
Specifies the algorithm to use.
CRC: Cyclical Redundancy Checking. Fastest and least secure.
MD5: Message Digest 5. Slower and more secure than CRC.
SHA1: Secure Hash Algorithm-1. Slower and more secure than MD5.
SHA256: Secure Hash Algorithm-256. Slower and more secure than SHA1.
SHA384: Secure Hash Algorithm-384. Slower and more secure than SHA256.
SHA512: Secure Hash Algorithm-512. Slowest and most secure.
Specifies the AutoMate variable to populate with the checksum result.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMCALCHASH FILE="C:\FolderName\FileName.DOC" HASHTYPE="MD5" RESULTVARIABLE="VariableName" />