Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

7/8/2015 Batch files and batch commands

Batch Files & Batch Commands

(DOS) commands and their usage in batch files
 

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Available in
Command Function
DOS Win9x NT OS/2

ACINIUPD Modify INI files (TS only) N N Y N

Text attributes, cursor & keyboard
ANSI.SYS Y N N Y
manipulation

Allows programs to open data files in
APPEND specified directories as if they were in the Y Y Y Y
current directory (DOS)

ARP (http://technet.microsoft.com/en­ Display or modify IP­to­Physical address Y (http://technet.microsoft.com/en­


N Y Y
us/library/bb491071.aspx) translation tables used by ARP us/library/bb491071.aspx)

Associate a file extension with a file
ASSOC N N Y N
type, or list all associations

AT Command line scheduler N N Y Y

ATTRIB List & manipulate file attributes Y Y Y Y

Suppress network connection error
AUTOFAIL N N N Y
messages at startup

Backup files to floppy disks (requires
BACKUP RESTORE from the exact same DOS Y Y N Y
version)

BASICA Basic interpreter for IBM PC­DOS Y N N N

Sets properties in boot database to
BCDEDIT N N W7 N
control boot loading (Windows 7)

BOOTCFG Edit Windows boot settings in
N N XP (http://support.microsoft.com/kb/291980) N
(http://support.microsoft.com/kb/291980) BOOT.INI (XP)

Enable/disable extended Ctrl+C
BREAK Y Y Y Y
checking (16­bits)

CACLS Read and set file access permissions N N Y N

Run a batch file from within another
CALL Y Y Y Y
batch file

Show or change the current directory
CD Y Y Y Y
(same as CHDIR)

Write ISO images to CD (Windows
CDBURN N N 2K3RK N
Server 2003 Resource Kit tool)

CERTREQ (http://technet.microsoft.com/en­ Request certificates from a certification Y (http://technet.microsoft.com/en­


N N N
us/library/cc755435.aspx) authority (Windows Server 2003) us/library/cc755435.aspx)

CERTUTIL (http://technet.microsoft.com/en­ Manage certificates (Windows Server Y (http://technet.microsoft.com/en­


N N N
us/library/cc773087.aspx) 2003) us/library/cc773087.aspx)

Change TS port mappings, install mode,
CHANGE N N TS N
or enable/disable TS logon

CHCP Display or set the active Code Page Y Y Y Y

Show or change the current directory
CHDIR Y Y Y Y
(same as CD)

CHGLOGON Enable/disable TS logon N N Y N

CHGPORT Change TS port mappings N N TS N

CHGUSR Change TS install mode N N TS N

Check a disk for file system errors or bad
CHKDSK Y Y Y Y
sectors

Display or modify the checking of disk
CHKNTFS N N Y N
at boot time

Prompt user for to choose option from list

http://www.robvanderwoude.com/batchcommands.php 1/8
7/8/2015 Batch files and batch commands
CHOICE of choices 6 Y N N

CIPHER (http://technet.microsoft.com/en­ Display or alter the encryption of Y (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) directories [files] on NTFS partitions us/library/bb491071.aspx)

Automate cleanup of temporary files, IE
CLEANMGR
cache, downloaded files & recycle bin N N XP (http://support.microsoft.com/kb/315246) N
(http://support.microsoft.com/kb/315246)
(XP)

CLS Clear the screen/window Y Y Y Y

CMD.EXE Command interpreter (32­bits) N N Y Y

CMDKEY 2K3
(http://www.markwilson.co.uk/blog/2008/12/managing­ Manage stored user names and passwords (http://www.markwilson.co.uk/blog/2008/12/managing­
N N N
stored­credentials­from­the­windows­command­ (Windows Server 2003 and later) stored­credentials­from­the­windows­command­
prompt­using­cmdkey.htm) prompt­using­cmdkey.htm)

Change text and background color in
COLOR N N Y N
console

COMMAND.COM Command interpreter (16­bits) Y Y Y Y

COMP Compare files Y Y Y Y

Display or modify file compression on
COMPACT N N Y N
NTFS partitions

Command interpreter specification in
%COMSPEC% Y Y Y Y
master environment

CONTROL Start Control Panel or a Control Panel
N Y Y (http://support.microsoft.com/kb/180025) Y
(http://support.microsoft.com/kb/180025) applet

CONVERT Convert a FAT volume to NTFS N N Y N

COPY Copy files Y Y Y Y

CPROFILE (http://technet.microsoft.com/en­ Clean profiles of wasted space (Windows 2K3 (http://technet.microsoft.com/en­


N N N
us/library/cc772693.aspx) Server 2003) us/library/cc772693.aspx)

Console mode interpreter for
CSCRIPT N Y Y N
VBScript/JScript

CSVDE (http://technet.microsoft.com/en­ Import/export data from Active Directory 2K (http://technet.microsoft.com/en­


N N N
us/library/cc772704.aspx) in CSV format us/library/cc772704.aspx)

Redirect all input and output to a file or
CTTY Y N N N
(serial, parallel or null) device

DATE Display & manipulate system date Y Y Y Y

DEBUG Debugger & assembler Y Y Y Y

Locate and consolidate fragmented boot
DEFRAG (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
files, data files, and folders on local Y Y N
us/library/bb491071.aspx) us/library/bb491071.aspx)
volumes

