Compares two files using the specified criteria and returns TRUE or FALSE depending on the outcome. Very often when you create a task, you want it to perform different actions for different decisions. You can use conditional statements in your code to do this. The If Compare Files is a conditional statements that can perform different actions during the course of a task depending on the result of an expression evaluation. If the result evaluates to TRUE, AWE will execute the block of steps immediately following the If action up until an End If step is encountered, otherwise the block will be skipped (or if an Else statement is encountered it will execute that block of steps). All If actions must be followed at some point with an End If step to mark the end of the code block that is to be executed if the expression is true.
Declaration
<AMIF TYPE="COMPAREFILES" FILEA="FilenameA" FILEB="FilenameB" COMPARETYPE="" HASHTYPE="CRC" />
Example
<AMIF TYPE="COMPAREFILES" FILEA="C:\Documents and Settings\marie.black\My Documents\dungeon.txt" FILEB="C:\Documents and Settings\marie.black\My Documents\bpaserver.txt" COMPARETYPE="CRC" HASHTYPE="CRC" />
See Also: If, If File Exists, If Folder Exists, If Last Step, If Pixel Exists, If Process Running, If Text Contains, If Windows Exists, End If, End Select/Case, Goto, Label, Select/Case
Property |
Type |
Required |
Default |
Markup |
Description |
File A |
Text |
Yes |
(Empty) |
FILEA="C:\FolderA\FileA.txt" |
The file to compare against the one specified in the File B field. You may enter the path and file name manually or click the Folder icon and navigate to the desired file. |
File B |
Text |
Yes |
(Empty) |
FILEB="C:\FolderB\FileB.txt" |
The file to compare against the one specified in the File A field. You may enter the path and file name manually or click the Folder icon and navigate to the desired file. |
Compare Type |
Text |
Yes |
Size |
COMPARETYPE="CRC" |
The criteria to use when comparing the two files. The available options are:
|
Algorithm |
Text |
Yes if compare type is CRC/Hash |
CRC |
HASHTYPE="MD5" |
The Algorithm to use when comparing the two files. Valid only if the Compare Type option selected is CRC/Hash. The available options are:
|