Last modified on 7 July 2009, at 00:26

Guide to Windows Commands/Batch File Scripting

Batch File ScriptingEdit

This section covers the following commands:

  • CALL - Calls one batch program from another.
  • CMD - Starts a new instance of the Windows command interpreter.
  • ECHO - Displays messages, or turns command echoing on or off.
  • ENDLOCAL - Ends localization of environment changes in a batch file.
  • EXIT - Quits the CMD.EXE program (command interpreter).
  • FOR - Runs a specified command for each file in a set of files.
  • GOTO - Directs the Windows command interpreter to a labeled line in a batch program.
  • IF - Performs conditional processing in batch programs.
  • PAUSE - Suspends processing of a batch file and displays a message.
  • REM - Records comments (remarks) in batch files or CONFIG.SYS.
  • SETLOCAL - Begins localization of environment changes in a batch file.
  • SHIFT - Shifts the position of replaceable parameters in batch files.
  • START - Starts a separate window to run a specified program or command.