DEL Delete one or more files Y Y Y Y

Delete an entire folder including files
DELTREE Y Y N N
and subfolders

Command line Device Manager (free
Microsoft download
DEVCON N N Y N
(http://support.microsoft.com/default.aspx?
scid=kb;EN­US;Q311272) )

DHCPLOC (http://technet.microsoft.com/en­ XP (http://technet.microsoft.com/en­
Discover rogue DHCP servers N N N
us/library/cc759117%28WS.10%29.aspx) us/library/cc759117%28WS.10%29.aspx)

Compress and add files to new or
DIANTZ
existing .CAB files(equivalent of N N Y (http://www.microsoft.com/msj/archive/S326.aspx) N
(http://www.microsoft.com/msj/archive/S326.aspx)
MAKECAB)

DIR List files & directories Y Y Y Y

Compare two floppy disks on a track by
DISKCOMP Y Y Y Y
track basis

Copy a floppy disks on a track by track
DISKCOPY Y Y Y Y
basis

DISKPART (http://technet.microsoft.com/en­ Manipulate harddisk partitions and 2K (http://technet.microsoft.com/en­


N N N
us/library/cc773140.aspx) logical drives us/library/cc773140.aspx)

Edit or recall command lines, or create
DOSKEY Y Y Y Y
command line macros

Allows programs to open data files in
DPATH specified directories as if they were in the N N W7 Y
current directory (Windows 7, OS/2)

DRIVERQUERY List installed drivers (Windows XP) N N XP N

DSADD Add objects to (active) directory N N 2K N

Display (active) directory object

http://www.robvanderwoude.com/batchcommands.php 2/8
7/8/2015 Batch files and batch commands
DSGET properties N N 2K N

DSMOD Modify objects in (active) directory N N 2K N

Move or rename objects in (active)
DSMOVE N N 2K N
directory

DSQUERY Query (active) directory N N 2K N

DSRM Remove object from (active) directory N N 2K N

Write ISO images to DVD (Windows
DVDBURN N N 2K3RK N
Server 2003 Resource Kit tool)

ECHO Display text on screen Y Y Y Y

Text editor in MS­DOS 5+ (requires
EDIT Y Y Y N
QBASIC)

EDLIN Line editor in MS­DOS 4­ Y N N N

ENDLOCAL Terminate local environment N N Y Y

Elevated Priviliges Application
EPAL (http://technet.microsoft.com/en­ Launcher (free Microsoft download Y (http://technet.microsoft.com/en­
N N N
us/library/bb727155.aspx) (http://www.microsoft.com/en­ us/library/bb727155.aspx)
us/download/details.aspx?id=4625) )

ERASE Delete one or more files Y Y Y Y

EVENTCREATE
XP (http://technet.microsoft.com/en­
(http://technet.microsoft.com/en­ Write an event in one of the event logs N N N
us/library/bb490899.aspx)
us/library/bb490899.aspx)

EVENTQUERY.VBS
XP (http://technet.microsoft.com/en­
(http://technet.microsoft.com/en­ List events and event properties N N N
us/library/bb490900.aspx)
us/library/bb490900.aspx)

