CMD Commands Overview: BATch Commands Windows Command Prompt
An introduction to Windows-BATch or the Windows-Command-Line can be found here: Windows Batch
After Windows-Powershell gradually replaces Windows-BATch, see also: Windows PowerShell
DOS commands
The command help
displays an overview of all integrated commands (depending on the DOS or Windows version).
To get more detailed information about the commands: start the command with /?
so e.g. xcopy /?
will generate a short description or the command line parameters of the respective command.
Here are some commands and a short description:
Command | Description | Operating systems Windows |
assoc | Displays or changes file extension associations | XP/Vista/7/8/10/11 |
at |
AT can be used to start commands or programs at a specific time. These are then entered in "Scheduled Tasks (in Windows 8 schtasks should be used instead of AT) |
XP/Vista/7 |
attrib | Displays or changes file attributes | XP/Vista/7/8/10/11 |
break | Turns extended checking for CTRL+C on or off | 8/10/11 |
bcdedit | Sets properties in the boot database to control booting. | 11 |
cacls | changes file ACLs (Access Control List) or displays them | XP/Vista/7/8/10/11 |
call | calls a batch file from another | XP/Vista/7/8/10/11 |
cd | change to another directory; cd \ changes to the root directory | XP/Vista/7/8/10/11 |
chcp | changes the current code page or displays its number | XP/Vista/7/8/10/11 |
chdir | changes the directory or displays its name | XP/Vista/7/8/10/11 |
chkdsk | check disk | XP/Vista/7/8/10/11 |
chkntfs | Show disk check at startup, change | XP/Vista/7/8/10/11 |
choice | Users can select items from a drop-down list | 7/8/10/11 |
cipher | Show or enable encryption of directories (NTFS partition) | XP/Vista/7/8/10/11 |
cls | Clear screen content | XP/Vista/7/8/10/11 |
cmd | starts the command prompt | XP/Vista/7/8/10/11 |
cmstp | profile installation for the connection manager | XP/Vista/7/8/10/11 |
color | Change console colors | XP/Vista/7/8/10/11 |
comp | compares the contents of files | XP/Vista/7/8/10/11 |
compact | view or change the compression of files (ntfs) | XP/Vista/7/8/10/11 |
convert | convert fat drives to NTFS | XP/Vista/7/8/10/11 |
copy | copy files. more suitable for copy operations is the command:xcopy | XP/Vista/7/8/10/11 |
cscript | starts the scripting host: e.g. to display the output of a .vbs file in the console (not in individual windows) | XP/Vista/7/8/10/11 |
date | shows the current date and asks for a new | XP/Vista/7/8/10/11 |
defrag | defragment drives | XP/Vista/7/8/10/11 |
del | delete files (no folders!) | XP/Vista/7/8/10/11 |
dir | shows the directory contents | XP/Vista/7/8/10/11 |
diskcomp | compares the content of 2 floppy disks | XP/Vista/7/8 |
diskcopy | copies one floppy disk to another | XP/Vista/7/8 |
diskpart | disk management from the console | XP/Vista/7/8/10/11 |
dism | DISM is used for enumerating, installing, uninstalling, configuring and updating features and packages in Windows images. The commands available depend on which image is being maintained and whether the image is and whether the image is an offline image or an online image. online image. |
7/8/10/11 |
doskey | is responsible for remembering commands already entered in the console, these can be recalled with the up arrow key | XP/Vista/7/8/10/11 |
driverquery | can display installed devices and their properties | XP/Vista/7/8/10/11 |
echo | Display messages in the console or switches the command display on or off | XP/Vista/7/8/10/11 |
endlocal | ends a session started with setlocal (changes in a batch file are applied with setlocal only in the batch file) | XP/Vista/7/8/10/11 |
erase | Deletes one or more files | XP/Vista/7/8/10/11 |
errorlevel | Return value of a command (whether it was successful: 0 or not: 1) | XP/Vista/7/8 |
eventcreate | can write messages to the event log | XP/Vista/7/8/10/11 |
eventquery | lists event or event properties from eventlog (must be executed with cscript) | XP |
eventtriggers | display and configure event triggers (eventlog) | XP |
exist | checks if a file exists | XP/Vista/7/8/10/11 |
exit | exits cmd.exe or a batch file | XP/Vista/7/8/10/11 |
expand | unpack compressed files | XP/Vista/7/8/10/11 |
fc | Compare files and shows the differences | XP/Vista/7/8/10/11 |
find | searches for a string in one or more files | XP/Vista/7/8/10/11 |
findstr | searches for strings in files | XP/Vista/7/8/10/11 |
finger | shows which user is logged in; rather old service usually doesn't work anymore for security reasons | XP/Vista/7/8/10/11 |
for | for loop, execute commands multiple times based on records (lists) | XP/Vista/7/8/10/11 |
format | formats a disk | XP/Vista/7/8/10/11 |
fsutil | tune filesystem | XP/Vista/7/8/10/11 |
ftp | File transfer protocol via command line files up and download | XP/Vista/7/8/10/11 |
ftype | shows file types and their assignment | XP/Vista/7/8/10/11 |
getmac | shows the Mac addresses of the computer | XP/Vista/7/8/10/11 |
goto | jumps to a marker in a batch file | XP/Vista/7/8/10/11 |
gpresult | displays currently applied group policies | XP/Vista/7/8/10/11 |
gpupdate | updates group policies | XP/Vista/7/8/10/11 |
graftabl | enables Windows to display special characters in graphics mode | XP/Vista/7/8/10/11 |
help | shows an overview of Windows CMD commands | XP/Vista/7/8/10/11 |
hostname | shows the computer name | XP/Vista/7/8/10/11 |
icacls | view, modify, backup, or restore ACLs for files and directories | 7/8/10/11 |
If | Conditions in batch files | XP/Vista/7/8/10/11 |
ipconfig | Displays IP network settings | XP/Vista/7/8/10/11 |
ipxroute | NWLink IPX routing and source routing control program | XP |
irftp | sends files to the infrared interface | XP/Vista/7/8/10/11 |
label | change volume label | XP/Vista/7/8/10/11 |
lodctr | Updated names and explanations for extensible performance indicators | XP/Vista/7/8/10/11 |
logman | manages the "performance logs and alerts" service | XP/Vista/7/8/10/11 |
lpq | displays the status of a remote LPQ queue | XP |
lpr | sends a print job to a network printer | XP |
mkdir (md) | create directory | XP/Vista/7/8/10/11 |
mmc | starts the Management Console | XP/Vista/7/8/10/11 |
mklink | creates symbolic and fixed links | 8/10/11 |
mode | configures interfaces/devices (speed, parity, ..) in the system | XP/Vista/7/8/10/11 |
more | displays data page by page on the screen | XP/Vista/7/8/10/11 |
mountvol | assign or delete drive letters / mount points | XP/Vista/7/8/10/11 |
move | move and rename files and folders | XP/Vista/7/8/10/11 |
openfiles | shows files opened by remote users for file sharing | 7/8/10/11 |
msiexec | Install msi packages | XP/Vista/7/8/10/11 |
nbtstat | Displays TCP/IP connections using NBT (NetBIOS over TCP/IP) | XP/Vista/7/8/10/11 |
net | Manage network services, show e.g. net use shows currently connected drives | XP/Vista/7/8/10/11 |
netsh | configure network components via cmd control, show | XP/Vista/7/8/10/11 |
netstat | shows TCP IP connections and their status | XP/Vista/7/8/10/11 |
nslookup | query DNS server | XP/Vista/7/8/10/11 |
ntbackup | Start NTBackup via CommandLine / Silent | XP |
ntsd | Application Debugger | XP |
pagefileconfig | Configure pagefile (run with cscript) | XP |
path | sets the search path for cmd commands or displays them | XP/Vista/7/8/10/11 |
Pathping | tests the connection to a given IP address and shows the hops to the destination address (similar to tracert) | XP/Vista/7/8/10/11 |
pause | stops the execution of a batch file and writes: Press any key ... | XP/Vista/7/8/10/11 |
pentnt | shows if the computer has the Intel(tm) Pentium Floating Point Devision error or disables floating point hardware and enables floating point emulation | XP |
perfmon | starts the Performence Monitor (Program: Performance) | XP/Vista/7/8/10/11 |
ping | tests a connection to another computer / device | XP/Vista/7/8/10/11 |
popd | changes to the directory that was saved with Phusd | XP/Vista/7/8/10/11 |
prints a text file | XP/Vista/7/8/10/11 | |
prncnfg | configures or displays configuration information about a printer. (start with cscript) | XP |
prndrvr | Add, delete, display printer driver (start with cscript) | XP |
prnjobs | Stop, display, repeat PrintJobs (start with cscript) | XP |
prnmngr | Add printers or printer connections, set default printer (start with cscript) | XP |
prnport | Create, delete or list print jobs (start with cscript) | XP |
prnqctl | prints a test page pauses or resumes a print job deletes the print queue | XP |
prompt | changes the prompt | XP/Vista/7/8/10/11 |
pushd | saves the current directory for use with popd | XP/Vista/7/8/10/11 |
rasdial | establish dial-up connections via command line | XP/Vista/7/8/10/11 |
rcp | copies files to computers or from computers running the RCP service | XP |
rd | Removes a directory | 8/10/11 |
recover | recovers readable data from a damaged disk | XP/Vista/7/8/10/11 |
reg | add registry entries read import eXPort | XP/Vista/7/8/10/11 |
regsvr32 | register dlls | XP/Vista/7/8/10/11 |
relog | Rebuild performance indicator logs | XP/Vista/7/8/10/11 |
rem | commands after rem in a batch file are considered comments and are not processed | XP/Vista/7/8/10/11 |
rename (ren) | renames files | XP/Vista/7/8/10/11 |
replace | replaces files | XP/Vista/7/8/10/11 |
reset | disconnect open terminal sessions | XP/Vista/7/8/10/11 |
rexec | executes commands on remote computers where the RESEC service is active | XP |
rmdir | deletes a directory | XP/Vista/7/8/10/11 |
rd | deletes a directory | XP/Vista/7/8/10/11 |
route | show network routing table, add static routes | XP/Vista/7/8/10/11 |
robocopy | Advanced copying of files and directories | 7/8/10/11 |
rsh | Executes commands on remote hosts where RSH service is active | XP |
rsm | manage and control removable media | XP |
runas | run programs as another user | XP/Vista/7/8/10/11 |
sc | Command line program that communicates with NT Service Controller and Services | XP/Vista/7/8/10/11 |
schtasks | scheduled tasks on a local or remote computer create, modify, delete, execute, terminate replaces at.exe | XP/Vista/7/8/10/11 |
secedit | MS own security editor: allows to check permissions by comparing templates or applying the templates | XP/Vista/7/8/10/11 |
set | sets or deletes environment variables for CMD.exe | XP/Vista/7/8/10/11 |
setlocal | Changes of the environment are only related to the batch file after the "setlocal" command. To reset the original settings the command endlocal is used or the batch file is terminated. | XP/Vista/7/8/10/11 |
shift | changes the position of replaceable parameters in a batch program | XP/Vista/7/8/10/11 |
shutdown | log off, restart, turn off computer | XP/Vista/7/8/10/11 |
sort | sort screen output | XP/Vista/7/8/10/11 |
start | starts a separate window to execute a specific program or command | XP/Vista/7/8/10/11 |
subst | assigns a drive name to a path | XP/Vista/7/8/10/11 |
systeminfo | get general information about the system configuration: e.g. logon server, installed hotfixes network settings | XP/Vista/7/8/10/11 |
sfc | checks all protected system files and replaces wrong versions with Microsoft original versions | XP/Vista/7/8/10/11 |
taskkill | can kill processes | XP/Vista/7/8/10/11 |
tasklist | shows applications and associated tasks or processes (PID) | XP/Vista/7/8/10/11 |
tcmsetup | Sets up the telephony client | XP/Vista/7/8/10/11 |
telnet | Establish telnet connections | XP |
tftp | transfer files to a TFTP server using TFTP | XP |
time | sets or displays the system time | XP/Vista/7/8/10/11 |
timeout | waits an arbitrary time | Vista/7/10/11 |
title | sets the window title for the prompt window | XP/Vista/7/8/10/11 |
tracerpt | generate a readable report file from a binary trace file (etl). The etl file can be generated using Windows Performance Monitor tracing logs. | XP/Vista/7/8 |
tracert | Route tracing similar to pathping | XP/Vista/7/8/10/11 |
tree | displays the folder structure graphically | XP/Vista/7/8/10/11 |
type | displays the contents of text files | XP/Vista/7/8/10/11 |
typeperf | writes performance indicator data to command line or log file | XP/Vista/7/8/10/11 |
unlodctr | deletes names and explanations for extensible performance indicators | XP/Vista/7/8/10/11 |
ver | displays the operating system version | XP/Vista/7/8/10/11 |
verify | sets the monitoring whether files are written correctly to the disk | XP/Vista/7/8/10/11 |
vol | shows the name and serial number of a volume | XP/Vista/7/8/10/11 |
vssadmin | Volume Shadow Copy Service command line utility | XP/Vista/7/8/10/11 |
w32tm | Time synchronization, time server, set time zone | XP/Vista/7/8/10/11 |
wmic | (Windows Management Instrumentation Commandline). Tool with which the classes of the WMI library can be easily exploited in the command line without programming knowledge. | XP/Vista/7/8/10/11 |
xcopy | improved copy | XP/Vista/7/8/10/11 |
advanced topics
- Introduction, basics and advanced knowledge about Windows Batch, see: Windows Batch.
- The current command line interpreter, see: Windows PowerShell
({{pro_count}})
Rate Post:{{percentage}} % positive
({{con_count}})