0% found this document useful (0 votes)
126 views30 pages

Common DOS Internal Commands

dos

Uploaded by

santo nino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views30 pages

Common DOS Internal Commands

dos

Uploaded by

santo nino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

common DOS internal commands.

Includes usage of: TIME,


DATE, CLS, DIR, COPY, TYPE, DEL, REN, RD, MD, CD, PATH, and SET PROMPT.
DOS Internal Commands
These DOS commands are called internal commands because their code is included in COMMAND.COM, the
DOS and Windows 9x command processor. Since COMMAND.COM is loaded into primary memory when DOS or
Windows 9x is booted, the internal commands are always in memory and can be executed any time without first
being fetched from disk (secondary memory).
This is in contrast to the disk-bound external commands, which reside only in secondary memory until the
moment they are needed. Then they are loaded into primary memory by the operating system, but only if the
OS can find the program on disk.
The syntax for frequently used DOS internal commands follows.
TIME
Displays current time and allows it to be changed.
Syntax:
TIME
DATE
Displays current date and allows it to be changed.
Syntax:
DATE
CLS
Clears the screen.
Syntax:
CLS
DIR
Shows directory information of a diskette: name, size, and the date and time stamp of files.
Syntax:
DIR [d:][path]
Optional switches:
/p Display dir info and pauses display when the screen is full
/w Display names and extensions only in five columns
To display a file directory listing for D:\DATA\LETTER\ANNUAL from different current
directories:
D:\DATA\LETTER\ANNUAL> DIR
D:\DATA> DIR LETTER\ANNUAL
C:\WINDOWS> DIR D:\DATA\LETTER\ANNUAL
COPY
Copies a file. Name of copy may be the same as original, or different. Syntax:
COPY [d:][path][name.ext] [d:][path][name.ext]
Syntax and usage of Common DOS Internal Commands http://hermit.cc/it/dos/dosint.htm
1 of 4 28-09-2024, 08:43
Optional switches:
/v Verify, copies the file and compares it with the original
/b Binary file
To copy a file from D:\BATCH to the root of A: drive
A:\> COPY D:\BATCH\CL.BAT (from A: drive)
D:\BATCH> COPY CL.BAT A:\ (from D:\BATCH)
To copy a file from the root of C: to A: drive and change its name
A:\> COPY C:\MSDOS.SYS MSDOSSYS.BAK (from A:)
C:\> COPY MSDOS.SYS A:\MSDOSSYS.BAK (from the root of C:)
To copy all of the files from the root of A: to D:\CCV\ENGCOMP
A:\> COPY *.* D:\CCV\ENGCOMP (from A:)
D:\CCV\ENGCOMP> COPY *.* A:\ (from D:\CCV\ENGCOMP)
TYPE
Displays the contents of a file.
Syntax:
TYPE [d:][path][name.ext]
To display the contents of the file MY.LET to the screen
A:\> TYPE MY.LET
DEL
Deletes a file from disk.
Syntax:
DEL [d:][path][name.ext]
To delete one file:
A:\> DEL A:\MY.LET
To del all files in current directory
A:\> DEL *.*
REN
Renames a file.
Syntax:
REN [d:][path][name.ext] [d:][path][newname.ext]
To change the name of the file D:\LET\ANNUAL\99.DOC to 1999.DOC
D:\LET> REN ANNUAL\99.DOC 1999.DOC (from D:\LET)
D:\DATA> REN \LET\ANNUAL\99.DOC 1999.DOC (from D:\DATA)
C:\WINDOWS> REN D:\LET\ANNUAL\99.DOC 1999.DOC (from C:\WINDOWS)
MD
Makes (creates) a new directory.
Syntax:
MD [d:][path][dirname]
To create a directory named HERMIT in the root of D: drive
D:\> MD HERMIT (from D:\)
C:\> MD D:\HERMIT (from C:\)
RD
Removes an existing directory (directory must be empty).
Syntax:
RD [d:][path][dirname]
To remove the HERMIT sub-directory:
D:\> RD HERMIT (from D:\)
C:\> RD D:\HERMIT (from C:\)
CD
Changes the current directory.
Syntax:
CD [path][dirname]
To make D:\HERMIT the current directory
D:\> CD HERMIT (from D:\)
D:\DATA> CD \HERMIT (from D:\DATA)
D:\DATA\SOURCE> CD \HERMIT (from D:\DATA\SOURCE)
D:\DATA\SOURCE> CD .. (from D:\DATA\SOURCE)
PATH
The PATH command is used to help the command interpreter find external commands which are not in the
current directory. The command interpreter looks into the DOS environment for "PATH=" and then searches the
paths (each separated from the next by a semicolon) that
follow.
Syntax:
PATH=[path;path;...]
To set the DOS PATH:
PATH=C:\DOS;C:\PCW;\C:\BIN
To display the current path:
PATH
SET PROMPT
Used to specify the appearance of the DOS prompt.
Syntax:
SET PROMPT=[metastring] (from the command line)
PROMPT=[metastring] (in a batch file)
Metastrings are combinations of DOS PROMPT characters
DOS PROMPT Character Resulting prompt
$b |
$e (EOF marker)
$h destructive bk space erases >, so just blinking cursor
$n default drive
$q =
$v DOS version no
$$ the $ sign
$d system date
$g >
$i <
$p full path description
$t system time
$p$_ full path description, skips line (_ = CR and LF)
Examples (from command line)
To make the prompt display the current drive & current path followed by >
SET PROMPT=$P$G
To have the prompt display the current date, time, and drive on separate lines
SET PROMPT= $D$_$T$_$N$G
Lecture By Amit Kumar
Disk Operating
System (MS DOS)
Disk Operating System (DOS)
In the 1980s or early 1990s, the operating system that shipped with most PCs was a version of the Disk perating
System (DOS) created by Microsoft: MS-DOS. MS-DOS is a disk operating system for IBM PC–compatible
computers. In its day, it was easily the most popular operating system in the world.
As with any other operating system, its function is to oversee the operation of the system by providing support
for executing programs, controlling I/O devices, handling errors, and providing the useri nterface.
MS-DOS is a disk-based, single-user, single-task operating system. These qualities make it one of the easiest disk
operating systems to understand.
The main portions of MS-DOS are the IO.SYS, MSDOS.SYS, and COMMAND.COM files.
IO.SYS and MSDOS.SYS are special, hidden system files The IO.SYS file moves the system’s basic I/O
functions into memory and then implements the MS- DOS default control programs, referred to as device
drivers, for various hardware components.
These include the following:
The boot disk drive
The console display and keyboard
The system’s time-of-day clock
The parallel and serial communications port
DOS FILESDOS FILES
COMMAND.COM
The COMMAND.COM command interpreter accepts commands issued through the keyboard, or other
input device, and carries them out according to the commands definition When DOS runs an application,
COMMAND.COM finds the program, loads it into memory, and then gives it control of the system. When the
program is shut down, it passes control back to the command interpreter.
Popular DOS Versions
MS-DOS 3
With DOS 3.0, released in summer 1984, Microsoft continued to include additional DOS features and to support
more powerful hardware. DOS 3.0 supported hard drives larger than 10MB, as well as enhanced graphics
formats. Three revisions—3.1, 3.2, and 3.3—provided additional innovations
MS-DOS 4
By 1988 it was apparent that the wave of the future was the graphical interface, and DOS 4
provided users with the DOS Shell, a utility much like the Windows File Manager. Actually, DOS Shell was simply
a scaled- down version of Windows that allowed users to manage files, run programs, and do routine
maintenance, all from a single screen. The DOS Shell even supported a mouse.
MS-DOS 5
There were several important features introduced in the 1991 release of DOS 5.0. First
of all, the ability to load drivers into reserved (upper) memory was a relief to those people
who were constantly running out of conventional memory. This feature allowed more complex
DOS programs. Several software utilities made their debut. The most commonly used utility
introduced at this time was EDIT.COM. Also added were QBASIC.EXE, DOSKEY, UNFORMAT, and UNDELETE.
MS-DOS 6
Released in 1993 to excellent sales, DOS 6.0 offered a number of new commands and configurable options.
Another enhancement in DOS 6.0 was EMM386.EXE, which allowed the system to pool extended and expanded
memory. DOS 6.0 has subsequently been revised a number of times. As of this date, DOS 6.22 is the most
current MS-DOS version available as a stand-alone operating system.
The main functions of DOSThe main functions of DOS DOS translate the command issued of the user
in the format that is understood by the computer to execute it, also error message in the format
for the user to understand.
Manage disk files,
Allocate system resources according to the requirement.
DOS provides features essential to control hardware devices such as Keyboard, Screen, Disk Devices, Printers,
Modems and programs.
Loading of DOS
The system start-up routine of ROM runs a test called Power On Self Test (POST) which check whether
peripherals connected to the computer are working or not & RAM memory.
The ROM bootstrap loader attempts to read the Boot record and if successful, passes the control on to it. The
instructions/programs in the boot record then load the rest of the program.
The boot tries to load the DOS into the memory by reading the two hidden files IO.SYS, MSDOS.SYS,
If these two are found, they are loaded along with the DOS command interpreter
COMMAND.COM.
COMPUTER FILES IN DOS2.4
A file may contain a program or any other kind of information. DOS permits the user to assign a name consisting
of two parts to a file - primary (a maximum of eight characters consisting of Characters, alphabets, Number and
Hyphen), and secondary names( should consist of three characters, which is optional) this two parts separated
by a dot (.).
Using an extension is specified, using the complete name . Using extensions can be an excellent way of naming
a file so that it can be identified easily.
Examples:
Secondary Name SeparatorPrimary Name
Filename
EmployeeEmployee . ExeEmployeeEmployee.Exe
. DbfEmployeeEmployee.Dbf
DOS has a way of showing which disk drive is currently active. The floppy disk drives are assigned alphabets A
and B, whereas the hard disk drive is assigned the alphabet C.
Ex: If your PC includes a hard disk, besidesa FDD (Floppy Disk Drive), the drive names would be A and C. If the
prompt is A,then it implies that the first floppy disk drive is active. Where as the DOS prompt would be C, if the
hard disk is active. Data as well as instructions reside in a file stored in a disk.
DIRECTORY STRUCTURE3.4
IN DOS
Directory is just like a file folder, which contain all the logically related files. DOS files are organized in a
hierarchical or an inverted tree-like structure.
DOS enables the user to organize the files in a disk into directories and sub-directories
A directory within another directory is called a sub-directory Of course, there may be sub-directories of sub-
directories, subsub.
Levels of Directory Systems
DIRECTORY COMMAND4.4
The directory, the user is in at any point of time, is called the WORKING/PRESENT/CURRENT directory.
DOS indicates which directory you are in by displaying the directory's name in the command prompt.
For example, the following command prompt indicate that you are in the DOS directory: C:\DOS>.
Knowing which directory is current helps you find files, and to move from one directory to another more easily.
Typically, the ROOT DIRECTORY (\) is the initial
working directory. The entire specification of directory from root is called a PATH. By itself, the DIR commandis
applicable to the working/present directory. The names of the sub-directories at adjacent levels are separated
by backslash (\), while specifying the path to be followed while traveling to a sub-directory.
USING PATH TO SPECIFY5.4
THE LOCATION OF FILES
A path is the route that leads from the
root directory of a drive to the file you want to
use.
For example , to access C:\NOS\LETTER\NOS.LET
Where (C:) represent the drive the file
is on , 1st (\) is the root directory.
2 nd (\) separates the NOS
directory from the LETTER sub-directory .
3rd (\) separates the LETTER sub-
directories from the file name,
NOS.LET.
20
Internal File COMMANDS
1. Dir
2. Rename (Ren)
3. Delete (Del)
4. Copy
5. Type
7. Set Attributes (attrib)
DOS (Disk Operating System) 1
Introduction:
DOS (Disk Operating System) is an oldest type of Operating System. Disk Operating System is abbreviated as
DOS. DOS is a CUI type of Operating System. In computer science, a generic term describing any operating
system is system software which is loaded from disk devices when the system is started or rebooted. DOS is a
single-tasking,
single-user operating system with a command-line interface. DOS acts on commands. Because DOS is ready to
perform when given proper command hence, it is also known as Command Prompt. Commands are certain
words of English language or short form of English words. The meaning of these word or short form is already
known to DOS. Since, DOS recognized these words and hence acts accordingly. These words and short forms of
the English words are better known as commands.
Internal Command:-Those commands which are already stored in the “Command.Com” file of DOS are known as
internal commands. For example, CLS, VOL, TIME, DATE, COPY etc
External Command:-Those commands which are not included in the command.com file of DOS rather included
in other files of DOS are known as external commands. It is formatted according to programme. For example,
TREE, FORMAT, MODE etc
Some Internal Commands:-
1. CLS To clear the screen.
\>cls 
2. DIR To view the directory and files
C:\>Dir 
3. DATE To View and change the date
C:\>Date 
Current date is: 01-01-2008
Enter new date (mm/dd/yy):21-03-2009 
4. TIME To view and change the time.
C:\>Time 
The current time is: 06:11:56.45a
Enter new time:1:15:48.57p 
5. Exit To exit from DOS screen.
C:\>Exit
6. Cd\ To go to the root/main directory
C:\Computer\Monitor>cd\ 
C:\>
7. Cd To change the directory.
C:\>CD φ<Directory Name> 
8. Cd.. To go one directory back.
C:\Computer\Monitor>cd.. 
C:\Computer>
9. Cd... To go two directory back.
C:\Computer\Monitor>cd... 
C:\>
DOS (Disk Operating System) 2
10. Md To make a new directory
C:\> MD φ<Directory Name> 
11. Rd To remove any existing directory
C:\>RD φ <Directory Name> 
12. Copy Con To create a file.
C:\>COPY φ CON φ<FILE NAME> 
13. COPY To copy the file.
C:\>Copyø<File Name>ø<New File Name> 
14. Del To delete a file
C:\>DEL φ <File Name>
15. Ren To rename the file
C:\>REN φ <OLD FILE NAME> φ <NEW FILE NAME> 
16. Ver To check the version of DOS
C:\>VER
17. Type To display the contents.
C:\>TYPE φ<File Name> 
18. Vol To check DOS volume.
C:\>Vol 
19. Label To apply label to any drive.
C:\> Label <Name> 
20. Attrib To change the attribute of a directory or a file.
c:\>Attribø<File Name>ø+h/-hø+s/-sø+r/-r 
21. Color To change the colour of background and font of DOS screen
c:\>color <any digit from 0 to 9 or ABCDEF>
Some External Commands:-
1. FORMAT To format any Drive.
C:\>FORMAT φ<DRIVE> 
2. TREE To view directory & Sub directory
C:\>Treeø<Directery Name> 
3. CHKDSK To Check disk or drive
C:\>Chkdsk 
4. MOVE To move any file to any location.
C:\>Move<sorce File Name>ø<Destination> 
5. Edit To edit or modify the contents of the text file.
C:\> EDIT φ <File Name> 
If we have installed WINDOWS as our main Operating System then we get a DOS environment within
WINDOWS. MS DOS (Microsoft DOS) environment can be run on computer through WINDOWS in following way:
DOS (Disk Operating System) 3 Click on start button and in the list produced click on “RUN” option. A dialog box
appears. In this dialog box, type cmd or command in the given box next to label “Open”. Press
enter or click on OK button. DOS will open on your computer screen. Start  RUN
RUN dialog box. DOS Screen
List of MS-DOS commands, switches and parameters
In this tutorial we will explore the MS-DOS commands and learn about switches and parameters. If you have not
seen it yet, we recommend reading the tutorial Windows command line or MS-DOS prompt.
These commands are used in both the command line interface, as in programming batch files, which are widely
used in servers and software development tools.
Specify one or more files or directories
MS-DOS commands make little difference between a file and a directory. When we see the word file in a help
command, it usually refers either to a file or a directory.
To refer to a file or directory we use [drive:] [path] [filename]:
 Full name <drive>: <directories> \ <file or directory>: this always works.