EVENTTRIGGERS Display and configure "Event Triggers"
XP (http://technet.microsoft.com/en­
(http://technet.microsoft.com/en­ that monitor and act upon the occurrence N N N
us/library/bb490901.aspx)
us/library/bb490901.aspx) of NT Log Events of given criteria

Terminate a batch file or command
EXIT Y Y Y Y
prompt

EXPAND (http://technet.microsoft.com/en­ Expand compressed files or folders on Y (http://technet.microsoft.com/en­


N N Y
us/library/bb491071.aspx) NTFS volumes us/library/bb491071.aspx)

EXPLORER Open a folder in an Explorer window N Y Y N

EXTRACT Extract compressed files N Y Y N

Convert .EXE files to binary format
EXE2BIN Y Y Y Y
(DOS)

Open DOS programs faster by
FASTOPEN memorizing their locations on disk Y Y Y Y
(DOS)

FC Compare files Y Y Y Y

Manipulate harddisk partitions and
FDISK Y Y N Y
logical drives

FILEVER Display a program file's version N N Y N

FIND Search files or standard output Y Y Y Y

FINDRAMD Find the RAM drive letter N Y N N

Search files or standard output with
FINDSTR N N Y Y
advanced options

FOR Loop through a set of files or variables Y Y Y Y

FORCEDOS (http://technet.microsoft.com/en­ Force XP to start the specified program in XP (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) the MS­DOS subsystem us/library/bb491071.aspx)

http://www.robvanderwoude.com/batchcommands.php 3/8
7/8/2015 Batch files and batch commands
FORFILES (http://technet.microsoft.com/en­ Selects and executes a command on a file N N 2K3 (http://technet.microsoft.com/en­ N
us/library/cc753551%28WS.10%29.aspx) or set of files us/library/cc753551%28WS.10%29.aspx)

FORMAT Format disks (intialize file system) Y Y Y Y

FSUTIL (http://technet.microsoft.com/en­ XP (http://technet.microsoft.com/en­
Manage FAT and NTFS file systems (XP) N N N
us/library/bb491071.aspx) us/library/bb491071.aspx)

FTP File Transfer Protocol client N N Y Y

Display or define the "Open" command
FTYPE N N Y N
for a file type

GETMAC (http://technet.microsoft.com/en­ Display MAC address for local or remote XP (http://technet.microsoft.com/en­


N N N
us/library/bb490913.aspx) network adapters (XP and later) us/library/bb490913.aspx)

Queries the OS type, version or SP and
GETTYPE (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
returns it as an errorlevel (Resource Kit N N N
us/library/cc773104.aspx) us/library/cc773104.aspx)
tool)

GOTO Jump to a label or subroutine Y Y Y Y

Enable display of extended character set
GPRESULT N N XP N
in graphics mode

Enable display of extended character set
GRAFTABL Y Y Y Y
in graphics mode

Basic interpreter for MS­DOS up to
GWBASIC Y N N N
version 4

HELP Display help text for a command Y Y Y Y

Display, modify, backup, or restore
ICACLS ACLs for files and directories N N W7 N
(Windows 7)

IEXPRESS
XP (http://renegadetech.blogspot.com/2006/07/how­
(http://renegadetech.blogspot.com/2006/07/how­to­ (Installation) script packager (XP) N N N
to­convert­bat­file­or­vbs­file.html)
convert­bat­file­or­vbs­file.html)

IF Test statement Y Y Y Y

IFCONFIG Configure network adapters N N N Y

INUSE
Y (http://www.microsoft.com/downloads/details.aspx?
(http://www.microsoft.com/downloads/details.aspx? Replace locked files on the next reboot
N N FamilyID=3a9927b6­0b0a­4261­b29b­ N
FamilyID=3a9927b6­0b0a­4261­b29b­ (Resource Kit tool)
3e78aa7618ac&displaylang=en)
3e78aa7618ac&displaylang=en)

IPCONFIG (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
Configure network adapters N Y N
us/library/bb491071.aspx) us/library/bb491071.aspx)

Command line scheduler for Windows
JT N N 2K N
2000 and later (Resource Kit utility)

LABEL Show or set a disk's volume label Y Y Y Y

Tells the FOR command to use either
LFNFOR N Y N N
"8.3" or long file names

