EXIT

RECENT NEWS

12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...

TESTIMONIALS

Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...

More...

EXIT

Exits the current batch file or the command processor.

Syntax:

EXIT [/b] [ExitCode]

/b – exits the current batch file instead of exiting the command processor.

ExitCode – sets the ERRORLEVEL while exiting the batch file or the process exit code while exiting the command processor.

Usage:

After exiting the script or command processor the execution process returns to the program called the batch file or command processor.

You cannot set ERRORLEVEL value using SET command. EXIT command is the right way to set the ERRORLEVEL value.

Examples:

Quite current batch file with ERRORLEVEL 3:

EXIT /b 5

 

Subscribe batch files programming newsletter (no spam):

Subscribe

Unsubscribe