Conditional operators

Conditional operators are operators useful allowing different commands to be interconnected. For example, using conditionnal operators a command can be executed only upon failure of another command.


command1 operator command2 ...

Run two commands linked by a conditional operator:

Operators type

There is four types of conditional operators:

Obviously, there is no limation in the number of conditional operators that can be used in a single line.


Available since

Compatible with cmd.exe, except for the order of process in pipes.

See Also

Specification index, Environment variables