Load TSRs in high memory (same as
LH Y Y N N
LOADHIGH)

LOADHIGH Load TSRs in high memory (same as LH) Y Y N N

Grant 16­bits DOS programs direct
LOCK N Y N N
access to a disk

LOGMAN (http://technet.microsoft.com/en­ Command line Performance Monitor W2K8 (http://technet.microsoft.com/en­


N N N
us/library/cc753820%28WS.10%29.aspx) management tool us/library/cc753820%28WS.10%29.aspx)

Logoff/terminate Windows TS sessions
LOGOFF N N TS Y
or (local) OS/2

Compress and add files to new or
MAKECAB (http://dennisbareis.com/makemsi­ Y (http://dennisbareis.com/makemsi­
existing .CAB files (equivalent of N N N
manual/makecab_exe.htm) manual/makecab_exe.htm)
DIANTZ)

Create a new (sub)directory (same as
MD Y Y Y Y
MKDIR)

Check memory usage (MS­DOS and 16­
MEM Y Y Y Y
bits sessions only)

Create a new (sub)directory (same as
MKDIR Y Y Y Y
MD)

MKLINK (http://technet.microsoft.com/en­ W7 (http://technet.microsoft.com/en­
Create a symbolic link N N N
us/library/cc753194%28WS.10%29.aspx) us/library/cc753194%28WS.10%29.aspx)

MODE Configures system devices Y Y Y Y

MORE Displays output one screen at a time Y Y Y Y

MOUNTVOL (http://technet.microsoft.com/en­ Create, delete or list volume mount XP (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) points (XP) us/library/bb491071.aspx)

http://www.robvanderwoude.com/batchcommands.php 4/8
7/8/2015 Batch files and batch commands
MOVE Move or rename files or folders Y Y Y Y

Query for basic system configuration
MSD Y Y N N
information (MS­DOS 6 & 7)

Send a popup message to TS
MSG N N TS N
users/sessions

Install, modify, and perform operations
MSIEXEC on Windows Installer from the command N Y Y N
line

MSINFO32 Query for basic system configuration
N Y 2K (http://support.microsoft.com/kb/255713/en­us) N
(http://support.microsoft.com/kb/255713/en­us) information (Windows 2000+)

NBTSTAT (http://technet.microsoft.com/en­ Display protocol statistics and current Y (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) TCP/IP connections using NBT us/library/bb491071.aspx)

NET Command line NetBIOS tool N Y Y Y

Manage domains and trust relationships
NETDOM (http://technet.microsoft.com/en­ XP (http://technet.microsoft.com/en­
(join computers to a domain, rename N N N
us/library/cc737599.aspx) us/library/cc737599.aspx)
computers, and more)

Command line network configuration
NETSH N N XP N
tool for Windows XP and later

Y Y
NETSTAT (http://en.wikipedia.org/wiki/Netstat) Command line NetBIOS tool N Y (http://en.wikipedia.org/wiki/Netstat)
(http://en.wikipedia.org/wiki/Netstat) (http://en.wikipedia.org/wiki/Netstat)

NLTEST (http://technet.microsoft.com/en­ Command line Netlogon management XP (http://technet.microsoft.com/en­


N N N
us/library/cc786478%28WS.10%29.aspx) tool us/library/cc786478%28WS.10%29.aspx)

Text editor (GUI editing, command line
NOTEPAD N Y Y N
& GUI printing)

NSLOOKUP (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
Diagnose DNS infrastructure N N N
us/library/bb491071.aspx) us/library/bb491071.aspx)

NTBACKUP (http://technet.microsoft.com/en­ Backup files to any Windows supported Y (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) media us/library/bb491071.aspx)

OCSETUP (http://technet.microsoft.com/en­ Windows Optional Component Setup Vista (http://technet.microsoft.com/en­


N N N
us/library/cc766272%28WS.10%29.aspx) (Windows 7) us/library/cc766272%28WS.10%29.aspx)

ODBCCONF MDAC ODBC configuration tool N N Y N

OPENFILES (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
List or disconnect open files and folders N N N
us/library/bb491071.aspx) us/library/bb491071.aspx)

Display or change the program search
PATH Y Y Y Y
path

PATHPING (http://technet.microsoft.com/en­ 2K (http://technet.microsoft.com/en­
Extended PING utility N N N
us/library/bb491071.aspx) us/library/bb491071.aspx)

PAUSE Wait until a key is pressed Y Y Y Y

Detects floating point division error (if
PENTNT (http://technet.microsoft.com/en­ present) in the Pentium chip, disables Y (http://technet.microsoft.com/en­
N N N
us/library/bb491071.aspx) floating point hardware, and turns on us/library/bb491071.aspx)
floating point emulation

PING (http://technet.microsoft.com/en­ Check the TCP/IP connection to a remote Y (http://technet.microsoft.com/en­


N Y Y
us/library/bb491071.aspx) IP address us/library/bb491071.aspx)

