0% found this document useful (0 votes)
82 views7 pages

MS-DOS and Command Line Overview: Topics Briefing

This document provides an overview of various MS-DOS commands and their descriptions. It lists over 50 common MS-DOS commands, such as DIR, COPY, DEL, FORMAT, CHKDSK, EDIT, TYPE, MORE, ATTRIB, LABEL, DISKCOMP, DISKCOPY, FDISK, XCOPY, MODE, PRINT, PROMPT, PATH, MD, RD, REN, COPY, MOVE, TYPE, DATE, TIME, CLS, ECHO, PAUSE, CLS, COLOR, ASSOC, ATTRIB, COMP, FIND, FINDSTR, GRAFTABL, KEYB, LABEL, LH, LOADFIX, LOADHIGH, MEM, MK

Uploaded by

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

MS-DOS and Command Line Overview: Topics Briefing

This document provides an overview of various MS-DOS commands and their descriptions. It lists over 50 common MS-DOS commands, such as DIR, COPY, DEL, FORMAT, CHKDSK, EDIT, TYPE, MORE, ATTRIB, LABEL, DISKCOMP, DISKCOPY, FDISK, XCOPY, MODE, PRINT, PROMPT, PATH, MD, RD, REN, COPY, MOVE, TYPE, DATE, TIME, CLS, ECHO, PAUSE, CLS, COLOR, ASSOC, ATTRIB, COMP, FIND, FINDSTR, GRAFTABL, KEYB, LABEL, LH, LOADFIX, LOADHIGH, MEM, MK

Uploaded by

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

Topics Briefing Other notes(s)

MS-DOS and command line overview


