How to use Exit Command in Batch File

EXIT COMMAND


Purpose:Quits the CMD.EXE program (command interpreter) or the current batch script.

Note:Exit is an internal command if it is executed outside the batch file it close CMD.EXE

Syntax:EXIT [/B] [exitCode]

Prameters:  

/B                specifies to exit the current batch script instead of CMD.EXE.  If executed from outside a batch script, it will                            quit CMD.EXE

exitCode  specifies a numeric number. if /B is specified, sets ERRORLEVEL that number. If quitting CMD.EXE, sets the                        process exit code with that number.


Comments

Popular posts from this blog

How to use DIR Command

How to use DEL/ERASE Command

How to use ENDLOCAL/SETLOCAL