If/End_If
Reference:
Script Editor Program
Alphabetical Command List
Topical Command List
Command Selection List
If -Else-End_If commands allow you to structure your scripts. A single command may test for both the failure and success conditions. They may be nested up to 100 levels deep.
1. An End_if command is always required to terminate an If command. The Else is optional.
2. Conditionals can apply to all actions, or to those associated with each server. This is called the scope. When you include the Each_Server clause, the condition will be applied as the actions for each server are completed. This allows failures to be detected, but limited to the server that failed.
Note: Each_Server can result in unexpected behavior because of the manner in which local actions are handled. The scope includes actions that precede the conditional statement. This may cause purely local actions to be skipped. Please follow this link for more information.
3. The file Present condition does not include a check on the completion status of previous actions. Since compound conditions are not allowed, you must include two If-End_If statements to check for CompletedOK and Present conditions.
4. The Stop command may be used anywhere within an If-End_If, and immediately stops the script when encountered. Otherwise, the script continues processing.
5. The name assigned to a CompletedOK condition may include blanks, but may not exceed 19 characters.