Lets see now what to do with errorlevel. This evaluates the current errorlevel number. If condition is true the command is executed. To clarify this, read the next example. This is a complete batch program.
Lets analyze it.
Lines 3 to 7 prints the messages for the program. Line 8 is choice. Note that the text is into quotes. Quotes will not be shown, and are not required. Lines 9 to 12 evaluates the errorlevel.