PING6 (http://technet.microsoft.com/en­ Y (http://technet.microsoft.com/en­
IPv6 version of PING N N N
us/library/bb491071.aspx) us/library/bb491071.aspx)

PKGMGR (http://technet.microsoft.com/en­ Vista (http://technet.microsoft.com/en­
Command line package manager N N N
us/library/cc749465%28WS.10%29.aspx) us/library/cc749465%28WS.10%29.aspx)

Move back to the last directory that was
POPD N N Y Y
"pushed" on the stack by PUSHD

POWERCFG Configure power management (Windows
N N 2K3 (http://support.microsoft.com/kb/324347/en­us) Y
(http://support.microsoft.com/kb/324347/en­us) Server 2003)

PRINT Print a text file Y Y Y Y

Shorthand command for RUNDLL32
PRINTUI.EXE PRINTUI.DLL,PrintUIEntry Y Y W7 Y
(Windows 7)

PRNCFG.VBS (http://technet.microsoft.com/en­ Configure or display printer 2K (http://technet.microsoft.com/en­


N N N
us/library/cc725833.aspx) configuration information us/library/cc725833.aspx)

PRNDRVR.VBS
2K (http://technet.microsoft.com/en­
(http://technet.microsoft.com/en­ Add, delete, or list printer drivers N N N
us/library/cc754632.aspx)
us/library/cc754632.aspx)

PRNJOBS.VBS (http://technet.microsoft.com/en­ 2K (http://technet.microsoft.com/en­
Pause, resume, cancel, or list print jobs N N N
us/library/cc753980.aspx) us/library/cc753980.aspx)

PRNMNGR.VBS Add, delete, or lists printers or printer
2K (http://technet.microsoft.com/en­
(http://technet.microsoft.com/en­ connections; set or display default N N N
us/library/cc725868.aspx)
us/library/cc725868.aspx) printer

PRNPORT.VBS (http://technet.microsoft.com/en­ Create, delete, or lists standard TCP/IP 2K (http://technet.microsoft.com/en­

http://www.robvanderwoude.com/batchcommands.php 5/8
7/8/2015 Batch files and batch commands
us/library/cc754352.aspx) printer ports; display or change port N N us/library/cc754352.aspx) N
configuration

PRNQCTL.VBS (http://technet.microsoft.com/en­ Print a test page; pause or resume a 2K (http://technet.microsoft.com/en­


N N N
us/library/cc730914.aspx) printer; clear a printer queue us/library/cc730914.aspx)

PROMPT Configure the DOS prompt string Y Y Y Y

PUBPRN.VBS (http://technet.microsoft.com/en­ 2K (http://technet.microsoft.com/en­
Publish a printer in Active Directory N N N
us/library/cc753116.aspx) us/library/cc753116.aspx)

Move to a new directory, "pushing" the
PUSHD N N Y Y
current directory on the stack

QAPPSRV Query available TS application servers N N TS N

QBASIC Basic interpreter for MS­DOS 5+ Y N N N

