Comparing two number in batch script

if cond ( 
...
) else (
...
)

if cond (...) else (...)
if cond (...) else command
if cond (...) else (
    ....
)
if cond (
    ....
) else command

The placement of the parenthesis matters. The if opening parenthesis needs to be on the same line that the if command. The if closing parenthesis needs to be in the same line that the else clause (if present). The else opening parenthesis needs to be in the same line that the else clause.

Leave a Comment