Eg: c:\windows\notepad.exe
 Only file name <file or directory>: this only works if we are on the same drive and directory where the file is.
Eg: c:\windows>notepad.exe
 If we don´t specify the unit or directory: it will take the unit or the current directory, respectively.
Eg: C:\>\windows\notepad.exe or C:\Windows>c:notepad.exe
If we want to select all files with a certain extension or name, you can use the wildcard *.
Eg: dir *.txt will show us all the files with the extension txt
Eg: dir edu.* will show us all the files with the name edu, regardless the extension.
Switches and parameters of a MS-DOS command
Switches always begin with a "/". Switches allow you to modify the default operation of specific commands. If
you use the modifier /? in a command, it will show the help command with all the switches available. Consider,
for example, the DIR command:
C:\>dir /?

Displays a list of files and subdirectories in a directory.


DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
Specifies drive, directory, or files to list.

/A Displays files with specified attributes.


attributes:
D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files I Not content indexed files
L Reparse Points - Prefix meaning not

/B Uses bare format (no heading information or summary).


/C Display the thousand separator in file sizes. This is the default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/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 (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/R Display alternate data streams of the file.
/S Displays files in specified directory and all subdirectories.
/T Control what time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file names.
The format is that of /N with the short name inserted before the long name.
If no short name is present, blanks are displayed in its place.
/4 Displays four-digit years

Switches can be preset in the environment variable DIRCMD.


These can be overridden by preceding each modifier with - (hyphen), for example, /-W.

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

25/05/2012 14:21 <DIR> $Recycle.Bin


19/11/2012 19:39 <DIR> android
19/10/2011 01:34 <DIR> AsusVibeData
10/01/2013 14:48 <DIR> Autodesk
29/07/2009 03:03 <DIR> Boot
14/07/2009 02:08 <JUNCTION> Documents and Settings [C:\Users]
26/03/2014 11:35 <DIR> eclipse
23/01/2013 14:17 <DIR> eclipseclasic
26/05/2012 15:40 <DIR> eclipseclasic64
02/02/2012 21:03 <DIR> eSupport
02/02/2012 20:52 <DIR> Intel
05/03/2014 18:22 <DIR> libgdx
14/07/2009 00:20 <DIR> PerfLogs
26/03/2014 11:27 <DIR> Program Files
13/04/2014 23:26 <DIR> Program Files (x86)
24/03/2014 19:48 <DIR> ProgramData
25/05/2012 14:18 <DIR> Recovery
21/04/2014 03:47 <DIR> System Volume Information
01/08/2012 01:38 <DIR> testjava
25/05/2012 14:20 <DIR> Users
27/06/2013 13:55 <DIR> Windows
0 files 0 bytes
21 dirs 38.466.011.136 free bytes
Redirecting the output of a command
We can redirect the output of any command or program to a file using > to replace the contents of the target
file or >> to add it to the end of the file.

Eg: "dir > dir.txt" or "dir >> dirs.txt"

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

ADDUSERS Add or list users to/from a CSV file


ADmodcmd Active Directory Bulk Modify
ARP Address Resolution Protocol
ASSOC Change file extension associations•
ASSOCIAT One step file association
AT Schedule a command to run at a specific time
ATTRIB Change file attributes
BCDBOOT Create or repair a system partition
BCDEDIT Manage Boot Configuration Data
BITSADMIN Background Intelligent Transfer Service
BOOTCFG Edit Windows boot settings
BROWSTAT Get domain, browser and PDC info
CACLS Change file permissions
CALL Call one batch program from another•
CERTREQ Request certificate from a certification authority
CERTUTIL Utility for certification authority (CA) files and services
CD Change Directory - move to a specific Folder•
CHANGE Change Terminal Server Session properties
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
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
COMPRESS Compress one or more files
CONVERT Convert a FAT drive to NTFS
COPY Copy one or more files to another location•
CSCcmd Client-side caching (Offline Files)
CSVDE Import or Export Active Directory data
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
DIRUSE Display disk usage
DISKPART Disk Administration
DISKSHADOW Volume Shadow Copy Service
DISKUSE Show the space used in folders
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 for items in 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
ECHO Display message on screen•
ENDLOCAL End localisation of environment changes in a batch file•
ERASE Delete one or more files•
EVENTCREATE Add a message to the Windows event log
EXIT Quit the current script/routine and set an errorlevel•
EXPAND Uncompress CAB files
EXTRACT Uncompress CAB files
FC Compare two files
FIND Search for a text string in a file
FINDSTR Search for strings in files
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•
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
HELP Online Help
HOSTNAME Display the host name of the computer
iCACLS Change file and folder permissions
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
LABEL Edit a disk label
LOGMAN Manage Performance Monitor
LOGOFF Log a user off
LOGTIME Log the date and time in a file
MAKECAB Create .CAB files
MAPISEND Send email from the command line
MBSAcli Baseline Security Analyzer
MEM Display memory usage
MD Create new folders•
MKLINK Create a symbolic link (linkd) •
MODE Configure a system device
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)
NET Manage network resources
NETDOM Domain Manager
NETSH Configure Network Interfaces, Windows Firewall & Remote access
NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)
NOW Display the current Date and Time
NSLOOKUP Name server lookup
NTBACKUP Backup folders to tape
NTDSUtil Active Directory Domain Services management
NTRIGHTS Edit user account rights
OPENFILES Query or display open files
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 and display a message•
PERMS Show permissions for a user
PERFMON Performance Monitor
PING Test a network connection
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 or rename a printer
PRNMNGR Add, delete, list printers and printer connections
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•
QGREP Search file(s) for lines that match a given pattern
Query Process / QPROCESS Display processes
Query Session / QWinsta Display all sessions (TS/Remote Desktop)
Query TermServer /QAppSrv List all servers (TS/Remote Desktop)
Query User / QUSER Display user sessions (TS/Remote Desktop)
RASDIAL Manage RAS connections
RASPHONE Manage RAS connections
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
RD Delete folder(s)•
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)
SC Service Control
SCHTASKS Schedule a command to run at a specific time
SET Display, set, or remove session environment variables•
SETLOCAL Control the visibility of environment variables•
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
SLEEP Wait for x seconds
SLMGR Software Licensing Management (Vista/2008)
SORT Sort input
START Start a program, command or batch file•
SUBINACL Edit file and folder Permissions, Ownership and Domain
SUBST Associate a path with a drive letter
SYSTEMINFO List system configuration
TAKEOWN Take ownership of a file
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
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
TSSHUTDN Remotely shut down or reboot a terminal server
TYPE Display the contents of a text file•
TypePerf Write performance data to a log file
VER Display version information•
VERIFY Verify that files have been saved•
VOL Display a disk label•
WAITFOR Wait for or send a signal
WEVTUTIL Clear event logs, enable/disable/query logs
WHERE Locate and display files in a directory tree
WHOAMI Output the current UserName and domain
WINDIFF Compare the contents of two files or sets of files
WINRM Windows Remote Management
WINRS Windows Remote Shell
WMIC WMI Commands
WUAUCLT Windows Update
XCACLS Change file and folder permissions
XCOPY Copy files and folders