Install multiple hotfixes with only a
QCHAIN (http://support.microsoft.com/kb/296861/) N N Y (http://support.microsoft.com/kb/296861/) N
single reboot

QFARM Query local TS farm N N TS N

QPROCESS Query TS servers for running processes N N TS N

QSERVER Query available ICA­enabled TS servers N N TS N

QUERY Query TS resources N N TS N

QUSER Query logged on TS users N N TS N

QWINSTA Query TS sessions N N TS N

RASDIAL Use existing RAS/DUN connections N N Y N

RASPHONE Manage RAS/DUN connections N N Y N

Remove a (sub)directory (same as
RD Y Y Y Y
RMDIR)

READLINE Read a single line from standard output N N N Y

Configures the recovery image Windows
RECIMG N N W7 (http://support.microsoft.com/kb/2748351/en­us) N
uses to refresh your PC

Recover readable information from a bad
RECOVER or defective disk (may sometimes destroy Y Y Y Y
other files in the process)

Read and write the registry (W2K and
REG N N 2K N
later)

Read and write the registry (GUI as well
REGEDIT N Y Y Y
as command line)

Read and write the registry (includes
REGEDT32 N N Y N
setting access permissions)

Read and write the registry, including
REGINI (http://makemsi­ Y (http://makemsi­
permissions (NT4 Resource Kit, native in N N N
manual.dennisbareis.com/regini_exe.htm) manual.dennisbareis.com/regini_exe.htm)
XP)

REGSVR32 (http://technet.microsoft.com/en­ Register .DLL & .OCX files as command Y (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) components in the registry us/library/bb491071.aspx)

REM Insert comment line Y Y Y Y

Rename a file or folder (same as
REN Y Y Y Y
RENAME)

RENAME Rename a file or folder (same as REN) Y Y Y Y

Copy only files that already exist in the
REPLACE target directory, or copy only files that Y Y Y Y
don't exist yet

RESET SESSION Reset TS session subsystem defaults N N TS N

Restore files backed up with BACKUP
RESTORE Y Y N Y
(from the exact same DOS version)

RMDIR Remove a (sub)directory (same as RD) Y Y Y Y

Copy directories, optionally including
ROBOCOPY Y
subdirectory trees and/or permissions,
(http://www.microsoft.com/Downloads/details.aspx? (http://www.microsoft.com/Downloads/details.aspx?
and optionally deleting removed files in N N N
FamilyID=9d467a69­57ff­4ae7­96ee­ FamilyID=9d467a69­57ff­4ae7­96ee­
the target directory (Resource Kit utility,
b18c4790cffd&displaylang=en) b18c4790cffd&displaylang=en)
native in Windows 7)

ROUTE (http://technet.microsoft.com/en­ Display and modify the entries in the Y (http://technet.microsoft.com/en­


N N Y
us/library/bb491071.aspx) local IP routing table us/library/bb491071.aspx)

http://www.robvanderwoude.com/batchcommands.php 6/8
7/8/2015 Batch files and batch commands
Run a command with different
credentials (will always prompt for a
RUNAS (http://technet.microsoft.com/en­ 2K (http://technet.microsoft.com/en­
password; use CPAU N N N
us/library/bb490994.aspx) us/library/bb490994.aspx)
(http://www.joeware.net/freetools/tools/cpau/)  if
you need to make this unattended)

Command line wrapper for 16­bit DLL
RUNDLL N Y Y Y
routines

Command line wrapper for 32­bit DLL
RUNDLL32 N Y Y N
routines

SC Command line services managment (XP) N N 2K N

SCHTASKS Command line task scheduler (XP) N N XP N

Configure and analyze system security
SECEDIT by comparing your current configuration N N 2K N
to a template (Windows 2000+)

SET Manipulate environment variables Y Y Y Y

SETLOCAL Start local environment N N Y Y

Scans the integrity of all protected
SFC system files and replaces incorrect N N 2K N
versions with correct ones.

SHADOW Monitor or take over a TS session N N TS N

Primary command interpreter
SHELL Y Y N Y
specification in CONFIG.SYS

Parse command line variables in batch
SHIFT Y Y Y Y
files

Shutdown a computer (Resource Kit
SHUTDOWN utility for NT 4 and 2000, native in XP N N Y N
and later)

SORT (http://technet.microsoft.com/en­ Read a file or standard input and return it Y (http://technet.microsoft.com/en­


Y Y Y
us/library/bb491071.aspx) sorted alphabetically us/library/bb491071.aspx)

Run a command in a separate process, or
START run a file with its default associated N Y Y Y
application

Display/modify ACEs for file and folder
SUBINACL permissions, ownership and domain N N Y N
(Resource Kit utility)

Associate or disassociate a drive alias
SUBST Y Y Y Y
with a path

