Compare Files Action
<AMCOMPAREFILES FILEA="Text" FILEB="Text" TYPE="Text" HASHTYPE="Text" />
Compares two files and fails the step if they do not match. Files can be compared based on size, hash values (CRC, MD5 and several SHA variants), creation date, modified date, accessed date, or attributes.
Used to validate backed-up or copied files.
Specifies the path and file name for the first file.
Specifies the path and file name for the second file.
Specifies the type of comparison to be made.
CREATIONDATE: Creation Date
MODIFIEDDATE: Modified Date
LASTACCESSEDDATE: Last Accessed Date
Specifies the algorithm to use. Valid only if CRC/Hash (CRC) is selected as the Compare type.
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.
This action includes the Description tab for entering a 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...
<AMCOMPAREFILES FILEA="C:\FolderA\FileName.txt" FILEB="C:\FolderB\FileName.txt" TYPE="CRC" HASHTYPE="SHA1" />