Conditional statements in windows batch

Below example illustrates how to use conditional statements in batch file.
@echo off

IF EXIST cond.bat ECHO File cond.bat exists

IF Not EXIST cond1.bat ECHO File cond1.bat does not exist

set x=100
IF %x%==100 ECHO x is equal to 100

IF Not %x%==101 ECHO x is not equal to 101  

Complex problems, Simple Solutions