SYSTEMINFO (http://technet.microsoft.com/en­ Query for basic system configuration XP (http://technet.microsoft.com/en­


N N N
us/library/bb491071.aspx) information us/library/bb491071.aspx)

TASKKILL Kill an active process (XP) N N XP N

TASKLIST List active processes (XP) N N XP N

TIME Display & manipulate system time Y Y Y Y

Set the window title for the command
TITLE N N Y N
prompt window

TRACERT (http://technet.microsoft.com/en­ Analyze the response times on the route Y (http://technet.microsoft.com/en­


N Y N
us/library/bb491071.aspx) to a remote IP address us/library/bb491071.aspx)

TRACERT6 IPv6 version of TRACERT N N Y N

Analyze the response times on the route
TRACERTE N N N Y
to a remote IP address (OS/2)

"Graphically" display the folder structure
TREE Y Y Y Y
of a drive or path

TRUENAME Display the real fully qualified path Y Y Y Y

Attach a TS user session to a terminal
TSCON N N TS N
session

TSDISCON Disconnect a TS terminal session N N TS N

TSKILL Terminate a process in a TS session N N TS N

http://www.robvanderwoude.com/batchcommands.php 7/8
7/8/2015 Batch files and batch commands

Copy/update TS user configuration
TSPROF N N TS N
information

TSSHUTDN Shut down or reboot a TS server N N TS N

TYPE Display text file content in console Y Y Y Y

TZCHANGE Configure/edit time zones N N XP N

Revoke 16­bits direct disk access granted
UNLOCK N Y N N
by the LOCK command

VER Display the OS version Y Y Y Y

Enable/disable verification of disk write
VERIFY Y Y Y Y
operations

Mount and access VHD files as virtual
disk drives (part of Virtual Server 2005
R2 SP1
VHDMOUNT N N 2K N
(http://www.microsoft.com/downloads/details.aspx?
FamilyID=bc49c7c8­4840­4e67­8dc4­
1e6e218acce4&displaylang=en) )

VOL Display a disk's volume label Y Y Y Y

Query for basic system configuration
WINMSD information (for Windows NT 4; in
N N Y (http://support.microsoft.com/kb/232848/en­us) N
(http://support.microsoft.com/kb/232848/en­us) Windows 2000 WINMSD was replaced
by MSINFO32)

WINMSDP
Command line helper tool for WINMSD N N Y (http://support.microsoft.com/kb/102468) N
(http://support.microsoft.com/kb/102468)

Query & manipulate objects in WMI (XP
WMIC N N XP N
Pro and later)

GUI mode interpreter for
WSCRIPT N Y Y N
VBScript/JScript

Start Windows Update in Internet
WUPDMGR N Y 2K N
Explorer

Read and set file access permissions
XCACLS (improved CACLS from the Resource Y Y Y Y
Kits)

Copy files & directories with advanced
XCOPY Y Y Y Y
options

Notes: (1) This list is by no means complete.


Only a selection of all commands that can be run in unattended mode from the command line is listed. For a complete list, download and run my AllHelp.vbs (or AllHelp.bat) to create your
own custom version of allhelp.html.

(2) Not all commands are available in all OS versions: CHOICE for example, is available in MS­DOS versions 6.* and 7.* (Windows 95/98) only, TSSHUTDN and other TS commands are
  available only on Terminal Servers and TS client PCs, DSADD and other AD commands are available only on Active Directory servers and client PCs with the Windows 2000/2003
administrator tools ADMINPAK.MSI) installed, etc.

  (3) For an up­to­date listing of commands available in the latest Windows versions, see Microsoft's Command­line reference A­Z (http://technet.microsoft.com/en­us/library/cc778084.aspx) .

  (4) To everyone who sent me corrections: thanks for helping me keep this list accurate.

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Related stuff:

Help for "all" native Windows command line tools
Windows XP command­line reference A­Z (http://technet.microsoft.com/en­us/library/bb490890.aspx)
Windows Server 2003 command­line reference A­Z (http://technet.microsoft.com/en­us/library/cc778084%28WS.10%29.aspx)
The Windows NT Command Shell (http://technet.microsoft.com/en­us/library/cc723564.aspx)

http://www.robvanderwoude.com/batchcommands.php 8/8

You might also like