Command Description
ansi.sys Defines functions that change display graphics, control cursor movement, and reassign keys.
append Causes MS-DOS to look in other directories when editing a file or running a command.
arp Displays, adds, and removes arp information from network devices.
assign Assign a drive letter to an alternate letter.
assoc View the file associations.
at Schedule a time to execute commands or programs.
atmadm Lists connections and addresses seen by Windows ATM call manager.
attrib Display and change file attributes.
batch Recovery console command that executes a series of commands in a file.
bcdedit Modify the boot configuration data store.
bootcfg Recovery console command that allows a user to view, modify, and rebuild the boot.ini file.
break Enable and disable Ctrl+C feature.
cacls View and modify file ACL's.
call Calls a batch file from another batch file.
cd Changes directories.
chcp Supplement the international keyboard and character set information.
chdir Changes directories.
chkdsk Check the hard drive running FAT for errors.
chkntfs Check the hard drive running NTFS for errors.
choice Specify a listing of multiple options within a batch file.
clip Redirect command line output to the Windows clipboard.
cls Clears the screen.
cmd Opens the command interpreter.
color Change the foreground and background color of the MS-DOS window.
command Opens the command interpreter.
comp Compares files.
compact Compresses and uncompress files.
control Open Control Panel icons from the MS-DOS prompt.
convert Convert FAT to NTFS.
copy Copy one or more files to an alternate location.
ctty Change the computer's input/output devices.
date View or change the systems date.
debug Debug utility to create assembly language programs to modify hardware settings.
defrag Re-arrange the hard drive to help with loading programs.
del Deletes one or more files.
delete Recovery console command that deletes a file.
deltree Deletes one or more files or directories.
dir List the contents of one or more directory.
disable Recovery console command that disables Windows system services or drivers.
diskcomp Compare a disk with another disk.
diskcopy Copy the contents of one disk and place them on another disk.
doskey Command to view and execute commands that have been run in the past.
dosshell A GUI to help with early MS-DOS users.
driverquery Display a list of installed device drivers.
drivparm Enables overwrite of original device drivers.
echo Displays messages and enables and disables echo.
edit View and edit files.
edlin View and edit files.
emm386 Load extended memory manager.
enable Recovery console command to enable a disable service or driver.
endlocal Stops the localization of the environment changes enabled by the setlocal command.
erase Erase files from computer.
exit Exit from the command interpreter.
expand Expand a Microsoft Windows file back to its original format.
extract Extract files from the Microsoft Windows cabinets.
fasthelp Displays a listing of MS-DOS commands and information about them.
fc Compare files.
fdisk Setup drive by create and managing partitions on the hard drive.
find Search for text within a file.
findstr Searches for a string of text within a file.
fixboot Writes a new boot sector.
fixmbr Writes a new boot record to a disk drive.
for Boolean used in batch files.
format Command to erase and prepare a disk drive.
ftp Command to connect and operate on an FTP server.
fType Displays or modifies file types used in file extension associations.
goto Moves a batch file to a specific label or location.
graftabl Show extended characters in graphics mode.
help Display a listing of commands and brief explanation.
if Allows for batch files to perform conditional processing.
ifshlp.sys 32-bit file manager.
ipconfig Network command to view network adapter settings and assigned values.
keyb Change layout of keyboard.
label Change the label of a disk drive.
lh Load a device driver in to high memory.
listsvc Recovery console command that displays the services and drivers.
loadfix Load a program above the first 64 k.
loadhigh Load a device driver in to high memory.
lock Lock the hard drive.
logoff Logoff the currently profile using the computer.
logon Recovery console command to list installations and enable administrator login.
map Displays the device name of a drive.
md Command to create a new directory.
mem Display memory on system.
mkdir Command to create a new directory.
mklink Creates a symbolic link.
mode Modify the port or display settings.
more Display one page at a time.
move Move one or more files from one directory to another directory.
msav Early Microsoft virus scanner.
msd Diagnostics utility.
mscdex Utility used to load and provide access to the CD-ROM.
nbtstat Displays protocol statistics and current TCP/IP connections using NBT.
net Update, fix, or view the network or network settings.
netsh Configure dynamic and static network information from MS-DOS.
netstat Display the TCP/IP network protocol statistics and information.
nlsfunc Load country specific information.
nslookup Look up an IP address of a domain or host on a network.
path View and modify the computer's path location.
pathping View and locate locations of network latency.
pause Command used in batch files to stop the processing of a command.
ping Test and send information to another network computer or network device.
popd Changes to the directory or network path stored by the pushd command.
power Conserve power with computer portables.
print Prints data to a printer port.
prompt View and change the MS-DOS prompt.
pushd Stores a directory or network path in memory so it can be returned to at any time.
qbasic Open the QBasic.
rd Removes an empty directory.
ren Renames a file or directory.
rename Renames a file or directory.
rmdir Removes an empty directory.
robocopy A robust file copy command for the Windows command line.
route View and configure Windows network route tables.
runas Enables a user to run a program as a different user.
sc Communicate with the Service Control Manager and services.
scandisk Run the ScanDisk utility.
scanreg Scan registry and recover registry from errors.
set Change one variable or string to another.
setlocal Enables local environments to be changed without affecting anything else.
setver Change MS-DOS version to trick older MS-DOS programs.
share Installs support for file sharing and locking capabilities.
shift Changes the position of replaceable parameters in a batch program.
shutdown Shutdown the computer from the MS-DOS prompt.
smartdrv Create a disk cache in conventional memory or extended memory.
sort Sorts the input and displays the output to the screen.
start Start a separate window in Windows from the MS-DOS prompt.
subst Substitute a directory on your computer for another drive letter.
switches Remove add functions from MS-DOS.
sys Transfer system files to disk drive.
telnet Telnet to another computer or device from the prompt.
time View or modify the system time.
title Change the title of their MS-DOS window.
tracert Visually view a network packets route across a network.
tree View a visual tree of the hard drive.
Type Display the contents of a file.
undelete Undelete a file that has been deleted.
unformat Unformat a hard drive.
unlock Unlock a disk drive.
ver Display the version information.
verify Enables or disables the feature to determine if files have been written properly.
vol Displays the volume information about the designated drive.
xcopy Copy multiple files, directories, or drives from one location to another.

Command and Usage Examples


ATTRIB ATTRIB -R -A -S -H <VIRUS.EXE>
Change file attributes. + adds an attribute, - removes it. Attributes are: A=archive; R=read All these attributes will be removed from virus.exe.

