Common DOS Internal Commands
Common DOS Internal Commands
[drive:][path][filename]
Specifies drive, directory, or files to list.
In the fourth line, we can see at the side of the word DIR; [drive:] [path] [filename]. This indicates that the DIR
command accepts as optional parameters; a drive, a path and a filename or even more useful; a file name with
wildcards.
The brackets [] indicate that the parameter or switch is optional.
After these three parameters we see a big list of switches (starting with /). All are optional (they are enclosed by
[]) and are explained in "help". Special cases are the / A, / O, / T which allow us the specification of parameters.
As an example, we can see that DIR /A:D allows us to list only the directories (without the files).
C:\>dir /a:D
The volumen of the C unit is OS
The number of the volumen serie is: 008E-DBB0
C:\ Directory
As you can see, there is no response on the console but if we open the file dir.txt, we will find the text you
normally see on the console.
MS-DOS command List; HELP Command
With the HELP command, we get a list of available commands and a description of their function.
C:\>help
For more information on a specific command, type HELP command-name
HELP [command]
command - displays help information for the specified command.
DOS Wildcards
The Copy File action allows you to use DOS wildcards as part of the path in the Copy this file panel option. DOS
wildcards are characters that can be used to stand-in for unknown characters in file names. There are two
wildcards:
Wildcard Description
* An asterisk – will match any combination of characters
? A question mark – will match any single character
There are many ways you can combine these wildcards to copy more than one file. Below are a few examples of
how you can use the wildcards with the Copy File action:
Example 1:
To copy all of the files in a folder:
C:\myfiles\*.*
This finds any number of characters in the filename and the extension name of the file. All of the files in the
folder named myfiles will be copied.
Example 2:
To copy all of the file types with the extension doc in a folder:
C:\myfiles\*.doc
The * wildcard will find all files (however long their file name) with the extension .doc
Example 3:
To copy all files in a folder that contains sequential numbers:
C:\myfiles\report?.*
This will copy all files beginning with report followed by any single character, such as, report1, report2 and so
on.
Note:
In this example, because we used the ? wildcard, report10, report11 etc. would not be copied – you could have
used the * wildcard to do this.
Note:
The web offers many good examples of DOS wildcards; simply type the keywords DOS wildcards into your
preferred search engine on the web.
Wildcards
Wildcards are characters that can be used to stand-in for unknown characters in file names. In card games, a
wildcard is a card that can match
up with any other cards. In DOS, wildcard characters can match up with any character that is allowable in a file
name. There are two wildcards in DOS:
* = matches up with any combination of allowable characters
? = matches up with any single allowable character
Of course, since these two characters are used for wildcards, they are not allowable in filenames themselves. A
filename like myfile?.txt would not be allowed. If you tried to create a file with this name you would get an error
message “Bad file name.” But wildcards are very useful in any DOS command which uses a filename as an
argument (which is most DOS commands, come to think of it.)
The asterisk character, *, can stand in for any number of characters. Some examples of this command:
c:\>del *.doc
This command would delete every file with the doc extension from the root directory of C: . So files like
myfile.doc, testfile.doc, and 123.doc would all be deleted.
C:\>copy ab*.txt a:
This command would copy every file that began with ab, and had an extension of txt, to the floppy drive A: . So
files like abstract.txt,
abalone.txt, and abba.txt would all be copied.
C:\temp\>del *.*
This is the fastest way to clean out a directory. This command will delete every file in the directory C:\temp\.
The first apostrophe covers every filename, and the second one covers every extension.
The question mark wildcard, ?, stands in for any single character. Some examples of this command:
C:\>del ?.doc
This command would only delete files that had a single character filename and a doc extension from the root
directory. So a file like a.doc or 1.doc is history, but a file like io.doc is perfectly safe, since it has two characters.
C:\>copy ab?.txt a:
This command would copy any file with a three-letter name, of which the first two letters were ab, and with a
txt extension, to the floppy drive A: . So files like abz.txt and ab2.txt would be copied.
You can combine these wildcards in any command as well.
C:\temp\>del *ab?.do?
This command would be very selective. It would look in the temp directory for files that had anywhere from 1 to
5 beginning characters, followed by ab followed by one character, and which had an extension of do followed by
any one character. It would then delete any such files as matched. Examples of matching files would be
itab3.dox, mearabt.doq, and 123abc.doc. But the file allabon.doc would not be deleted because it does not
match. It has two characters following the letters ab in the filename, and the command specified one character
in that position.
Attributes
Every file in DOS has four attributes. These are:
Read-only
Archive
System
Hidden
As we saw in lesson 9, each file has an entry in the directory, and in that
entry there are four bits, one each for the four attributes. These attributes
are turned on if the bit is set to 1, and turned off if it is set to 0.
The Read-only attribute, if it is set to on, will let you read the contents
of a file, but you cannot modify it in any way. If you turn the read-only attribute off, you can modify, delete, or
move the file.
The Archive bit is set on when a file is first created, and then set off when
the file has been backed-up by a good backup software program. If the file is ever modified, the archive bit is
turned back on. That way, the software that does the backup can look at the archive bit on each file to
determine if it needs to be backed up.
The System attribute is used to mark a file as a system file. In earlier versions of DOS, files marked “system”
were completely off-limits without specialized utilities, but now the attribute serves mostly as a warning.
The Hidden attribute is used to prevent a file from being seen by other commands. If you try to clean out a
subdirectory (such as by using the DEL *.* command), then try and remove the subdirectory, and then get an
error that the subdirectory is not empty, you have a hidden file in there that was not deleted, even with the
wildcards.
You can view the attributes for any file by using the DOS command ATTRIB. If you run the command without any
arguments, you will get a listing of all the attributes that are turned on for every file in the subdirectory:
C:\temp\>attrib
This will give you a list of the files in the C:\temp\ subdirectory, for every
attribute that is turned on you will see a letter (A for archive, S for system,
H for hidden, and R for read-only) at the beginning of the line.
You can also look at the attributes for any one file by including that filename (with an optional path) as an
argument in the command:
C:\temp\>attrib myfile.txt
C:\temp\>attrib c:\docs\123.doc
And you can change the attributes for any file by making the following arguments in the command:
+r = makes a file read-only
-r = removes the read-only status, makes a file editable again
+a = turns on the archive bit (i.e. flags this file as not having been backed
up)
-a = turns off the archive bit (i.e. shows this files as having been backed
up)
+s = marks the file as a system file
-s = removes the system file designation
+h = makes the file “hidden” to other commands
-h = reveals the file to other commands
C:\temp\> attrib -h hidfile.txt
The file hidfile.txt will now be visible to other DOS commands.
You can chain these together if you wish:
C:\temp\>attrib -h -r myfile.txt
This will both reveal the file myfile.txt and make it editable and deletable.
With the two concepts of wildcards and attributes, we are ready for the next lesson, which will make us experts
in using the DIR
command.
DOS COMMANDS
Basic DOS commands
To clear your screen (Type CLS to clear your screen)
C:\>CLS
Fast Help after each command types /? after each commands
C:\>DIR /?
File Management Commands
DIR - to display all your DOS directories
C:\>DIR
DIR switches
DIR switches in details
/P Pauses after each screenful of information.
/W Uses wide list format.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date & time (earliest first)
G Group directories first - Prefix to reverse order
A By Last Access Date (earliest first)
/S Displays files in specified directory and all subdirectories.
/B Uses bare format (no heading information or summary).
/L Uses lowercase.
/V Verbose mode.
/4 Displays year with 4 digits (ignored if /V also given).
Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.
To create a directory
C:\>MD or MKDIR example (we just created a directory called example)
File Naming Convention
All DOS file names have a maximum length of 8 characters followed by an optional extension with a maximum
length of 3 characters.
Example: AUTOEXEC.BAT
The following characters are reserved and cannot be used in an MS DOS environment
Colon:
Semicolon;
Slashes / \
Spaces
Greater than >
Less than <
Question mark?
Asterisk *
Period.
Dollar sign $
Quotes marks " "
Apostrophes ' '
Pipe sign |
Valid DOS names
AUTOEXEC.BAT, CONFIG.SYS, NAME.DOC, HELLO.TXT
Invalid DOS names
AUTOEXEC233.BAT, <Good>.EXE, NAME$. DOC
To remove a directory
C:\>RD or RMDIR example (removes the example directory)
To change a directory
C:\>CD or CHDIR example (press enter)
C:\>EXAMPLE ( I am now in the example directory)
To go back to the main C:\>
C:\>CD \
To move one level up
C:\>CD..
To remove a Directory and Subdirectory
C:\>DELTREE Example (removes the Example directory and its subdirectories) (only DOS and Win9X)
C:\> RD /S Example (Windows 2K or XP)
To view the directory in hierarchical mode in DOS
C:\>TREE (only available in DOS 6.x, 2K and XP)
DATE (displays or sets the date)
C:\>DATE
TIME (displays or set the time)
C:\>TIME
VER (displays what version of DOS your running)
C:\>VER
VOL (displays the volume label of your disk)
C:\>VOL drive
LABEL (changes the label of your volume)
C:\>LABEL C: name
FORMAT (makes your drives usable)
C:\>format /?
Formats a disk for use with MS-DOS.
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]
/V[:label] Specifies the volume label.
/Q Performs a quick format.
/F:size Specifies the size of the floppy disk to format (such
as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).
/B Allocates space on the formatted disk for system files.
/S Copies system files to the formatted disk.
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.
/1 Formats a single side of a floppy disk.
/4 Formats a 5.25-inch 360K floppy disk in a high-density drive.
/8 Formats eight sectors per track.
/C Tests clusters that are currently marked "bad."
FDISK (partitions your drives into sections)
C:\>fdisk /?
Configures a hard disk for use with MS-DOS.
FDISK [/STATUS] /X
/STATUS Displays partition information.
/X Ignores extended disk-access support. Use this switch if you
receive disk access or stack overflow messages.
To create a disk partition
Create Primary Partition first
Set Primary Partition as Active
Create Extended Partition
Create Logical Partition
Delete the Non DOS Partition first if you have one in your drive
Examples
NTFS (Win 2K & NT)
NFS(UNIX/Linux)
HPFS (OS/2)
C:\>mem /?
Displays the amount of used and free memory in your system.
MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE modulename] [/PAGE]
/CLASSIFY or /C Classifies programs by memory usage. Lists the size of
programs, provides a summary of memory in use, and lists
largest memory block available.
/DEBUG or /D Displays status of all modules in memory, internal drivers,
and other information.
/FREE or /F Displays information about the amount of free memory left
in both conventional and upper memory.
/MODULE or /M Displays a detailed listing of a module's memory use.
This option must be followed by the name of a module,
optionally separated from /M by a colon.
/PAGE or /P Pauses after each screenful of information.
To find file attributes RASH(R - Read Only A- Attributes S- System Files H - Hidden)
C:\>ATTRIB Example (lists the attributes of example directory)
C:\>ATTRIB +R Example (adds attribute read only to example directory)
C:\>ATTRIB -R Example (removes the read only attributes from example directory)
C:\>attrib /?
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
Windows 98 IP Configuration
Host Name . . . . . . . . . : ESCOTAL.rcnchicago.com
DNS Servers . . . . . . . . : 207.229.143.1
207.229.143.2
Node Type . . . . . . . . . : Broadcast
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : No
Ethernet adapter :
Description . . . . . . . . : PPP Adapter.
Physical Address. . . . . . : 44-45-53-54-00-00
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . :
DHCP Server . . . . . . . . : 255.255.255.255
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . :
Lease Expires . . . . . . . :
Ethernet adapter :
Description . . . . . . . . : PPP Adapter.
Physical Address. . . . . . : 44-45-53-54-00-01
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . :
DHCP Server . . . . . . . . : 255.255.255.255
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . :
Lease Expires . . . . . . . :
Ethernet adapter :
Description . . . . . . . . : Intel EtherExpress(TM) PRO/100 ISA Adapter
Physical Address. . . . . . : 00-90-27-63-3F-A0
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 24.148.46.227
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 24.148.46.254
DHCP Server . . . . . . . . : 216.80.19.53
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . : 01 22 02 3:40:18 AM
Lease Expires . . . . . . . : 01 22 02 4:40:18 AM
IPCONFIG - Same as above except this utility is used on windows 2000
go to Command prompt
C:\>IPCONFIG /ALL
PING - allows you to test connectivity with another host example PING www.escotal.com
C:\>ping www.escotal.com
Pinging www.escotal.com [64.224.226.151] with 32 bytes of dat
Reply from 64.224.226.151: bytes=32 time=25ms TTL=238
Reply from 64.224.226.151: bytes=32 time=25ms TTL=238
Reply from 64.224.226.151: bytes=32 time=25ms TTL=238
Reply from 64.224.226.151: bytes=32 time=24ms TTL=238
Ping statistics for 64.224.226.151:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 24ms, Maximum = 25ms, Average = 24ms
C:\>ping /?
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] destination-list
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
TRACERT- This utility allows you to watch the path that information takes getting from your machine to another
one
C:\>: tracert www.escotal.com
Tracing route to www.escotal.com [64.224.226.151]
over a maximum of 30 hops:
1 8 ms 8 ms 9 ms cm-gw0-atm-2-0.psq.enteract.com [24.148.12.252]
2 9 ms 7 ms 7 ms core1-fe-1-1-0.psq.enteract.com [216.80.73.132]
3 8 ms 8 ms 7 ms core0-fe-0-0-0.apm.enteract.com [207.229.141.3]
4 9 ms 9 ms 9 ms Serial3-1.GW2.CHI1.ALTER.NET [157.130.97.129]
5 11 ms 14 ms 14 ms 502.at-2-0-0.XR1.CHI4.ALTER.NET [152.63.68.210]
6 10 ms 10 ms 11 ms 0.so-3-0-0.TR1.CHI4.ALTER.NET [152.63.15.234]
7 22 ms 23 ms 24 ms 106.at-6-1-0.TR1.ATL5.ALTER.NET [146.188.142.33]
8 23 ms 26 ms 24 ms 197.at-1-0-0.XR1.ATL5.ALTER.NET [152.63.80.241]
9 23 ms 24 ms 26 ms 193.ATM6-0.GW5.ATL5.ALTER.NET [152.63.82.9]
10 * * * Request timed out.
11 39 ms 25 ms 25 ms 64.224.0.99
12 24 ms 24 ms 26 ms www.escotal.com [64.224.226.151]
Trace complete.
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each rep
The two types of DOS commands are internal and external commands. The DOS commands whose specifications
are internally available in the command.com file and can be easily accessed are called the internal commands.
An A-Z Index of Windows CMD commands.
A
AccessChk Get the security descriptor (SDDL) for an object (file, directory, reg key).
ADDUSERS Add or list users to/from a CSV file
ADmodcmd Active Directory Bulk Modify
ARP Address Resolution Protocol
ASSOC Change file extension associations •
ATTRIB Change file attributes
AUDITPOL Manage audit policies
B
BCDBOOT Create or repair a system partition
BCDEDIT Manage Boot Configuration Data
BITSADMIN Background Intelligent Transfer Service
BOOTREC Repair or replace a partition boot sector
BREAK Do nothing, successfully •
BROWSTAT Get domain, browser and PDC info
C
CACLS Change file permissions
CALL Call one batch program from another •
CERTREQ Request certificate from a certification authority
CERTUTIL Manage certification authority (CA) files and services
CD Change Directory - move to a specific Folder •
CHANGE Change Terminal Server Session properties
CHANGEPK Upgrade device Edition/Product Key
CHCP Change the active console Code Page
CHDIR Change Directory - move to a specific Folder •
CHKDSK Check Disk - check and repair disk problems
CHKNTFS Check the NTFS file system
CHOICE Accept keyboard input to a batch file
CIPHER Encrypt or Decrypt files/folders, overwrite data.
CleanMgr Automated cleanup of Temp files, recycle bin
CLIP Copy STDIN to the Windows clipboard
CLS Clear the screen •
CMD Start a new CMD shell
CMDKEY Manage stored usernames/passwords
COLOR Change colors of the CMD window •
COMP Compare the contents of two files or sets of files
COMPACT Compress files or folders on an NTFS partition
CON Console input
CONVERT Convert a FAT drive to NTFS
COPY Copy one or more files to another location •
Coreinfo Show the mapping between logical & physical processors
CSCcmd Client-side caching (Offline Files)
CSVDE Import or Export Active Directory data
CURL Transfer data from or to a server
D
DATE Display or set the date •
DEFRAG Defragment hard drive
DEL Delete one or more files •
DELPROF Delete user profiles
DELTREE Delete a folder and all subfolders
DevCon Device Manager Command Line Utility
DIR Display a list of files and folders •
DIRQUOTA File Server Resource Manager Disk quotas
DISKPART Disk Administration
DISKSHADOW Volume Shadow Copy Service
DISKUSE Show the space used in folders
DISM Deployment Image Servicing and Management
DisplaySwitch Specify which display to use and how to use it
DNSCMD Manage DNS servers
DOSKEY Edit command line, recall commands, and create macros
DriverQuery Display installed device drivers
DSACLs Active Directory ACLs
DSAdd Add items to Active Directory (user group computer)
DSGet View items in Active Directory (user group computer)
DSQuery Search Active Directory (user group computer)
DSMod Modify items in Active Directory (user group computer)
DSMove Move an Active Directory Object
DSRM Remove items from Active Directory
DSREGCMD Directory Service Registration
DU Display directory sizes/usage
E
ECHO Display message on screen •
ENDLOCAL End localisation of the environment in a batch file •
ERASE Delete one or more files •
ESENTUTL Extensible Storage Engine utilities
EVENTCREATE Add a message to the Windows event log
EXIT Quit the current script/routine and set an errorlevel •
EXPAND Uncompress CAB files
EXPLORER Open Windows Explorer
EXTRACT Uncompress CAB files
F
FC Compare two files
FIND Search for a text string in a file
FINDSTR Search for strings in files
FLTMC Manage MiniFilter drivers
FONDUE Features on Demand User Experience Tool
FOR /F Loop command: against a set of files •
FOR /F Loop command: against the results of another command •
FOR Loop command: all options Files, Directory, List •
FORFILES Batch process multiple files
FORMAT Format a disk
FREEDISK Check free disk space
FSUTIL File and Volume utilities
FTP File Transfer Protocol
FTYPE File extension file type associations •
G
GETMAC Display the Media Access Control (MAC) address
GOTO Direct a batch program to jump to a labelled line •
GPRESULT Display Resultant Set of Policy information
GPUPDATE Update Group Policy settings
H
HELP Online Help
HOSTNAME Display the host name of the computer
I
iCACLS Change file and folder permissions
IEXPRESS Create a self extracting ZIP file archive
IF Conditionally perform a command •
IFMEMBER Is the current user a member of a group
IPCONFIG Configure IP
INUSE Replace files that are in use by the OS
K
KLIST List cached Kerberos tickets
L
LABEL Edit a disk label
LGPO Local Group Policy Object utility
LODCTR Load PerfMon performance counters
LOGMAN Manage Performance Monitor logs
LOGOFF Log a user off
M
MAKECAB Create .CAB files
Manage-BDE BitLocker Drive Encryption
MBR2GPT Convert a disk partition from Master Boot Record to a GPT
MD Create a new Directory •
MKLINK Create a symbolic link (linkd) •
MODE Configure a system device COM/LPT/CON
MORE Display output, one screen at a time
MOUNTVOL Manage a volume mount point
MOVE Move files from one folder to another •
MOVEUSER Move a user from one domain to another
MSG Send a message
MSIEXEC Microsoft Windows Installer
MSINFO32 System Information
MSTSC Terminal Server Connection/Remote Desktop Protocol(RDP)
N
NET Manage network resources
NETDOM Domain Manager
NETSH Configure Network Interfaces, Firewall & Remote access
NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)
NLSINFO Display locale information (reskit)
NLTEST Network Location Test (AD)
NMBIND Manage Hyper-V network bindings
NOW Display the current Date and Time
NSLOOKUP Name server lookup
NTBACKUP Windows Backup folders to tape
NTDSUtil Active Directory Domain Services management
NTRIGHTS Edit user account rights
NVSPBIND Modify network bindings
O
OPENFILES Query or display open files
P
PATH Display or set a search path for executable files •
PATHPING Trace route plus network latency and packet loss
PAUSE Suspend processing of a batch file •
PERMS Show permissions for a user
PING Test a network connection
PKTMON Monitor internal packet propagation and packet drop reports
PNPUTIL Plug and Play Utility
POPD Return to a previous directory saved by PUSHD •
PORTQRY Display the status of ports and services
POWERCFG Configure power settings
PRINT Print a text file
PRINTBRM Print queue Backup/Recovery
PRNCNFG Configure a printer
PRNDRVR Add, delete or list print drivers.
PRNJOBS Pause, resume, cancel, or list print jobs.
PRNMNGR Add, delete, or list printer connections.
PRNPORT Manage Printer Ports, change port configuration.
PRNQCTL Manage Print Queues, print a test page.
ProcDump Monitor an application for CPU spikes
PROMPT Change the command prompt •
PsExec Execute process remotely
PsFile Show files opened remotely
PsGetSid Display the SID of a computer or a user
PsInfo List information about a system
PsKill Kill processes by name or process ID
PsList List detailed information about processes
PsLoggedOn Who’s logged on (locally or via resource sharing)
PsLogList Event log records
PsPasswd Change account password
PsPing Measure network performance
PsService View and control services
PsShutdown Shutdown or reboot a computer
PsSuspend Suspend processes
PUSHD Save and then change the current directory •
Q
QPROCESS Query Process Display processes
QWinsta Query Session Display all sessions (TS/Remote Desktop)
QAppSrv Query TermServer List all servers (TS/Remote Desktop)
QUSER Query User Display user sessions (TS/Remote Desktop)
R
RASDIAL Manage RAS connections
RASPHONE Manage RAS connections
RD Delete a Directory •
REAgentC Configure WindowsRE and System Reset
RECOVER Recover a damaged file from a defective disk
REG Registry: Read, Set, Export, Delete keys and values
REGEDIT Import or export registry settings
REGSVR32 Register or unregister a DLL
REGINI Change Registry Permissions
REM Record comments (remarks) in a batch file •
REN Rename a file or files •
REPLACE Replace or update one file with another
Reset Session Delete a Remote Desktop Session
RMDIR Delete a Directory •
RMTSHARE Share a folder or a printer
ROBOCOPY Robust File and Folder Copy
ROUTE Manipulate network routing tables
RUN Start | RUN commands
RUNAS Execute a program under a different user account
RUNDLL32 Run a DLL command (add/remove print connections)
S
SC Service Control
SCHTASKS Schedule a command to run at a specific time
ScriptRunner Run one or more scripts in sequence
SET Display, set, or remove session environment variables •
SETLOCAL Control the visibility of environment variables •
SetObjectSecurity Set security for an object (file, directory, reg key etc).
SetSPN Edit Service Principal Names
SETX Set environment variables
SFC System File Checker
SHARE List or edit a file share or print share
ShellRunAs Run a command under a different user account
SHIFT Shift the position of batch file parameters •
SHORTCUT Create a windows shortcut (.LNK file)
SHUTDOWN Shutdown the computer
SIGCHECK Display file version no. VirusTotal status & timestamp
SLEEP Wait for x seconds
SLMGR Software Licensing Management
SORT Sort input
SSH OpenSSH remote login client
START Start a program, command or batch file •
STREAMS List any Alternate Data Streams (ADS) within a file or directory
STRINGS Search for ANSI and UNICODE strings in binary files
SUBINACL Edit file and folder Permissions, Ownership and Domain
SUBST Associate a path with a drive letter
SXSTRACE Diagnose side-by-side problems
SYSMON Monitor and log system activity to the Windows event log
SYSTEMINFO List system configuration
T
TAKEOWN Take ownership of a file
TAR Store, list or extract files in an archive
TASKLIST List running applications and services
TASKKILL End a running process
TELNET Communicate with another host using the TELNET protocol
TIME Display or set the system time •
TIMEOUT Delay processing of a batch file/command
TITLE Set the window title for a CMD.EXE session •
TLIST Task list with full path
TOUCH Change file timestamps
TRACERT Trace route to a remote host
TREE Graphical display of folder structure
TSDISCON Disconnect a Remote Desktop Session
TSKILL End a running process
TYPE Display the contents of a text file •
TypePerf Write Performance Monitor data to a log file
TZUTIL Time Zone Utility
V
VBC Visual Basic compiler
VER Display version information •
VERIFY Verify that files have been saved •
VMConnect Connect to a Hyper-V Virtual Machine
VOL Display a disk label •
VSSADMIN Display volume shadow copy backups + writers/providers
W
W32TM Time Service
WAITFOR Wait for or send a signal
WBADMIN Windows Backup Admin
WECUTIL Windows Event Collector Utility
WEVTUTIL Clear event logs, enable/disable/query logs
WHERE Locate and display files in a directory tree
WHOAMI Output the current UserName and domain
WHOIS Lookup the registration record for a domain
WINDIFF Compare the contents of two files or sets of files
WINGET Windows Package Manager (coming May 2021)
WINMGMT Manage the WMI service/WMI repository
WINRM Windows Remote Management
WINRS Windows Remote Shell
WMIC WMI Commands
WPEUTIL Run Preinstallation Environment (WinPE) commands
WPR Windows Performance Recorder
WT Windows Terminal
WUSA Windows Update Standalone Installer
WUAUCLT Windows Update
X
XCACLS Change file and folder permissions
XCOPY Copy files and folders
:: Comment / Remark •
To scroll this page, press [ a – z ] on the keyboard, or '\' to Search.
Commands marked • are Internal commands only available within the CMD shell.
All other commands (not marked with •) are external commands.
External commands may be used under the CMD shell, PowerShell, or directly from START-RUN.