What commands can we used in a batch file?

All commands that we can use at the DOS prompt can be used in a batch file. We have to follow the same syntax of the commands as we use it at the DOS prompt.
For advanced application of batch programs, the following nine (9) special commands are commonly used. Some of them are used together with special characters.
CHOICE is an external DOS command.
Please ensure the current path statement contains C:\DOS when we need to run a batch program in which the CHOICE command is used.
Brief Description of MS-DOS Batch Commands
CALL Calls one batch program from another.
CHOICE Waits for the user to choose one of a set of choices.
ECHO Displays messages, or turns command-echoing on or off.
FOR Runs a specified command for each file in a set of files.
GOTO Directs MS-DOS to a labelled line in a batch program.
IF Performs conditional processing in batch programs.
PAUSE Suspends processing of a batch program and displays the message “Press any key to continue….”
REM comments (remarks) in a batch file or CONFIG.SYS.
SHIFT Changes the position of replaceable parameters in a batch file.
Scroll to Top