About

About

Batch files are executable text files created using Windows (NT, XP, VIsta, 7, 8, etc.) command-line commands. The commands (and batch file) are interpreted (run) by the command.exe or cmd.exe interpreter. Batch files can be run in either the DOS command-line window/mode or from a Windows icon.

Batch files are files created with a .bat file extension which can be run in the command line environment of DOS (Command or CMD) as well as in the GUI Windows environment.

Windows batch programs support many of the common programming constructs, e.g. output, math calculations, decision statements, loops, arrays, user input, as well as significant operating systems commands and features.

Similar to Job Control Language (JCL), DCL and other systems on mainframe and minicomputer systems, batch files were added to ease the work required for certain regular tasks by allowing the user to set up a script to automate them. Batch files are still often used in industry today in Microsoft Windows environments to push out and run scripts on computers.

Built-in commands (to cmd.exe) supported in batch programs include:

  • ASSOC
  • BREAK
  • CALL
  • CD
  • CHDIR
  • CLS
  • COLOR
  • COPY
  • DEL
  • DIR
  • DATE
  • ECHO
  • ELSE
  • ENDLOCAL
  • ERASE
  • EXIT
  • FOR
  • FTYPE
  • GOTO
  • IF
  • MD
  • MKDIR
  • MKLINK
  • MOVE
  • PATH
  • PAUSE
  • POPD
  • PROMPT
  • PUSHD
  • RD
  • RENAME
  • REM
  • RMDIR
  • SET
  • SETLOCAL
  • SHIFT
  • START
  • TIME
  • TITLE
  • TYPE
  • VER
  • VERIFY
  • VOL

External commands commands (to cmd.exe) supported in batch programs include:

  • ARP
  • AT
  • ATTRIB
  • BCDEDIT
  • CACLS
  • CHCP
  • CHKDSK
  • CHKNTFS
  • CHOICE
  • CIPHER
  • CLIP
  • CMD
  • COMP
  • COMPACT
  • CONVERT
  • DEBUG
  • DISKCOMP
  • DISKCOPY
  • DISKPART
  • DOSKEY
  • DRIVERQUERY
  • EXPAND
  • FC
  • FIND
  • FINDSTR
  • FORFILES
  • FORMAT
  • FSUTIL
  • GPRESULT
  • GRAFTABL
  • HELP
  • ICACLS
  • IPCONFIG
  • LABEL
  • MAKECAB
  • MODE
  • MORE
  • NET
  • OPENFILES
  • PING
  • RECOVER
  • REG
  • REPLACE
  • ROBOCOPY
  • RUNDLL32
  • SC
  • SCHTASKS
  • SETX
  • SHUTDOWN
  • SORT
  • SUBST
  • SYSTEMINFO
  • TASKKILL
  • TASKLIST
  • TIMEOUT
  • TREE
  • WHERE
  • WMIC
  • XCOPY