For more information about tools, consult the reference


from the command line in Help.
If you run HELP followed by a command name, we will get the help command detail, like when we use the
switch /?
Eg: if we execute "HELP HELP" or "HELP /?" we obtain:
C:\>HELP HELP
Provides Help information for Windows commands.

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

To delete a disk 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)

Delete the Logical Partition first


Delete the Extended Partititon
Delete the Primary Partition
EDIT (a text editor in DOS and use to configure files)
C:\>EDIT
C:\>edit /?
MS-DOS Editor Version 2.0.026 Copyright (c) Microsoft Corp 1995.
EDIT [/B] [/H] [/R] [/S] [/<nnn>] [/?] [file(s)]
/B - Forces monochrome mode.
/H - Displays the maximum number of lines possible for your hardware.
/R - Load file(s) in read-only mode.
/S - Forces the use of short filenames.
/<nnn> - Load binary file(s), wrapping lines to <nnn> characters wide.
/? - Displays this help screen.
[file] - Specifies initial files(s) to load. Wildcards and multiple
filespecs can be given.

COPY (copies one or more files to another location)


C:>COPY example.txt EXAMPLE(example being a directory)
C:\>copy /?
Copies one or more files to another location.
COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination
[/A | /B]] [/V] [/Y | /-Y]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format)
MOVE (to move a file)
C:\>MOVE example.txt NEW (moved the example.txt to the NEW directory)
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2
[drive:][path]filename1 Specifies the location and name of the file
or files you want to move.
destination Specifies the new location of the file. Destination
can consist of a drive letter and colon, a directory
name, or a combination. If you are moving only one
file, you can also include a filename if you want
to rename the file when you move it.
[drive:][path]dirname1 Specifies the directory you want to rename.
dirname2 Specifies the new name of the directory.
/Y Suppresses prompting to confirm creation of a directory
or overwriting of the destination.
/-Y Causes prompting to confirm creation of a directory or
overwriting of the destination.
The switch /Y may be present in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.
DELETE or ERASE (deletes or erases the files)
C:\>DEL example.txt (WARNING once the files are deleted in DOS its gone)
UNDELETE (undelete DOS files deleted before only available in DOS 5.x and 6.x)
C:\>UNDELETE example.txt
RENAME or REN(renames a DOS file)
C:\>REN autoexec.bat autoexec.bak (this will rename autoexec.bat to autoexec.bak)
XCOPY (copies directories and subdirectories to other directories)
C:\>XCOPY EXAMPLE NEW (copies example directory into new directory)
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.
To copy a floppy disk to another disk
C:\>DISKCOPY a: a: (copies source disk to target disk)
C:\>diskcopy /?
Copies the contents of one floppy disk to another.
DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
/1 Copies only the first side of the disk.
/V Verifies that the information is copied correctly.
/M Force multi-pass copy using memory only.
The two floppy disks must be the same type.
You may specify the same drive for drive1 and drive2.
To view memory that your computer is using
C:\>MEM

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.

