Evaluates a condition and then performs one or more script actions depending
on the results of that condition. For general information on condition
criteria, see Condition
criteria - Introduction
General
An IF-THEN-ELSE statement is essential
in the world of scripting and programming. It evaluates a condition and
then performs an action depending on the outcome of the evaluation. Every
IF-THEN-ELSE statement follows the same structure:
IF
the result is TRUE, then execute action A, else (the result is FALSE) execute action B.
The screenshot below illustrates this principle. In the IF section, the
evaluation criterion is specified. If the variable %CurrentDate% is equal
to 1 January 2006, THEN the action labeled as NEW YEAR is executed. ELSE
(the variable %CurrentDate% is not equal to 1 January 2006), the action
labeled as NOT BEW YEAR is executed.