only; S=system; H=hidden.


C: C:
C:
Go to the C: drive. Similarly A: and D: etc.
CD\ takes you to the top of the directory tree
CD
(typically to C:) .
Change directory. When you change directory, the prompt changes, showing the path of
the directory you are currently in.
CD.. moves you one level up the
directory tree (i.e. up towards the root
directory).
Note, directory is the term used by DOS for what Windows calls a folder.
CD <DIRECTORYNAME> takes you to that
directory. You can use one or more
subdirectory names, separated by \
CD WINNT\Media takes you to the
directory C:\WINNT\Media
To change to another path, type the
full path with slashes. e.g.
CD \WINDOWS\SYSTEM
CLS CLS
Clear the screen.
DEL DEL <VIRUS.EXE> deletes virus.exe
Delete one or more files in the current directory. Can be used with the * and the ? wildcards.
DEL *.JPGwill delete all files with the
extension JPG.
DEL *.* will delete ALL files in the current directory, USE WITH CAUTION.
DEL MY*.*will delete all files beginning
with MY and with any extension.
(Note: DEL cannot be used to delete directories. Use RD to remove a directory.)
DEL MY??.* will delete files that are 4
characters long and begin with MY
and with any extension.
DIR DIR displays all files and folders in the
current directory. Folders are indicated
in the list by <DIR>.
Displays the contents of a directory (folder). Files are usually listed by name.
DIR /P displays the contents a page at
a time, i.e. as many as will fit in your
Note, directory is the term used by DOS for what Windows calls a folder.
command line window. Press any key
to display the next page.

DIR /W displays the files/folders in


These switches can be combined, so DIR /W /P will return multiple rows listing a page at a
multiple rows. This view gives less
time.
information per file.
DIR *.JPG displays all files with the
You can use the * and the ? wildcards to search for a particular file. The ? character
extension JPG in the current directory
represents ONE character, and the * character represents multiple characters.
and all subdirectories.
DIR MY??.* displays all files beginning
DIR *.* lists all the files in a directory. with MY, exactly 4 characters long,
and with any extension.
DIR /S lists the contents of all
subdirectories.
DIR /AH displays all hidden files.
EDIT <VIRUSLOG.TXT> opens the file
EDIT
viruslog.txt and allows you to edit it.
Runs DOS EDIT (a simple text editor). Useful for editing batch files and viewing logs. This
command requires QBASIC.EXE to be present.
EDIT <NEWFILE.TXT> creates a new file
called newfile.txt and opens it up for
you to edit.
HELP
displays information on the
HELP DIR
Displays DOS Help. For help on an individual command, type HELP then the command for
DIR command.
which you want more information.
MD
creates a new directory
MD <NEWDIR>
Make Directory creates a new directory below the current one. (The command can also be
called Newdir.
written as MKDIR.)
PRINT PRINT <LOGFILE.TXT>
Prints the specified file (if the printer is supported in DOS - many are not).
Prints LOGFILE.TXT
RD
Remove directory. Removes a sub-directory of the current directory. The directory you RD <DIRECTORYNAME>
want to remove must be empty of all files. (The command can also be written as RMDIR)
RENAME
RENAME <OLDNAME.EXE> <NEWNAME.EXE>
Rename a file. You must use the full file name including the suffix.
TYPE
Displays the contents of a file on the screen. If you use this command on a file which is not
TYPE C:\README.TXT|MORE
a text file, the display will be unintelligible. Use with |MORE to display the text on a page by
page basis, and prevent it scrolling off the screen. | is a pipe character.
> COMMAND > FILENAME.TXT
When you run a DOS command, output is usually sent to the screen. Use > to redirect
output from the screen to a file. It runs the command preceding the >, creates a file in the
current directory with the name you specify, and sends the information/output returned by
the command, to that file.
e.g. SWEEP > REPORT.TXT The
details of any infected files reported
by SWEEP are sent to a file called
Accessing the command prompt from Windows
1. At the task bar, select Start|Run.
2. Type
CMD
or on some versions of Windows
COMMAND
3. Click OK.
A command prompt will open.

You might also like