To run scandisk in DOS


C:\>SCANDISK
To run defrag in DOS
C:\>DEFRAG
To run a diagnostic program in DOS (only available in DOS 6.22)
C:\>MSD
To run an anti-virus program in DOS (only available in DOS 6.22)
C:\>MSAV
TCP/IP Utilities
WINIPCFG - A GUI utility on Windows 9x that allows you to get info about your IP configuration. It also allows
you to release a DHCP lease and request a new one.

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

Other DOS commands


NSLOOKUP – enables you to determine the name of a DNS server
C:\>nslookup www.escotal.com

COMPACT – displays or alters the compression of on files on NTFS partitions


C:\>compact>compact /c
CIPHER – displays or alters the encryption on NTFS partitions
Converting FAT to NTFS (go to Command Prompt)
CONVERT C:/FS:NTFS

What is DOS ? Complete List of DOS Commands.


Updated: Oct 27, 2022
DOS stands for Disk Operating System and is the computer program no personal computer can do without. It
exists in two forms. The one supplied for IBM Personal Computers is known as PC-DOS. All other compatible
personal computers use MS-DOS. Unlike in Windows, DOS commands are the primary way in which you use the
operating system. Windows and other modern operating systems use a graphics-based system designed for
touch or a mouse.
Shortcut Key: WINKEY + R
1. Accessibility Controls : access.cpl
2. Add Hardware Wizard : hdwwiz.cpl
3. Administrative Tools : control admintools
4. Add/Remove Programs : appwiz.cpl
5. Administrative Tools : control.exe
6. Automatic Updates : wuaucpl.cpl
7. Bluetooth Transfer Wizard : fsquirt
8. Calculator : calc
9. Certificate Manager : certmgr.msc
10. Character Map : charmap
11. Check Disk Utility : chkdsk
12. Clipboard Viewer : clipbrd
13. Command Prompt : cmd
14. Component Services : dcomcnfg
15. Computer Management : compmgmt.msc
16. Control Panel : control
17. Date and Time Properties : timedate.cpl
18. DDE Shares : ddeshare
19. Device Manager : devmgmt.msc
20. Direct X Control Panel (if installed) : directx.cpl
21. Direct X Troubleshooter : dxdiag
22. Disk Cleanup Utility : cleanmgr
23. Disk Defragment : dfrg.msc
24. Disk Management : diskmgmt.msc
25. Disk Partition Manager : diskpart
26. Display Properties : control.exe desktop
27. Display Properties : desk.cpl
28. Display Properties (Color & Appearance) : control color
29. Dr. Watson System Troubleshooting Utility : drwtsn32
30. Driver Verifier Utility : verifier
31. Event Viewer : eventvwr.msc
32. Files and Settings Transfer Tool : migwiz
33. File Signature Verification Tool : sigverif
34. Findfast : findfast.cpl
35. Firefox (if installed) : firefox
36. Folders Properties : control.exe folders
37. Fonts : control.exe fonts
38. Fonts Folder : fonts
39. Free Cell Card Game : freecell
40. Game Controllers : joy.cpl
41. Group Policy Editor (XP Prof) : gpedit.msc
42. Hearts Card Game : mshearts
43. Iexpress Wizard : iexpress
44. Indexing Service : ciadv.msc
45. Internet Explorer : iexplore
46. Internet Properties : inetcpl.cpl
47. Java Control Panel (if installed) : jpicpl32.cpl
48. Java Control Panel (if installed) : javaws
49. Keyboard Properties : control.exe keyboard
50. Local Security Settings : secpol.msc
51. Local Users and Groups : lusrmgr.msc
52. Logs You Out Of Windows : logoff
53. Microsoft Access (if installed) : msaccess
54. Microsoft Chat : winchat
55. Microsoft Excel (if installed) : excel
56. Microsoft Frontpage (if installed) : frontpg
57. Microsoft Paint : mspaint
58. Microsoft Powerpoint (if installed) : powerpnt
59. Microsoft Word (if installed) : winword
60. Microsoft Synchronization Tool : mobsync
61. Minesweeper Game : winmine
62. Mouse Properties : control.exe mouse
63. Mouse Properties : main.cpl
64. Nero (if installed) : nero
65. Network Connections : control netconnections
66. Network Connections : ncpa.cpl
67. Network Setup Wizard : netsetup.cpl
68. Notepad : notepad
69. N-view Desktop manager (if installed) : nvtuicpl.cpl
70. Object Packager : packager
71. ODBC Data Source Administrator : odbccp32.cpl
72. On Screen Keyboard : osk
73. Opens AC3 Filter (if installed) : ac3filter.cpl
74. Paint : pbrush
75. Password Properties : password.cpl
76. Performance Monitor : perfmon.msc
77. Performance Monitor : perfmon
78. Phone and Modem Options : telephon.cpl
79. Phone Dialer : dialer
80. Power Configuration : powercfg.cpl
81. Printers and Faxes : control.exe printers
82. Printers Folder : printers
83. Private Character Editor : eudcedit
84. Quicktime (If Installed) : QuickTime.cpl
85. Regional Settings : intl.cpl
86. Registry Editor : regedit
87. Registry Editor : regedit32
88. Remote Access Phonebook : rasphone
89. Remote Desktop : mstsc
90. Removable Storage : ntmsmgr.msc
91. Removable Storage operator Requests : ntmsoprq.msc
92. Resultant Set of Policy (XP Prof) : rsop.msc
93. Scanners and Cameras : sticpl.cpl
94. Scheduled Tasks : control.exe schedtasks
95. Security Center : wscui.cpl
96. Services : services.msc
97. Shared Folders : fsmgmt.msc
98. Shuts Down Windows : shutdown
99. Sounds and Audio : mmsys.cpl
100. Spider Solitare Card Game : spider
101. SQL Client Configuration : cliconfg
102. System Configuration Editor : sysedit
103. System Configuration Utility : msconfig
104. System File Checker Utility : sfc
105. System Information : msinfo32
106. System Properties : sysdm.cpl
107. Task Manager : taskmgr
108. Telnet Client : telnet
109. Tweak UI (if installed) : tweakui
110. User Account Management : nusrmgr.cpl
111. Utility Manager : utilman
112. Windows Address Book : wab
113. Windows Address Book Import Utility : wabmig
114. Windows Backup Utility (if installed) : ntbackup
115. Windows Explorer : explorer
116. Windows Firewall : firewall.cpl
117. Windows Magnifier : magnify
118. Windows Management Infrastructure : wmimgmt.msc
119. Windows Media Player : wmplayer
120. Windows Picture Import Wizard (need camera) : wiaacmgr
121. Windows System Security Tool : syskey
122. Windows Update Launches : wupdmgr
123. Windows Version : winver
124. Windows XP Tour Wizard : tourstart
125. WordPad Document : write

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.

You might also like