Though he did specify batch(so, cmd no doubt). – barlop Jun 19 '14 at 18:58 Barlop you are correct, thanks for mentioning that. I have made changes in my answer. – ani627 Jun 20 '14 at 6:45 DOS Batch Files A batch file was initially just a bunch of commands that you frequently issued. By placing trhem in a file it allowed you to repeat the execution of those commands easily. Commands are executed sequentially in the order they are encountered. By default DOS shows the command, then executes it.
When a script ends with an exit that has no parameter, the exit status of the script is the exit status of the last command executed in the script (previous to the exit).