|Purpose:||Terminate batch file processing|
|value||The numeric exit code to return to TCC.|
The CANCEL command ends all batch file processing, regardless of the batch file nesting level. Use QUIT to end a nested batch file and return to the previous batch file.
You can CANCEL at any point in a batch file. If CANCEL is used from within an alias it will end execution of both the alias and any batch files which are running at the time.
The following batch file fragment compares an input line to "end" and terminates all batch file processing if it matches:
input Enter your choice: %%option
if "%option" == "end" cancel