Escolar Documentos
Profissional Documentos
Cultura Documentos
sys
Defines functions that change display graphics, control cursor movement and reassign keys. The
ANSI.SYS device driver supports ANSI terminal emulation of escape sequences to control your system's
screen and keyboard. An ANSI escape sequence is a sequence of ASCII characters, the first two are the
escape character (1Bh) and the left-bracket character (5Bh). The character or characters following the
escape and left-bracket characters specify an alphanumeric code that controls a keyboard or display
function. ANSI escape sequences distinguish between uppercase and lowercase letters; for example, "A"
and "a" have completely different meanings.
Availability
How to load
This device driver must be loaded by a device or devicehigh command in your CONFIG.SYS file.
To load this file within Windows 95/98 the config.sys must have:
device=c:\windows\command\ansi.sys
device=c:\dos\ansi.sys
Syntax
Syntax:
Parameters:
[drive:][path] Specifies the location of the Ansi.sys file. Additional [drive:][path] specifies the location of
the Ansi.sys file. Additional information on where to load these files can be found in the how to load
section.
Switches
/x Remaps extended keys independently on 101-key keyboards.
/k Causes ANSI.SYS to treat a 101-key keyboard like an 84-key keyboard. This is equivalent to the
command SWITCHES=/k. If you usually use the SWITCHES=/k command, you will need to use the /k
switch with ANSI.SYS.
/r Adjusts line scrolling to improve readability when ANSI.SYS is used with screen-reading programs
(which makes computers more accessible to people with disabilities).
Parameters
Ps Selective parameter. Specifies a decimal number that you use to select a function. You can specify
more than one function by separating the parameters with semicolons.
PL Line parameter. Specifies a decimal number that represents one of the lines on your display or on
another device.
Pc Column parameter. Specifies a decimal number that represents one of the columns on your screen
or on another device.
Escape sequences
ANSI escape sequences for cursor movement, graphics, and keyboard settings:
In the below list of ANSI escape sequences, the abbreviation ESC represents the ASCII escape character
27 (1Bh), which appears at the beginning of each escape sequence.
ESC[PL;PcH Cursor Position: Moves the cursor to the specified position (coordinates). If you do not
specify a position, the cursor moves to the home position — the upper-left corner of the
screen (line 0, column 0). This escape sequence works the same way as the below
Cursor Position escape sequence.
ESC[PL;Pcf Cursor Position: Works the same way as the preceding Cursor Position escape sequence.
ESC[PnA Cursor Up: Moves the cursor up by the specified number of lines without changing
columns. If the cursor is already on the top line, ANSI.SYS ignores this sequence.
ESC[PnB Cursor Down: Moves the cursor down by the specified number of lines without changing
columns. If the cursor is already on the bottom line, ANSI.SYS ignores this sequence.
ESC[PnC Cursor Forward: Moves the cursor forward by the specified number of columns without
changing lines. If the cursor is already in the rightmost column, ANSI.SYS ignores this
sequence.
ESC[PnD Cursor Backward: Moves the cursor back by the specified number of columns without
changing lines. If the cursor is already in the leftmost column, ANSI.SYS ignores this
sequence.
ESC[s Save Cursor Position: Saves the current cursor position. You can move the cursor to the
saved cursor position by using the Restore Cursor Position sequence.
ESC[u Restore Cursor Position: Returns the cursor to the position stored by the Save Cursor
Position sequence.
ESC[2J Erase Display: Clears the screen and moves the cursor to the home position (line 0,
column 0).
ESC[K Erase Line: Clears all characters from the cursor position to the end of the line (including
the character at the cursor position).
ESC[Ps;...;Psm Set Graphics Mode: Calls the graphics functions specified by the below values. These
specified functions remain active until the next occurrence of this escape sequence.
Graphics mode changes the colors and attributes of text (such as bold and underline)
displayed on the screen.
Text attributes
1 Bold on
5 Blink on
7 Reverse video on
8 Concealed on
Foreground colors
30 Black
31 Red
32 Green
33 Yellow
34 Blue
35 Magenta
36 Cyan
37 White
Background colors
40 Black
41 Red
42 Green
43 Yellow
44 Blue
45 Magenta
46 Cyan
47 White
Set Mode: Changes the screen width or type to the mode specified by one of the below values:
Reset Mode: Resets the mode by using the same values that Set Mode uses, except for 7, which disables
line wrapping. The last character in this escape sequence is a lowercase L.
ESC[code;string;...p
Set Keyboard Strings: Redefines a keyboard key to a specified string. The parameters for this escape
sequence are defined as follows:
Code is one or more of the values listed in the below table. These values represent keyboard
keys and key combinations. When using these values in a command, you must type the
semicolons shown in this table in addition to the semicolons required by the escape sequence.
The codes in parentheses are not available on some keyboards. ANSI.SYS will not interpret the
codes in parentheses for those keyboards unless you specify the /x switch in the device
command for ANSI.SYS.
String is either the ASCII code for a single character or a string contained in quotation marks. For
example, both 65 and "A" can be used to represent an uppercase A.
Important: Some of the values in the below table are not valid for all computers. Check your computer's
documentation for values that are different.
PAUSE/BREAK - - 0;0 -
ENTER 13 0 10 (0
NULL 0;3 - - -
A 97 65 1 0;30
B 98 66 2 0;48
C 99 66 3 0;46
D 100 68 5 0;18
E 101 69 5 0;18
F 102 70 6 0;33
G 103 71 7 0;34
H 104 72 8 0;35
I 105 73 9 0;23
J 106 74 10 0;36
K 107 75 11 0;37
L 108 76 12 0;38
M 109 77 13 0;50
N 110 78 14 0;49
O 111 79 15 0;24
P 112 80 16 0;25
Q 113 81 17 0;16
R 114 82 18 0;19
S 115 83 19 0;31
T 116 84 20 0;20
U 117 85 21 0;22
V 118 86 22 0;47
W 119 87 23 0;17
X 120 88 24 0;45
Y 121 89 25 0;21
Z 122 90 26 0;44
1 49 33 - 0;120
2 50 64 0 0;121
3 51 35 - 0;122
4 52 36 - 0;123
5 53 37 - 0;124
6 54 94 30 0;125
7 55 38 - 0;126
8 56 42 - 0;126
9 57 40 - 0;127
0 48 41 - 0;129
- 45 95 31 0;130
= 61 43 - 0;131
] 91 123 27 0;26
[ 93 125 29 0;27
92 124 28 0;43
; 59 58 - 0;39
' 39 34 - 0;40
. 46 60 - 0;51
/ 47 63 - 0;53
` 39 34 - 0;40
ANSI
Short for American National Standards Institute, ANSI was founded in 1981, and today is a voluntary
organization composed of over 1,300 members that establish standards for the computer industry.
Below is a listing of related ANSI documents and their associated standards.
X3.221-1994
X3.279-1996
X3.298-1997
NCITS 317-1998
NCITS 340-2000
NCITS 347-2001
Escape sequence
Invented by Bob Bemer, an escape sequence is two or more characters that often begin with an escape
character that tells the computer or software program to perform a function or command. Below is a
listing of some of the commonly used and available escape sequences used in programming languages
and some text editors.
\a Audible bell
\b Backspace
\f Form feed
\n Newline
\r Carriage return
\t Horizontal tab
Below is an example of how an escape sequence appears to a computer and then how it is displayed to
the user.
The above example with escape sequences would display the below text.
Hello
This is an example of
escape sequences.
Finally, adding an escape sequence into a regular expression (regex) can allow you to find and replace
characters or perform a special feature. For example, in the below example of a Perl regular expression
we're finding any line that begins with a character return and deleting it.
while (<ofile>) {
$line = $_;
$line =~ s/^\n//g;
The autoexec.bat and the config.sys were files created for MS-DOS and Windows 3.x as an easy solution
of loading the files required for various devices as well as the operating system to properly run. These
files are required for later revisions of MS-DOS and Windows 3.x to load. Because Microsoft is trying to
steer away from MS-DOS, these files are not required for Windows 95, Windows 98, Windows
NT, Windows ME, Windows 2000, Windows XP, or later operating systems. However, in some cases it
may still be necessary for users to edit or configure these files.
The auotexec.bat and the config.sys are most commonly edited by the MS-DOS command file Edit. To
edit these files, type edit c:\autoexec.bat to edit the autoexec.bat file, or edit c:\config.sys to edit the
config.sys file. If the mouse drivers are not loaded properly you will not have the capability of navigating
the mouse.
If you have Windows 95, Windows 98, or later versions of Windows it is recommended that you use
the syseditcommand; to run this program, click Start / Run and type sysedit.
Remarking information
Remarking lines within the autoexec.bat or the config.sys allows you to temporarily or permanently
prevent a line from loading each time you boot the computer. This is done by placing "REM " in front of
the line you wish to skip.
If you are encountering issues with a line in the autoexec.bat it is highly recommended that you remark
the line instead of removing it. This will prevent issues from arising if the line needs to be placed back
into the autoexec.bat.
The below commands will help allow your computer to load programs into memory more efficiently
allowing you to have more memory for MS-DOS programs / games.
Make sure you have the below three lines at the beginning of your config.sys file.
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
By placing the DOS=HIGH,UMB on the second line, this can, in some cases, save memory because it is
loading DOS into upper memory before loading the memory manager. Additionally, the first and third
lines cannot be loaded into high memory because these lines are the memory managers.
Load all your devices in your config.sys and autoexec.bat into high memory.
Autoexec.bat layout
@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123
Command Explanation
@echo off Tells DOS to just read the lines but don't echo them back
to the screen.
SET This example is for the particular sound card that we have
SOUND=C:\PROGRA~1\CREATIVE\CTSND in one of the machines that we have. The set sound is
telling the computer to send all sound events that the
computer may run to that directory.
SET BLASTER=A220 I5 D1 H5 P330 E620 T6 Tells the computer to set the sound blaster settings. This is
a good line for game players; if you have this line in your
autoexec.bat you will know all settings players; if you have
this line in your autoexec.bat you will know all settings for
your sound card. A220 = port address "220", I5 = IRQ 5, D1
= DMA 1 usually being the settings you will need for any
game out on the market.
LH Line used for the CD-ROM. If you have Windows 95+, the
C:\Windows\COMMAND\MSCDEX.EXE MSCDEX will always be in the C:\Windows\COMMAND. In
/D:123 Windows 3.x or DOS, this will usually be either in C:\DOS
or C:\Windows directory. The /D:123 is the name of the
driver name that loads in upper memory; this can be
anything, usually /D:MSCD0001. However, this is not an
actual driver, this is just the name for the driver. Ensure if
you change this line that you change it in the config.sys on
your CD-ROM line. If the two are not the same, your CD-
ROM drive will not load.
LH C:\MOUSE\MOUSE.EXE Loads the mouse driver into memory. However, not all
mice use the same drivers. Although the mouse may use
mouse.exe it could also be "mouse.com" or "mouse.sys",
which is loaded in the config.sys.
C:\DOS\SMARTDRV.EXE /X Loads the smartdrive disk cache utility into memory. See
the smartdrv command page for additional information
about this utility.
WIN Used for users using Windows 3.x, this line will load
Windows automatically when booting the computer.
Config.sys layout
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
FILES=30
STACKS=0,0
BUFFERS=20
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123
Command Explanation
STACKS=0,0 The stacks line was first used in MS-DOS 3.2 and
was used to swap the stack whenever an
asynchronous hardware interrupt occurred. Later
in MS-DOS 3.3 the line STACKS=0,0 was added into
the config.sys. In special circumstances, this line
was changed to STACKS=9,128.
DEVICEHIGH=C:\MTMCDAI.SYS /D:123 This line is the name of the CD-ROM driver on the
particular system we are working on. The /D:123
represents the name of the driver, which in this
case is named 123, however, can be named
anything, usually MSCD0001. Note, however, that
/D:123 must be exactly the same in config.sys and
autoexec.bat; if they are different, the CD-ROM
will not work in DOS.
About append
Similar to the PATH MS-DOS command, the append command enables a user to open files in the
specified directory as if they were in the current directory.
See our append definition if you're looking for information about how to append text or a file into a
file.
Availability
Append.exe is an external command available in the below versions of Microsoft operating systems.
Syntax
/X :on or :off Extends the DOS search path for specified files when executing programs.
Processes SEARCH FIRST, FIND FIRST and EXEC functions. The :ON and :OFF
are new to version MS-DOS 5.0,
/Path :on or :off If path is already included for a program file, :on tells program to also search
in appended directories. Default= :on. Note: The default value of = :on was
added in MS-DOS 5.0 and above
Examples
Note: You can not use any paths on the same command line as /X & /E. The :ON and :OFF options are
only available in MS-DOS 5.0 and later. Do not append within a Windows environment. The append
command can be used on a network. Invalid drive specifications will not be detected until DOS attempts
to use the search path to find specified files.
append
append c:\docs;c:\letters;c:\files
Sets the computer to look for files in the docs, letters and files directory, therefore when typing a
command such as "edit myfile.txt" if the file is not present in the current directory the computer would
also look for the file in docs, letters and files directory.
About path
Path is used to specify the location where MS-DOS looks when using a command. For example, when
using the command "format", if the path is not specified to where the command is you will receive bad
command or file name.
Availability
The path command is an internal command that is available in the below Microsoft operating systems.
PATH [[drive:]path[;...]]
PATH ;
Type PATH ; to clear all search-path settings and direct Windows to search
only in the current directory.
Type PATH without parameters to display the current path.
Examples
path=c:\windows\command
This is where a lot of DOS commands are stored in Window 95; if you are not able to do a dos command,
type this command in, allowing all commands you type in, such as "deltree", to be loaded from this
directory. However, if you have another file in another directory such as C:\DOS it will no longer look
there.
Additional information
DOS limits the path to 122 bytes. Every command is limited to 127 bytes; however, 127 - 5 (minus 5
because of PATH=) = 122.
Microsoft Windows 2000 and Windows XP users must set or modify their path statement through the
environment variables, additional information on how to do this can be found on document CH000549.
About arp
Availability
The arp.exe command is an external command accessed through the C:\Windows or C:\Winnt\System32
directory and is available in the below Microsoft operating systems.
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
-a Displays current ARP entries by interrogating the current protocol data. If inet_addr is
specified, the IP and Physical addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP table are displayed.
-g Same as -a
-N if addr Displays the ARP entries for the network interface specified by if_addr.
-s Adds the host and associates the Internet address inet_addr with the Physical address
eth_addr. The Physical address is given as 6 hexadecimal bytes seperated by hyphens. The
entry is permanent.
if_addr If present, this specifies the Internet address of the interface whose address translation table
should be modified. If not present, the first applicable interface will be used.
Examples
arp -a
Interface 220.0.0.80
The Physical Address or MAC address as shown above in the format aa-bb-cc-dd-ee-ff is the unique
manufacturer identification number. This number should always be an unique address.
An example of how to change the above IP address 220.0.0.160 to 220.0.0.161 in this case would be:
MAC
1. Short for Medium Access Control, a MAC address also known as a physical address is a unique
address number formatted in hexadecimal format and given to each computer or network
device on a computer network. Below is an example of a MAC address:
A1:B2:C3:D4:E5:F6
Because a MAC address is a unique address, a computer network will not have the same MAC
address assigned to more than one computer or network device.
Users who are running Microsoft Windows who are interested in learning their MAC address or
another computer's MAC address can use the nbstat or ipconfig command. Additional
information about these command can be found on our nbtstat command page and ipconfig
command page.
If you're running Linux / Unix or a variant, you can determine the MAC Address or hardware
address using the ifconfig command. Additional information about this command can be found
on our ifconfig command page.
About nbtstat
MS-DOS utility that displays protocol statistics and current TCP/IP connections using NBT.
Availability
The nbtstat command is an external command that is available in the below Microsoft operating
systems.
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]
-a (adapter status) Lists the remote machine's name table given its name
-A (Adapter status) Lists the remote machine's name table given its IP address.
-c (cache) Lists NBT's cache of remote [machine] names and their IP addresses
-s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS names.
-RR (ReleaseRefresh) Sends Name Release packets to WINs and then, starts Refresh
interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to
stop redisplaying statistics.
Examples
nbtstat -a 204.224.150.3
Local Area Connection: Node IpAddress: [204.224.150.3] Scope Id: [] NetBIOS Remote Machine Name
Table Name Type Status –
About ipconfig
Ipconfig is a DOS utility that can be used from MS-DOS and a MS-DOS shell to display the network
settings currently assigned and given by a network. This command can be utilized to verify a network
connection as well as to verify your network settings.
Availability
The ipconfig.exe command is an external command and is available in the below Microsoft operating
systems.
Windows 95
Windows 98
Windows ME
Windows 2000
Windows XP
Windows Vista
Windows 7
ipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid
adapter | /setclassid adapter [classidtoset] ]
/all Display full configuration information.
/showclassid Displays all the dhcp class IDs allowed for adapter.
The default is to display only the IP address, subnet mask and default gateway for each adapter bound
to TCP/IP.
For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters
bound to TCP/IP will be released or renewed.
Examples
To get your computers local network IP address, subnet mask, and default gateway typing ipconfig alone
will display this information as shown below. Keep in mind this is only your local network information. If
you're trying to determine your IP address used on the Internet we suggest viewing our system
information page.
ipconfig
To get all local network information for your computer use the /all switch as shown below, followed by
the results that would be seen when using this command.
ipconfig /all
Windows IP Configuration
0 Ethernet adapter :
1 Ethernet adapter :
Running the above command would display all the DNS information.
ipconfig /flushdns
IP
1. Short for Internet Protocol, IP is an address of a computer or other network device on a network
using IP or TCP/IP. For example, the number "166.70.10.23" is an example of such an address. These
addresses are similar to an addresses used on a house and is what allows data to reach the appropriate
destination on a network.
There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B
and C are commonly used. Each class allows for a range of valid IP addresses. Below is a listing of these
addresses.
Class E 240.0.0.0 to 254.255.255.254 Reserved for future use, or Research and Development Pur
Ranges 127.x.x.x are reserved for loopback or localhost, for example, 127.0.0.1 is the common loopback
address. Range255.255.255.255 broadcasts to all hosts on the local network.
IP address breakdown
Every IP address is broke down into four sets of octets that break down into binary to represent the
actual IP address. The below chart is an example of the IP 255.255.255.255. If you are new to binary, we
highly recommend reading ourbinary and hexadecimal conversions section to get a better
understanding of what we're doing in the below charts.
If we were to break down the IP "166.70.10.23", you would get the below value. The below fist row is
the IP address, the second row the binary values, and the third row the binary value calculated to equal
the total of that section of the IP address.
166 70 10
There are several IP addresses that are automatically assigned when you setup a home network. These
default addresses are what allow your computer and other network devices to communicate and
broadcast information over your network. Below is the most commonly assigned network addresses in a
home network.
192.168.1.3 - 254 Addresses beyond 3 are assigned to computers and devices on the network.
Getting an IP address
By default the router you use will assign each of your computers their own IP address, often
using NAT to forward the data coming from those computers to outside networks such as the Internet. If
you need to register an IP address that can be seen on the Internet, you must register
through InterNIC or use a web host that can assign you addresses.
2. A Linux and Unix command that allows the user to configure their network settings. See the ip
command page for further information.
Multicast
Packet or message sent across a network by a single host to multiple clients or devices
Localhost
This IP address is the local IP address and is not the IP address used by your computer to
communicate with other computers on your network or the Internet.
Broadcast
1. In general, a broadcast describes a message or data sent to multiple individuals in an area. For
example, TV shows are broadcast to all subscribers in an area.
2. In computer networking, the broadcast address is used to distribute a signal across a network,
commonly used to declare to other devices on a network that a new device has connected to
the network and to give those other devices information about the newly connected device. The
broadcast address on a network is commonly an address that ends with 255. For example, a
broadcast netmask is 255.255.255.255.
3. With wireless networks, routers will broadcast the SSID, allowing all wireless devices to easily
find the wireless network.
ask
A netmask is a 32-bit mask used to divide an IP address into subnets and specify the networks available
hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, "0" is
the assigned network address; and in 255.255.255.255, "255" is the assigned broadcast address. The 0
and 255 are always assigned and cannot be used.
Netmask length 8 16 24 32
Counting out the bits in the binary conversion allows you to determine the netmask length. In the above
example you have an example of a 32-bit address. However, this address is a broadcast address and
does not allow any hosts (computers or other network devices) to be connected to it.
Netmask length 8 16 24 --
Using a 24-bit netmask the network would be capable of 2,097,150 networks or 254 different hosts with
an IP range of 192.0.1.x - 223.255.254.x. This is commonly plenty of addresses for one network.
To determine the capable amount of networks a netmask is able to support is a simple formula. With
the understanding that the netmask length is 24, subtract three from that number, therefore 24-3 = 21.
Once this number is determined, take 2 to the x power - 2 (where x is the number you just determined).
Which would be 2^21 - 2 = 2,097,150. You are subtracting two from this number because of the
broadcast and network addresses that are already being used.
To determine the amount of hosts a netmask is capable of supporting is similar to the above. As you see
by the above chart, we have eight zeros. This number is similar to the 21 we determined earlier.
Therefore, 2 to the x power - 2. (where x is the number of zeros in the netmask). This would be 2^8 - 2 =
254. Again, two is subtracted from this number to account for the broadcast and network addresses.
Binary
Computers work on the principle of number manipulation. Inside the computer, the numbers are
represented in bits andbytes. For example, the number three is represented by a byte with bits 0 & 1
set; 00000011. This is numbering system using base 2. People commonly use a decimal or Base 10
numbering system. What this means is that in Base 10, count from 0 to 9 before adding another digit.
The number 22 in Base 10 means we have 2 sets of 10's and 2 sets of 1's.
Base 2 is also known as binary since there can only be two values for a specific digit; either a 0 = OFF or
a 1 = ON. You cannot have a number represented as 22 in binary notation. The decimal number 22 is
represented in binary as 00010110 which by following the below chart breaks down to:
Bit Position 7 6 5 4 3 2 1 0
1 1 1 1 1 1 1 1
Decimal 128 64 32 16 8 4 2 1
22 or 00010110:
All numbers representing 0 are not counted, 128, 64, 32, 8, 1 because 0 represents OFF
However, numbers representing 1 are counted, 16 + 4 + 2 = 22 because 1 represents ON
Decimal Binary
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
16 10000
32 100000
64 1000000
100 1100100
256 100000000
512 1000000000
1000 1111110100
1024 10000000000
Hexadecimal
The other major numbering system used by computers is hexadecimal, or Base 16. In this system, the
numbers are counted from 0 to 9, then letters A to F before adding another digit. The letter A through F
represent decimal numbers 10 through 15, respectively. The below chart indicates the values of the
hexadecimal position compared to 16 raised to a power and decimal values. It is much easier to work
with large numbers using hexadecimal values than decimal.
To convert a value from hexadecimal to binary, you merely translate each hexadecimal digit into its 4-bit
binary equivalent. Hexadecimal numbers have either and 0x prefix or an h suffix. For example, the
hexadecimal number:
0x3F7A
Translates into, Using the Binary chart and the below chart for Hex:
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
DHCP
Short for Dynamic Host Configuration Protocol, DHCP is a protocol used to assign an IP address to a
computer or device connected to a network automatically. Routers, switches, or servers that assign
addresses to other computersusing DHCP on a network make the setup and management of the
network easier by not requiring the user or networkadmin to have to manually define each address for
each computer and network device on the network.
For home network users you can setup a DHCP network by purchasing a home router, wireless router,
or switch withNAT/DHCP and connect each computer to it. In order for each computer or network
device to properly work on a DHCP network with any firewall setup ports 67 and 68 need to be open.
BOOTP
Short for BOOTstrap Protocol, BOOTP is a protocol that allows a client to discover certain network
information; for example, its own IP address.
RARP
Short for Reverse Address Resolution Protocol, RARP is originally defined in RFC 903 and performs the
reverse steps of ARP. RARP uses the hardware address to determine the device's IP address.
Issue
Note: This document contains information about determining your own local IP address and not
obtaining obtaining an IP address of another computer or a website. If you want to know how the
Internet sees your IP address use thesystem information tool.
1. Click Start / Run and type: cmd or command to open a Windows command line.
2. From the prompt, type ipconfig and press enter. This should give you information similar to
what is shown below.
As seen in the above example, the IP address as well as other important network information is listed
when using the "ipconfig" command. If you have more than one network adapter, e.g. a wireless
adapter and network adapter you'll see each adapter listed when using this command.
This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.
Microsoft Windows XP users may get a GUI representation of their network by right-clicking the network
icon in theirsystray and selecting "Status." Within the "Local Area Connection Status" window click the
"Support" tab.
Microsoft Windows 98 users may also get a GUI representation of their network settings by clicking Start
/ Run and typing "ipconfig" in the run line. Unfortunately, not all versions of Windows have this feature.
For Linux or Unix users, to view their IP address or network information, users must have administrator
or root privileges.
1. Open the Linux or Unix shell if you are utilizing a GUI interface for your Linux or Unix machine.
2. From the prompt, type "ifconfig eth0" (without the quotes) and press enter. This should give
you a listing of network information similar to what is seen below.
As seen from the above example, users will commonly see the network settings for all their network
devices when running the "ifconfig" command. First in the above example we have the network settings
for the "lo" or "local loopback", next is the actual network settings of your network adapter.
This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.
3. Open "TCP/IP"
Within this window the user will be able to see the computer's network information including the IP
address.
This information is the IP address of your computer in your network. If your computer is connected to
the Internet the IP address shown in this screen will more than likely not be the IP address other people
and web pages see. To determine this IP address easily see the below online service section.
Question
Answer
This document is for those wanting the IP address of another computer or website and not how to
find the IP address of your own computer.
To determine the IP address of another computer or website you must either know the computer
name or domain nameand use the ping command to ping the computer and obtain its IP address. For
example, in Microsoft Windows a user would open a MS-DOS command window and type "ping
<computer>" where <computer> is the name of the computer or domain name.
As can be seen in the above example the IP address 204.228.150.3 is the IP address of the
computerhope.com domain at the time this address was pinged.
Issue
Cause
It may be necessary to utilize utilities such as ping, winipcfg, tracert, etc to help identify and fix network
related issues.
Solution
Below is a listing of the various network related commands used in MS-DOS, Windows, Linux, Unix, and
other operating systems. Each command includes additional information to what the command does,
the command's syntax, and miscellaneous information.
Note: If you are not the root or admin of a computer, it is possible for these commands to be disabled or
revoked.
Arp
Finger
Hostname
Ipconfig
Pathping
Ping
Nbtstat
Net
Netstat
Nslookup
Route
Tracert / Traceroute
Whois
Winipcfg
ARP
See the arp command page for further help and information.
FINGER
The finger command available in Unix / Linux variants allows a user to find sometimes personal
information about a user. This information can include the last time the user logged in, when they read
their e-mail, etc... If the user creates a .PLAN or other related file the user can also display additional
information.
See the Unix / Linux finger command page for further information and help.
HOSTNAME
The hostname command displays the host name of the Windows XP computer currently logged into.
See the hostname command page for further help and information.
IPCONFIG
Ipconfig is a MS-DOS utility that can be used from MS-DOS and a MS-DOS shell to display the network
settings currently assigned and given by a network. This command can be utilized to verify a network
connection as well as to verify your network settings.
Windows 2000 users should use this command to determine network information.
See the ipconfig command page for further information and help.
PATHPING
Pathping is a MS-DOS utility available for Microsoft Windows 2000 and Windows XP users. This utility
enables a user to find network latency and network loss.
See the pathping command page for further help and information.
PING
Ping is one of the most commonly used and known commands. Ping allows a user to ping another
network IP address. This can help determine if the network is able to communicate with the network.
See the ping command page for further help on the MS-DOS and Windows command line
command.
See the Unix / Linux ping command page for further information on this command.
NBTSTAT
The nbtstat MS-DOS utility that displays protocol statistics and current TCP/IP connections using NBT.
See the nbtstat command page for further help on this MS-DOS and Windows command.
NET
The net command is available in MS-DOS / Windows and is used to set, view and determine network
settings.
See the net command page for further information on this command.
NETSTAT
The netstat command is used to display the TCP/IP network protocol statistics and information.
See the netstat command page for further help with this MS-DOS and Windows command.
Se the Unix / Linux netstat command for further help with this command.
NSLOOKUP
The nslookup MS-DOS utility that enables a user to do a reverse lookup on an IP address of a domain or
host on a network.
See the nslookup command page for further help on this MS-DOS and Windows command.
See the Unix / Linux nslookup command page for further help with this command.
Linux users may also be interested in the host command that performs a similar task.
ROUTE
The route MS-DOS utility enables computers to view and modify the computer's route table.
See the route command page for further information and help with this command.
TRACERT / TRACEROUTE
The tracert command in MS-DOS / Windows or the traceroute command in Unix / Linux and variants is
another commonly used network command to help determine network related issues or slowdowns.
Using this command you can view a listing of how a network packet travels through the network and
where it may fail or slow down. Using this information you can determine the computer, router, switch
or other network device possibly causing your network issues.
See the tracert command for further help with the MS-DOS and Windows command.
See the Unix / Linux traceroute command for further help with this command.
WHOIS
The whois command available in Unix / Linux variants helps allow a user to identify a domain name. This
command provides information about a domain name much like the WHOIS on network solutions. In
some cases the domain information will be provided from Network Solutions.
See the Unix / Linux whois command for further information on this command.
WINIPCFG
The winipcfg command available in Windows allows a user to display network and network adapter
information. Here, a user can find such information as an IP address, Subnet Mask, Gateway, etc...
Windows 2000, Windows XP and above users do not have winipcfg. Instead, use ipconfig.
Root
1. Alternatively referred to as an admin, administrator, and gatekeeper this account is a super user on a
computer or network and has complete control over it. When referring to a Unix / Linux computer this
user is often known as root and on a Windows computer and network this user is often referred to as
an administrator. However, each of these terms is interchangeable.
See the su or super user command page for further information on this Linux command.
An admin or System Administrator is also a job position and person who is responsible for maintaining
each of the computers and network in a corporate environment.
2. The root is also the highest level in a directory hierarchy. For example, in MS-DOS, the root or root
directory of the primary hard disk drive would C:\. When working on a web page the root directory will
be your home directory or yourpublic_html directory.
MS-DOS help and support.
Users in the Microsoft recovery console can set the current directory to the system root
directory by using thesystemroot command.
Question
Answer
There are several online services that will display your IP address and the associated city, state, or
country with that IP address or any other IP address entered into the site. Often this information is
associated with where the ISP is located and not the exact location of the person of that IP address.
http://www.ip-adress.com/
http://www.liveipmap.com/
http://geobytes.com/IpLocator.htm
There is no method of associating an exact physical geographical address or the person associated with
an IP address that an end-user can do. If you'd like to report abuse by a person behind an IP address
contact local authorities or the ISP who's in control of that IP address.
Keep in mind that an IP address could be spoofed or that the user may be behind a proxy and using its IP
address. If behind a proxy, you may also be able to report abuse to the proxy service and they may be
able to track down the real IP address.
How do I hide my IP address?
Question
Answer
In order to connect to the Internet and communicate with other computers on the Internet, you must
have a valid and visible IP address. If you're wanting to hide your IP address to keep anonymous, follow
the recommendations in the below link.
Question
Answer
This document has been created for users who are concerned about
others monitoring their Internet browsing or wish to remain anonymous while they browse the web.
Keep in mind that there are different degrees of anonymity and even following these steps do not
guarantee 100% anonymity. If you're attempting to conceal your identity to do something illegal or
inappropriate while on the Internet, this document is not for you.
Below is a list of different methods to help protect your identity while on the Internet.
Privacy basics
For most users following some basic rules can help with your anonymity on the Internet.
1. Do not disclose any private information, unless absolutely required. In some cases when it is
required such as your last name, only fill in partial information such as your last initial.
2. Don't fall into e-mail and web phishing traps. Become familiar with the signs of phishing and
don't disclose private information in e-mail.
3. If you're using Microsoft Windows, familiarize yourself with Spyware and have at least one
program installed to protect the computer.
When browsing the Internet you're browsing from your computer or router assigned IP address, this IP
address can be used to track your general location and can help identify your visit. To help keep your
computer anonymous you can use a web based proxy to browse the web. A web based proxy allows you
to use an alternate computer to load a website and then display the results on your computer through
the browser. Below is a short list of some of the available anonymous web based proxies.
Proxify
Public CGI (Web, PHP) anonymous proxy free list
FreeProxy.ca
If you're in an area where you feel your connection may be compromised or sniffed, e.g. connecting to
the Internet at a WI-FI hotspot. Using a HTTPS proxy is a great way to help encrypt data coming from the
proxy to your computer that is not encrypted, helping to prevent any eavesdropping. If you're using a
proxy web service such as Proxify, you can also use an HTTPS connection.
If you're using Mozilla Firefox as your browser and find yourself frequently needed a proxy, there are
dozens of goodProxy add-ons available.
When using a proxy it is important to realize that the proxy you're using to browse the Internet could
keep a log of visitors, which means if someone really wanted to find you such as law enforcement it may
still be possible. Finally, keep in mind that you will not know who is controlling the proxy so if you're
entering sensitive data such as usernames, passwords, credit card information, etc. or reading your e-
mail that the person in control of the proxy could capture and read that information.
Anonym.OS is a LiveCD that allows a user to boot from a CD and use a variant of OpenBSD that has been
designed to help keep a user anonymous while browsing the Internet.
TOR
Tor was originally developed for the U.S. Navy with the purpose of protecting government
communications. Tor works to help protect your privacy by using a network of virtual tunnels to pass
information over the Internet.
Download Tor
However, keep in mind that if you had to use a login to access the computer or network, that login could
be traced back to you.
In addition to the above recommendations, there are also dozens of other non-free software products
for users who find the above suggestions don't meet their needs. Below is a listing of a few of these
services.
Anonymizer
GhostSurf
Hide My IP
Router
A hardware device designed to take incoming packets, analyzing the packets and then directing them to
the appropriate locations, moving the packets to another network, converting the packets to be moved
across a different network interface, dropping the packets, or performing any other number of other
actions. In the picture to the right, is a Linksys BEFSR11 router and is what most home routers look like.
A router has a lot more capabilities than other network devices such as a hub or a switch that are only
able to perform basic network functions. For example, a hub is often used to transfer data between
computers or network devices, but does not analyze or do anything with the data it is transferring.
Routers however can analyze the data being sent over a network, change how it is packaged and send it
to another network or over a different network. For example, routers are commonly used in home
networks to share a single Internet connection with multiple computers.
In the above example of a home network there are two different examples of a router, the router and
the wireless router. As can be seen in the example the router is what allows all the computers and other
network devices access the Internet. Below are some additional examples of different types of routers
used in a large network.
Brouter
Short for Bridge Router, a "brouter" is a networking device that serves as both a bridge and a router.
Core router
A core router is a router in a computer network that routes data within a network but not between
networks.
Edge router
An edge Router is a router in a computer network that routes data between one or more networks.
Virtual router
Wireless router
Packet
A term first coined by Donald Davies in 1965, a packet is a segment of data sent from one computer or
network device to another computer or network device over a network. Packets may contain such
information as its source, destination, size and other useful information, helping the packet get to its
destination and then being able to be read once it has arrived. The majority of data that transferred over
the Internet is sent in one or more packets.
Hub
1. When referring to a network, a hub is a basic networking device that connects multiple
computers or other network devices together.
Switch
1. A piece of a physical circuitry component that governs signal flow. Having the switch open allows the
signal to flow through, while keeping the switch closed stops the flow and breaks the circuit connection.
2. On a network, a switch is a hardware device that filters and forwards packets through the network,
but often not capable of much more. The first network device that was added to the Internet was a
switch called the IMP, which helped send the first message on October 29, 1969. A network switch is
more advanced than a hub but not as advanced as a router. In the picture to the right, is an example of a
SMC EZ Switch, a 10/100 network switch.
4. When referring to the switches command, this command is loaded through config.sys and allows you
to add and remove various functions of MS-DOS. See the switches command for further information
about this command.
4. When referring to another command, a switch is an available option that can be used with the
command. For example, the command: "fdisk" can be used with the /MBR switch, using "FDISK
/MBR" would allow the user to recreate the master boot record and not just run the fdisk
program.
Bridge
A computer bridge is a device that connects two local-area networks (LANs), or two segments of
the same LAN. Unlike a router, bridges are protocol -independent. They forward packets
without analyzing and re-routing messages.
VRRP
Short for Virtual Router Redundancy Protocol, VRRP is defined by RFC 2338 and is a protocol
used with routers that helps prevent network downtime. In the event of a router failing, the
backup or virtual router would become the master router.
Access point
About assign
Introduced with MS-DOS 2.0 and has been available up to 6.0 where it was removed because of
concern with data issues. Was latter made available on the MS-DOS 6.0, 6.2 and 6.22
supplemental disks. The assign command redirects diskoperation on one drive to a different
drive.
Any users using Windows 95 or above should not use this command and consider using
the SUBST command as a substitute.
Availability
The assign command is an external command file named assign.com and is available in the
below Microsoft operating systems.
MS-DOS 2.0 - 6.0, 6.2, 6.22
Syntax
ASSIGN Source = Target /status
ASSIGN Assign with no switches cancels redirected drive assignments and sets them back to their o
Examples
ASSIGN A: = B:
ASSIGN A = B = C - Assigns A as B and B as C.
About subst
Allows you to substitute a folder on your computer for another drive letter.
Availability
The subst.exe command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 3.1x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
[drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.
/D Deletes a substituted (virtual) drive.
.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension
About at
Enables users to schedule tasks to be performed at a specified time and date.
Availability
The at.exe command is an external command that is available in the below Microsoft operating
systems.
Windows NT
Windows 2000
Windows XP
Windows 7
Syntax
The AT command schedules commands and programs to run on a computer at a specified time
and date. The Scheduleservice must be running to use the AT command.
/yes Used with cancel all jobs command when no further confirmation is
desired.
/interactive Allows the job to interact with the desktop of the user who is logged
on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or month. If
date is omitted, the current day of the month is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the day (for
example, next Thursday). If date is omitted, the current day of the
month is assumed.
Examples
at 6:50PM "c:\winnt\task.bat"
Performing this command would run the task.bat file at 6:50PM today unless the task is
scheduled after the time specified. Because the /interactive switch is not in the command, this
batch file will be executed in the background.
at 6:50PM /interactive c:\winnt\beep.bat
Runs the beep.bat batch file at 6:50PM with the ability for the user to interact with the batch
file.
at 1 /delete
Deletes the at ID 1.
at /delete /yes
Delete all AT IDs.
at
Typing at alone will display each of the scheduled tasks, their status, id, scheduled time, and
command as shown below. As you can see if an error occurs with the at process, the status will
display an Error.
Status ID Day Time Command Line ------------------------------------------------------------------------------- 1
Tomorrow 6:50 AM c:\winnt\task.bat 2 Tomorrow 2:48 PM c:\ch\hope\logit.bat Error 3
Tomorrow 6:50 PM start notepad
at 1
Typing at followed by an ID number will display additional information about the task id as
shown below.
Task ID: 5 Status: OK Schedule: Today, Time of day: 6:55 PM Interactive: No Command:
c:\winnt\task.bat
About atmadm
Lists connections and addresses seen by Windows ATM call manager.
Availability
The atmadm command is an internal command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Syntax
atmadm [options]
where options are one or more of:
- List all connections
c
- Display Statistics
s
Examples
atmadm -c
List the ATM connections (if present), the interface, VCI, VPI and the address.
ATM
1. Short for Asynchronous Transfer Mode, ATM when referring to computers is a dedicated-
connection switching technology that organizes digital data into 53-byte cell units and transmits
them over a physical environment using digital signal technology. ATM is capable of transmitting
at speeds of 155 or 622 MBps and faster.
2. Electronic machine that dispenses money from a persons account at banks. The first U.S. ATM
went into service at 9:00am on September 2, 1969.
3. Shorthand for At The Moment, atm is commonly used in chat based communications. Below are
some examples of how this could be used in chat.
I'm busy ATM.
ATM I'm watching the Simpson's.
About attrib
Attrib allows a user to change the properties of a specified file. Using attrib, the user has the
capability of changing the file to have any of the below attributes. Note if you're wanting to
change the ACL's of a file see the CACLS command.
Read-only - allowing the file to be only viewed and not written to.
Archived - allowing Microsoft backup and other backup programs to know what files to backup.
Hidden - making the file invisible to standard users.
System - making the file an important system file.
Availability
The attrib.exe command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 3.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Microsoft Windows 95, 98, and ME syntax
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
+ Sets an attribute.
- Clears an attribute.
+ Sets an attribute.
- Clears an attribute.
Examples
attrib
Typing attrib by itself will display all files in the current directory and each of their attributes. If
any file is hidden it will also display those files.
attrib +r autoexec.bat
Add the read-only attribute to the autoexec.bat file so it cannot be modified until the read only
attribute is taken off. This is helpful for important system files or any other file that you do not
want to have mistakenly edited or changed by another program.
attrib +h config.sys
Add the hidden attribute to the config.sys file causing it to be not be seen by the average user.
attrib -h config.sys
This command will do the opposite of the above command. Instead of hiding the file it will
unhide the file if hidden.
How can I see hidden files in MS-DOS?
Extended information
DOS directory file attribute bit position and Hex Value with bit positions (7 6 5 4 3 2 1 0). See
the file attributes computer dictionary definition for further information about file attributes.
Examples
About cacls
The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to
change the read/write, hidden, system settings of the file see the attrib command.
Availability
The cacls.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
W Write
C Change (write)
F Full control
/R user Revoke specified user's access rights (only valid with /E).
R Read
W Write
C Change (write)
F Full control
Wildcards can be used to specify more that one file in a command. You can specify more than
one user in a command.
Examples
cacls myfile.txt
Displays the ACLs for the myfile.txt file. Below is an example of what this may look like.
C:\WINNT\MYFILE.TXT BUILTIN\Users:R
BUILTIN\Power Users:C
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
About backup
MS-DOS application that enables users to backup their data on their computer.
MS-DOS 6.0, 6.2, 6.21, and 6.22 users use the msbackup command. However, this file is still
available to these users on the MS-DOS 6.0 and 6.22 supplemental disk.
Availability
The backup.com / backup.exe commands are external commands that are available in the below
Microsoft operating systems.
MS-DOS 2.x to MS-DOS 5.00a
Backup syntax
MS-DOS 2.x - 5.x syntax
BACKUP [Source:\Path\Filename] [Target:] [/s] [/m] [/a] [/d:date] [/t:time] [/f:size]
[/L:LogDrive:\Path\Log]
Source:\Path\Filename The source, path, and filename of the location of the file that
you wish to backup.
/m Backup all files that have changed since the last backup.
/d:date Backup files that have been created or modified since the date
specified.
/t:time Backup files that have been created or modified after this time.
/L:LogDrive:\Path\Log Create a log of the backup and specify the location of where
the log is to be saved.
Examples
backup c:\work\*.* d: /s
The above example would create a backup of all the files and subdirectories in the work
directory and save the backup to the d: drive.
About msbackup
A later MS-DOS application that enables users to backup their data on their computer.
The msbackup is a MS-DOS version of the new backup command and mwbackup is the Windows
version of this backup program.
MS-DOS 6.0, 6.2, 6.21, and 6.22 users can still find the older backup file on the MS-DOS 6.0 and
6.22 supplemental disk.
Availability
The msbackup.exe and mwbackup.exe commands are external commands that are available in
the below Microsoft operating systems.
MS-DOS 6.0, 6.2 and 6.22
Msbackup syntax
MS-DOS 6.0, 6.2, 6.21, and 6.22syntax
msbackup [setup_file] [/bw] [/lcd] [/mda]
setup_file Option setup file that can be used to specify what files to backup.
Examples
msbackup
The above example would run MSBACKUP. Because this program is now a menu driven
program, not many other options or switches are available for this command from the prompt.
About batch
The batch command is a recovery console command that executes a series of commands within
a file.
If you are looking for additional information about batch files we suggest you look at our batch
file page.
Availability
The batch command is a recovery console command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Syntax
Executes commands specified in a text file.
BATCH Inputfile [Outputfile]
Inputfile Specifies the text file that contains the list of commands to be executed.
Outputfile If specified, contains the output of the specified commands. If not specified,
the output is displayed on the screen.
/REBUILD Iterate through all Windows installations and allow the user to
choose which to add.
Examples
bootcfg /rebuild
The above example would start the step-through for the creation of a new boot.ini on the
computer. Additional steps and information about the process of rebuilding the boot.ini can be
found on document CH000648.
Additional information and help with the boot.ini.
Issue
Additional information and help with the boot.ini.
Additional information
The "boot.ini" is a Microsoft initialization file found on the Microsoft Windows NT, Microsoft
Windows 2000, and Microsoft Windows XP operating systems. This file is always located on
the root directory of the primary hard disk drive. In other words, it is located at C:\ directory or
the C Drive. This file is used by Microsoft Windows as a method of displaying a menu
of operating systems currently on the computer and allowing the user to easily select what
operating system to load. In addition, this file is also used to point to the locations of each of the
operating systems.
How to view the boot.ini
Examples of the boot menu
Basic example of the boot.ini file
How to modify the boot.ini
Available boot.ini switches
How to rebuild the boot.ini
How to view the boot.ini
The boot.ini can be viewed and some options can be changed by following the below steps.
1. Click Start, Run
2. In the run line type: msconfig and press enter.
3. Click the boot.ini tab.
If you have an option in the boot menu that doesn't work, such as a missing version of
Windows. Try clicking the "Check All Boot Paths" button in the boot.ini to fix this issue without
having to manually edit the boot.ini as instructed below.
Example of the boot menu
If multiple operating systems are setup in the boot.ini, as the computer is booting you will see a
menu similar to the below example. This allows the user to select between multiple operating
systems. If your computer does not have multiple operating systems, but this menu still appears
each time your computer boots, it is likely that your boot.ini is improperly configured.
Please select the operating system to start:
Microsoft Windows XP Home Edition
Microsoft Windows 2000
Use the up and down arrow keys to move the highlight to your choice.
Press ENTER to choose.
For troubleshooting and advanced startup options for Windows, press F8.
Option Description
multi(x) This option is used with IDE and ESDI drives and is also used with SCSI drives for comp
the above example is "0", this number is the adapter's number and should always be "
load system files.
In a computer using only IDE this option will work with up to four hard disk drives.
In a computer using only SCSI this option will work with the first two drives on the prim
Finally, if a computer is using IDE and SCSI this option will work with the IDE drives on
scsi(x) If the computer has a SCSI controller and is not using BIOS to load the system files, the
"multi(x).
disk(x) The disk on the controller. If multi(x) is used used, this value will always be 0. Howeve
address.
rdisk(x) Which disk on the controller is being used. In the above example we are using an rdisk
the primary controller is being used. This value may be between "0" and "3" and is alw
partition(x) Which partition the operating system is on. In the above example, the operating syste
\WINDOWS="..." Finally, the last portion of this line defines the directory of where windows is located a
operating system. In the above example, the boot menu would display "Microsoft Win
c: <press enter>
cd\ <press enter>
attrib -r -a -s -h boot.ini <press enter>
edit boot.ini <press enter>
Additional information about the attrib command can be found on our attrib help page.
Additional information about the edit command can be found on our edit help page.
Available boot.ini switches
Below is a listing of available boot.ini switches and a brief explanation. These switches can can
be used to help setup or troubleshoot a computer.
Switch Description
/basevideo Causes the operating system to use a standard VGA display when booting into the operat
/burnmemory Causes the operating system to ignore the memory specified after the switch. For exampl
system to ignore 64MB of physical memory.
/fastdetect Causes NTDETECT to not detect serial and parallel devices and instead let Plug and Play h
/maxmem Limit the operating system to use the maximum memory of what the user specifies. For e
operating system to use a maximum of 32MB.
/noguiboot Microsoft Windows 2000 and above switch that, if enabled, will not load the graphics driv
starting
/nopae Microsoft Windows 2000 switch that disables the computer's ability to utilize Intel Physic
/numproc Instructs the operating system on how many processors it is capable of using.
/onecpu Causes the operating system to utilize one of the processors in a multi-processor comput
/pae Microsoft Windows 2000 switch that enables the computer to utilize Intel Physical Addre
/pcilock Prevents the operating system from automatically assigning IO/IRQ resources to PCI devic
/safeboot Boot the computer safely (Safe Mode). This mode can be easily accessed without modifyi
computer is booting.
/sos Causes the operating system to print out information as it being processed.
/year Option used to cause the operating system to ignore the year provided by systems the re
specified after the switch. For example, a user may type /year=2003.
* Prompt for the identified versions of Windows installed. When you receive this prompt press
Y if the bootcfg command properly identified each of the Windows operating systems installed
on the computer. It is important to realize this command will only detect Windows XP, Windows
2000, and Windows NT installations.
* Prompt to enter the load identifier. This is the name of the operating system for the boot.ini.
For example, Microsoft Windows XP Home users would enter Microsoft Windows XP Home
edition.
* Prompt to Enter OS load options. When this prompt is received type /fastdetect to
automatically detect the available options.
8. Once you have completed all the available options in the rebuild and are back at the
prompt type exit to reboot the computer.
About break
Break can be used to enable or disable the breaking capability of the computer. For example, if a
user wanted to cancel a batch file or another MS-DOS processes, that user could press CTRL + C
(break), which would then prompt the user if they wish to cancel the current process.
Turning break off will cancel CTRL + C; however, the user will still be able to press CTRL +
PAUSE/BREAK and have the capability of getting out of a batch file / current running process.
Note: Newer versions of Windows (Windows ME, Windows 2000, Windows XP, and higher) only
include this command for backwards compatibility and turning the break off has no effect.
Availability
The break command is an an internal command and is available in the below Microsoft
operating systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Sets or clears extended CTRL+C checking.
BREAK [ON | OFF]
Type BREAK without a parameter to display the current BREAK setting.
Examples
break on
Turns on the break, which allows the Ctrl + C function.
break off
Turns off the break, not allowing Ctrl + C to cancel a process.
About cacls
The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to
change the read/write, hidden, system settings of the file see the attrib command.
Availability
The cacls.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
W Write
C Change (write)
F Full control
/R user Revoke specified user's access rights (only valid with /E).
R Read
W Write
C Change (write)
F Full control
Wildcards can be used to specify more that one file in a command. You can specify more than
one user in a command.
Examples
cacls myfile.txt
Displays the ACLs for the myfile.txt file. Below is an example of what this may look like.
C:\WINNT\MYFILE.TXT BUILTIN\Users:R
BUILTIN\Power Users:C
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
pause
dir c:\windows
dir c:\windows\system
4. Once the above three lines have been typed in, click File and choose exit; when prompted to
save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by
pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save
changes.
5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the
test.bat file and begin running the file. Because the first line is pause, you will first be prompted
to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the
files in the windows and windows\system directories.
If you wish to add more lines to this batch file you would type "edit test.bat" to edit the file
again.
Additional information about the MS-DOS edit command can be found on our edit command
page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this
is the case, you would either need to obtain the edit.com file to access this file or use the copy
con command.
Microsoft Windows and other users
A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If,
however, you're more comfortable using Microsoft Windows or your operating system, you can
use any text editor, such as Notepad orWordpad, to create your batch files, as long as the file
extension ends with .bat. In the below example we use the Windows notepad to create a batch
file.
1. Click Start
2. Click Run
3. Type: notepad and press enter.
4. Once notepad is open, type the below lines in the file or copy and paste the below lines into
notepad.
@echo off
echo Hello this is a test batch file
pause
dir c:\windows
5. Click File and click Save; browse to where you want to save the file. For the file name, type
"test.bat", and if your version of Windows has a "Save as type" option, choose "All files",
otherwise it will save as a text file. Once all of this has been done click the Save button and exit
notepad.
6. Now, to run the batch file, double-click or run the file like any other program. Once the batch
file has completed running it will close the window automatically.
Batch commands
Just like all MS-DOS commands, all batch file commands are not case sensitive. However, in the
below listing we have listed all commands in all caps to help you identify what is a command
and what is not.
@ Does not echo back the text after the at symbol. This is most commonly used
as @ECHO OFF to prevent any of the commands in the batch file from being
displayed, just the information needed.
%1 The percent followed by a numeric value, beginning with one, allows users to
add variables within a batch file. The below line is an example of what can be
used in a batch file.
ECHO Hello %1
When the above one-line batch file is created, add your name after the batch
file. For example, typing myname (being the name of the bat file) and then
your name:
myname bob
would output:
Hello bob
Note: This can be extended to %2, %3, and so on.
:: One of two ways of adding remarks into the batch file without displaying or
executing that line when the batch file is run. Unlike REM this line will not
show regardless if ECHO off is in the batch file.
:LABEL By adding a colon in front of a word, such as LABEL, you create a category,
more commonly known as a label. This allows you to skip to certain sections
of a batch file such as the end of the batch file. Also see GOTO.
CALL This is used to run another batch file within a batch file. When the batch file
that is called is completed, the remainder of the original batch file is
completed. Note if the batch file does not exist it will give an error message.
CHOICE See running different programs for an example of how to use this command.
Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our CHOICE command page.
CLS Just like the DOS command would clear your screen.
Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our CLS command page.
ECHO Will echo a message in the batch file. Such as ECHO Hello World will
print Hello World on the screen when executed. However, without @ECHO
OFF at the beginning of the batch file you'll also get "ECHO Hello World" and
"Hello World." Finally, if you'd just like to create a blank line,
type ECHO. adding the period at the end creates an empty line.
EXIT Exits out of the DOS window if the batch file is running from Windows.
Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our EXIT command page.
IF Used to check for a certain condition if the condition exists. If that condition
exists it will perform that function. To see an example of this see running
different programs.
Additional information and the syntax of this command in each version of
Windows and MS-DOS can be found on our IF command page.
REM One of two ways of adding remarks into the batch file without displaying or
executing that line when the batch file is run.
START Used for Windows 95, Windows 98, and Windows NT 4.0 and above to start a
windows application; such asSTART C:\WINDOW\CALC would run the
Windows Calculator. Users running Windows 3.x need to utilize the WIN
command. For example, WIN C:\Windows\CALC.EXE would run Windows
and then Calculator after Windows has finished loading.
Start command help and syntax information.
About cd
CD (Change Directory) is a command used to switch directories in MS-DOS. For example, if you
needed to run Windows 3.11 from DOS, you would type:
cd windows - Changing the directory to Windows;
win - To run the win.com file within the windows directory.
Availability
The CD command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows XP and later syntax
CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]
.. Specifies that you want to change to the parent directory.
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Use the /D switch to change current drive in addition to changing current directory for a drive.
If Command Extensions are enabled CHDIR changes as follows:
The current directory string is converted to use the same case as the on disk names. So CD
C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.
CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory
name that contains a space without surrounding the name with quotes. For example:
cd \winnt\profiles\username\programs\start menu
is the same as:
cd "\winnt\profiles\username\programs\start menu"
which is what you would have to type if extensions were disabled.
Windows 98 and earlier syntax
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
Examples
cd\
Goes to the highest level, the root of the drive.
cd..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory,
this would take you to C:\Windows>
Windows 95, 98, and later versions have a feature in the CD command that allows you to go
back more than one directory when using the dots. For example, typing: cd... with three dots
after the cd would take you back two directories.
cd windows
If present, would take you into the Windows directory. Windows can be substituted with any
other name.
cd\windows
If present, would first move back to the root of the drive and then go into the Windows
directory.
cd\windows\system32
If present, would move into the system32 directory located in the Windows directory. If at any
time you need to see what directories are available in the directory you're currently in use
the dir command.
cd /d e:\pics
If for example you were on the C: drive, typing the above command with the /d option would
first switch the the E: drive letter and then move into the pics directory.
cd
Typing cd alone will print the working directory. For example, if you're in c:\windows> and you
type the cd it will print c:\windows. For those users who are familiar with Unix / Linux this could
be thought of as doing the pwd (print working directory) command.
Difference between cd .. and cd\ or cd / commands
Question
Difference between cd .. and cd\ or cd / commands.
Answer
MS-DOS and Windows command line users
Linux and Unix users
MS-DOS and Windows command line users
When typing the cd.. or cd .. command this moves the directory back one directory also known
as the parent directory. As seen in the below example, if you're in the \Windows\System32
directory using the cd.. command takes you back to the Windows directory.
C:\Windows\System32>cd..
C:\Windows>
You can also type three or more periods in a row to move back multiple directories. For
example, type: cd... will move back two directories.
The cd\ command takes you back to the root directory of the current drive. As can be seen in
the below example, if we were in the same \Windows\System32 directory and typed the cd\
command it would take you to the C:\ directory.
C:\Windows\System32>cd\
C:\>
You can also type the path after the cd\. For example, if you wanted to get to the
C:\Windows\Temp directory you could type: cd\windows\temp to get into that directory
regardless of where you are on the C: drive.
Linux and Unix users
When typing the cd .. command (need to have a space between cd and ..) this moves the
directory back one directory also known as the parent directory. As seen in the below example,
if you're in the /public_html/cgi-bin directory using the cd.. command takes you back to the
public_html directory.
[~/public_html/cgi-bin]# cd ..
[~/public_html]#
The cd / command takes you back to the root directory of the current drive. As can be seen in
the below example, if we were in the same /public_html/cgi-bin directory and typed the cd /
command it would take you to the / directory.
[~/public_html/cgi-bin]# cd /
[/]#
Unless you have root rights or proper permissions you will be unable to list the files in this
directory. If you want to get to the root home directory (~) type: cd ~ at the prompt.
About chcp
Before the chcp command can be used, the nlsfunc must be loaded, as well as the country.sys
must be loaded into theconfig.sys.
The chcp command is used to supplement the International keyboard and character set
information, allowing MS-DOS to be used in other countries and with different languages.
Availability
The chcp.com command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 6.22 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Country / regions
Keybrd2.sys Country/Regions
274, 275 - Brazil
442 - Bulgaria
319 - Greece
161 - Iceland
118 - Macedonia / Serbia / Montenegro
333 - Romania
441 - Russian
440, 179 - Turkish
Code pages
EGA.CPI Codepages
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
860 - Portuguese
863 - Canadian-French
865 - Nordic
EGA2.CPI Codepages
737 - Greek II
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
857 - Turkish
861 - Greek
EGA3.CPI Codepages
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
855 - Cyrillic I
866 - Russian (Cyrillic II)
Syntax
Displays or sets the active code page number.
CHCP [nnn]
nnn Specifies a code page number.
Type CHCP without a parameter to display the active code page number.
Examples
chcp
Display the page number.
chcp 447
Sets the active page to 447.
How to load
Note: If you are using MS-DOS, you would want to substitute c:\windows\command with c:\dos
in the below examples.
Autoexec.bat
country=354,861; c:\windows\command.country.sys
Device=c:\windows\command\display.sys con=(,,2)
Config.sys
mode con cp prepare=((861 850) c:\windows\command\ega2.cpi)
mode con cp select=861
keyb is,,c:\windows\command\keybrd2.sys
About the autoexec and config
The autoexec.bat and the config.sys were files created for MS-DOS and Windows 3.x as an easy
solution of loading the files required for various devices as well as the operating system to
properly run. These files are required for later revisions of MS-DOS and Windows 3.x to load.
Because Microsoft is trying to steer away from MS-DOS, these files are not required
for Windows 95, Windows 98, Windows NT, Windows ME, Windows 2000, Windows XP, or later
operating systems. However, in some cases it may still be necessary for users to edit or
configure these files.
How to edit the files
The auotexec.bat and the config.sys are most commonly edited by the MS-DOS command
file Edit. To edit these files, type edit c:\autoexec.bat to edit the autoexec.bat file, or edit
c:\config.sys to edit the config.sys file. If the mouse drivers are not loaded properly you will not
have the capability of navigating the mouse.
If you have Windows 95, Windows 98, or later versions of Windows it is recommended that you
use the syseditcommand; to run this program, click Start / Run and type sysedit.
Remarking information
Remarking lines within the autoexec.bat or the config.sys allows you to temporarily or
permanently prevent a line from loading each time you boot the computer. This is done by
placing "REM " in front of the line you wish to skip.
If you are encountering issues with a line in the autoexec.bat it is highly recommended that you
remark the line instead of removing it. This will prevent issues from arising if the line needs to
be placed back into the autoexec.bat.
Getting additional memory
The below commands will help allow your computer to load programs into memory more
efficiently allowing you to have more memory for MS-DOS programs / games.
Make sure you have the below three lines at the beginning of your config.sys file.
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
By placing the DOS=HIGH,UMB on the second line, this can, in some cases, save memory
because it is loading DOS into upper memory before loading the memory manager. Additionally,
the first and third lines cannot be loaded into high memory because these lines are the memory
managers.
Load all your devices in your config.sys and autoexec.bat into high memory.
Autoexec.bat layout
Below is an example of what an autoexec may look like.
@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123
Command Explanation
@echo off Tells DOS to just read the lines but don't
echo them back to the screen.
SET BLASTER=A220 I5 D1 H5 P330 E620 Tells the computer to set the sound blaster
T6 settings. This is a good line
for game players; if you have this line in
your autoexec.bat you will know all
settings players; if you have this line in
your autoexec.bat you will know all
settings for your sound card. A220 = port
address "220", I5 = IRQ 5, D1 = DMA 1
usually being the settings you will need for
any game out on the market.
Config.sys layout
Below is an example of what the config.sys may look like:
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
FILES=30
STACKS=0,0
BUFFERS=20
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123
Command Explanation
About chdir
Chdir (Change Directory) is a command used to switch directories in MS-DOS.
Availability
The chdir command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
Examples
chdir\
Goes to the highest level, the root of the drive.
chdir..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory,
this would take you to C:\Windows>
Windows 95, Windows 98 and later versions of windows allow you to go back more than one
directory by using three or more dots. For example, typing chdir... with three dots after the cd
would take you back two directories.
cdhdir windows
If present, would take you into the Windows directory. Windows can be substituted with any
other name.
About chkdsk
Chkdsk is a utility that checks the computer's hard disk drives' status for any cross-linked or any
additional errors with the hard disk drive.
MS-DOS versions 2.x - 4.x used chkdsk.com,
MS-DOS versions 5.x and beyond used chkdsk.exe.
Availability
The chkdsk command is an external command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [drive:][[path]filename] [/F] [/V]
/V Displays the full path and name of every file on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
NTFS only: Changes the log file size to the specified number of kilobytes. If
/L:size size is not specified, displays current size.
Forces the volume to dismount first if necessary. All opened handles to the
/X volume would then be invalid (implies /F).
The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain
checks of the volume.
Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using
the CHKNTFS command.
Windows 2000 and Windows XP recovery console chkdsk syntax
Note: The below options are only available in the recovery console.
Checks a disk and displays a status report.
chkdsk [drive:] [/p] | [/r]
Chkdsk may be used without any parameters, in which case the current drive is checked with no
switches. You can specify the listed switches.
Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup
(boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the
Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location
of Autochk.exe.
Examples
chkdsk
Will display all information described above and also report any crossed linked files.
chkdsk /f
Will fix any crossed linked files; however, do not run this command while you are
in Windows95 or Windows 3.x
About chkntfs
The chkntfs command is used to display or modify the checking of the disk drive using NTFS at
boot time.
Availability
The chkntfs.exe command is an external command and is available in the below Microsoft
operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies the checking of disk at boot time.
CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
/D Restores the machine to the default behavior; all drives are checked at boot
time and chkdsk is run on those that are dirty.
/T:time Changes the AUTOCHK initiation count down time to the specified amount of
time in seconds. If time is not specified, displays the current setting.
/X Excludes a drive from the default boot-time check. Excluded drives are not
accumulated between command invocations.
/C Schedules a drive to be checked at boot time; chkdsk will run if the drive is
dirty.
If no switches are specified, CHKNTFS will display if the specified drive is dirty or scheduled to be
checked on next reboot.
Examples
chkntfs /d
Restores the computer back to the default settings and all drives are checked at boot if they are
dirty.
NTFS
Short for New Technology File System, NTFS is a file organizational system that stores and
accesses information located on Microsoft Windows NT, Windows 2000, Windows XP operating
system. NTFS offers better methods of data protection and file recovery than previous versions
of FAT.
About choice
Allows for batch files and scripts to wait for the user to choose a set of choices.
Microsoft Windows 2000 and Windows XP users who have batch files that utilize the choice
command should modify the batch file to use the MS-DOS set command.
Availability
The choice command is an external command and is available in
MS-DOS 6.0+
Windows 95
Windows 98
Windows Vista
Windows 7
Syntax
choice [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]
Options:
About cipher
Displays or alters the encryption of directories [files] on NTFS partitions.
See the cipher dictionary definition for additional information about this term.
Availability
The cipher.exe command is an external command that is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or alters the encryption of directories [files] on NTFS partitions.
CIPHER [/E | /D] [/S:dir] [/A] [/I] [/F] [/Q] [/H] [/K] [pathname [...]]
CIPHER /W:directory
CIPHER /X[:efsfile] [filename]
/E Encrypts the specified directories. Directories will be marked so
that files added afterward will be encrypted.
/H Displays files with the hidden or system attributes. These files are
omitted by default.
/K Create new file encryption key for the user running CIPHER. If this
option is chosen, all the other options will be ignored.
Used without parameters, CIPHER displays the encryption state of the current directory and any
files it contains. You may use multiple directory names and wildcards. You must put spaces
between multiple parameters.
Examples
Display the status of each of the files in the current directory.
cipher
For example, running the above command may display something similar to the below example.
C:\DOCUME~1\ADMINI~1\Desktop>cipher
Listing C:\DOCUME~1\ADMINI~1\Desktop\
New files added to this directory will not be encrypted.
U 308374_harddisk_3.jpg
U cipher.txt
U FileZilla.lnk
U hope.txt
U inc
U l-gloss.pdf
U logos.gif
U Main_Page.htm
U Main_Page_files
U maxivistademo.zip
U move
Next, if we wanted to enable encryption on a directory, type a command similar to the below
command. In the below example this is encrypting the hope directory and will encrypt any files
added into that directory after the encryption has been enabled.
cipher /e hope
Encrypting directories in C:\DOCUME~1\ADMINI~1\Desktop\
test [OK]
1 directorie(s) within 1 directorie(s) were encrypted.
Cipher
1. Algorithm of encoding or encrypting data. Text that is ciphered is text that cannot be read
unless a special password or key is put in to decode it.
2. Windows command line command. See cipher command page for additional details and
examples
About cls
Cls is a command that allows a user to clear the complete contents of the screen and leave only
a prompt.
Availability
The cls command is an internal command and is available in the below Microsoft operating
systems.
Syntax
CLS
Examples
cls
Running the cls command at the command prompt would clear your screen of all previous text
and only return the prompt.
About command
The command.com is the command interpreter for MS-DOS and is required for the majority of
Microsoft's operating systems. Without command.com the computer running a Microsoft
operating system would be unable to boot.
When running Windows NT, 2000, XP, or future operating systems there are two versions of the
command interpreter, command.com and cmd.exe. Cmd offers additional environment
variables than command.com; however, it is recommend if you are attempting to run a MS-DOS
utility that you utilize the command.com. To use command.com, click Start / Run and type
command.
Information about creating a bootable diskette, which also requires command.com, can be
found on our boot diskette page.
Additional information about shells can be found on our shell dictionary definition.
Additional information about COMMAND vs. CMD can be found on document CH000395.
Availability
Command, or command.com, is the command interpreter, and with early versions of Windows
and MS-DOS, you would not be able to use the computer without this file. This file is available
on all versions of Microsoft Windows and later versions of Windows use it to access the MS-
DOS shell.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the
below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Command syntax
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K]
command]
[drive:]path Specifies the directory containing COMMAND.COM.
device Specifies the device to use for command input and output.
CMD syntax
Starts a new instance of the Windows 2000 / Windows XP command interpreter.
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using c as the delimiter. For
example, /V:ON would allow !var! to expand the variable var at execution time.
The var syntax expands variables at input time, which is quite a different thing
when inside of a FOR loop.
Note that multiple commands separated by the command separator '&&' are accepted for string
if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same
as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as
a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are
preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the
leading character and remove the last quote character on the command line, preserving any text
after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the
following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are
executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Command Extensions are enabled by default. You may also disable extensions for a particular
invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of
CMD.EXE on a machine or user logon session by setting either or both of the following
REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FTYPE
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable
delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON
or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a
machine or user logon session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be
used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file
name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a machine or user logon
session by setting either or both of the following REG_DWORD values in the registry using
REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and
0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The
command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for
directory name completion and Ctrl-F for file name completion. To disable a particular
completion character in the registry, use the value for space (0x20) as it is not a valid control
character.
Completion is invoked when you type either of the two control characters. The completion
function takes the path string to the left of the cursor appends a wild card character to it if none
is already present and builds up a list of paths that match. It then displays the first matching
path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing
of the same control character will cycle through the list of matching paths. Pressing the Shift key
with the control character will move through the list backwards. If you edit the line in any way
and press the control character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory name completion. The
only difference between the two control characters is the file completion character matches
both file and directory names, while the directory completion character only matches directory
names. If file completion is used on any of the built in directory commands (CD, MD or RD) then
directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special
characters by placing quotes around the matching path. Also, if you backup, then invoke
completion from within a line, the text to the right of the cursor at the point completion was
invoked is discarded.
Examples
cmd
Opens the cmd command shell.
About color
The color command enables users running Microsoft Windows 2000 and Windows XP to quickly
and easily change the default color of their background or text in their MS-DOS window.
Availability
The color command is an internal command and is available in the below Microsoft operating
systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Sets the default console foreground and background colors.
COLOR [attr]
attr Specifies color attribute of console output
Color attributes are specified by TWO hex digits -- the first corresponds to the background; the
second the foreground. Each digit can be any of the below values.
0 = Black 8 = Gray
If no argument is given, this command restores the color to what it was when CMD.EXE started.
This value either comes from the current console window, the /T command line switch or from
the DefaultColor registry value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute the COLOR
command with a foreground and background color that are the same.
Examples
Color 0A
Creates a Black background with light bright green text, similar to many of the FTP, telnet, and
old BBS console screens.
About command
The command.com is the command interpreter for MS-DOS and is required for the majority of
Microsoft's operating systems. Without command.com the computer running a Microsoft
operating system would be unable to boot.
When running Windows NT, 2000, XP, or future operating systems there are two versions of the
command interpreter, command.com and cmd.exe. Cmd offers additional environment
variables than command.com; however, it is recommend if you are attempting to run a MS-DOS
utility that you utilize the command.com. To use command.com, click Start / Run and type
command.
Information about creating a bootable diskette, which also requires command.com, can be
found on our boot diskette page.
Additional information about shells can be found on our shell dictionary definition.
Additional information about COMMAND vs. CMD can be found on document CH000395.
Availability
Command, or command.com, is the command interpreter, and with early versions of Windows
and MS-DOS, you would not be able to use the computer without this file. This file is available
on all versions of Microsoft Windows and later versions of Windows use it to access the MS-
DOS shell.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the
below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Command syntax
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K]
command]
CMD syntax
Starts a new instance of the Windows 2000 / Windows XP command interpreter.
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using c as the delimiter. For
example, /V:ON would allow !var! to expand the variable var at execution time.
The var syntax expands variables at input time, which is quite a different thing
when inside of a FOR loop.
Note that multiple commands separated by the command separator '&&' are accepted for string
if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same
as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as
a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are
preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the
leading character and remove the last quote character on the command line, preserving any text
after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the
following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are
executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Command Extensions are enabled by default. You may also disable extensions for a particular
invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of
CMD.EXE on a machine or user logon session by setting either or both of the following
REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FTYPE
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable
delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON
or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a
machine or user logon session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The
command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be
used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file
name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a machine or user logon
session by setting either or both of the following REG_DWORD values in the registry using
REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and
0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The
command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for
directory name completion and Ctrl-F for file name completion. To disable a particular
completion character in the registry, use the value for space (0x20) as it is not a valid control
character.
Completion is invoked when you type either of the two control characters. The completion
function takes the path string to the left of the cursor appends a wild card character to it if none
is already present and builds up a list of paths that match. It then displays the first matching
path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing
of the same control character will cycle through the list of matching paths. Pressing the Shift key
with the control character will move through the list backwards. If you edit the line in any way
and press the control character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory name completion. The
only difference between the two control characters is the file completion character matches
both file and directory names, while the directory completion character only matches directory
names. If file completion is used on any of the built in directory commands (CD, MD or RD) then
directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special
characters by placing quotes around the matching path. Also, if you backup, then invoke
completion from within a line, the text to the right of the cursor at the point completion was
invoked is discarded.
Examples
cmd
Opens the cmd command shell.
About comp
A simple compare that compares two or more files.
Availability
The comp.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Compares the contents of two files or sets of files.
COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]
/N=number Compares only the first specified number of lines in each file.
file2 =
Compare error at LINE 7
file1 =
file2 =
file2 = s
Performs the specified operation on files in the given directory and all
/S subdirectories. Default "dir" is the current directory.
Displays files with the hidden or system attributes. These files are omitted by
/A default.
Forces the compress operation on all specified files, even those that are
/F already compressed. Already-compressed files are skipped by default.
Used without parameters, COMPACT displays the compression state of the current directory
and any files it contains. You may use multiple filenames and wildcards. You must put spaces
between multiple parameters.
Examples
compact
Display all the files in the current directory and their compact status.
compact file.txt
Display the compact status of the file file.txt
compact file.txt /C
Compacts the file.txt file.
About control
Control enables Microsoft Windows users to open the Control Panel and items within
the Control Panel from the command prompt.
Availability
The control command is an external command and is available in the below Microsoft operating
systems.
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Note: Although this command is available in all versions of Microsoft Windows after the release
of Windows 95, not all versions support the same commands. See the chart in examples for
additional information.
Syntax
No syntax is available for the control command. For available commands see the below
examples of all the available commands control is capable of doing through the command and
run line.
Examples
Below is a chart of the available options the command is capable of doing. Each release of
Microsoft Windows supports different options for this command therefore we have also listed if
the command is or is not supported in each of theWindows operating systems.
95/98/ N 2000/ Information
Command
ME T XP
The control command is also capable of executing many of the .cpl files located on your
computer; for example, a user can type the below command to open the Time and Date
window. A listing of .cpl files and additional information about adding and removing icons in the
Control Panel can be found on document CH000136.
control TimeDate.cpl
About convert
Converts FAT volumes to NTFS.
Availability
The convert.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Converts FAT volumes to NTFS.
CONVERT volume /FS:NTFS [/V]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
Examples
convert d: /fs:ntfs
Convert the d: drive, which in this example is a FAT volume, to a NTFS volume. Note, if this
volume is anything other than FAT, such as NTFS or RAW, this command will generate an error.
About copy
Allows the user to copy one or more files to an alternate location.
Availability
The copy command is an internal command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Copies one or more files to another location.
COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]
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).
Examples
copy *.* a:
Copy all files in the current directory to the floppy disk drive.
copy autoexec.bat c:\windows
Copy the autoexec.bat, usually found at root, and copy it into the windows directory; the
autoexec.bat can be substituted for any file(s).
copy win.ini c:\windows /y
Copy the win.ini file in the current directory to the windows directory. Because this file already
exists in the windows directory it normally would prompt if you wish to overwrite the file.
However, with the /y switch you will not receive any prompt.
copy "computer hope.txt" hope
Copy the file "computer hope.txt" into the hope directory. Whenever dealing with a file or
directory with a space, it must be surrounded with quotes. Otherwise you'll get the "The syntax
of the command is incorrect." error.
copy myfile1.txt+myfile2.txt
Copy the contents in myfile2.txt and combines it with the contents in myfile1.txt.
copy con test.txt
Finally, a user can create a file using the copy con command as shown above, which creates the
test.txt file. Once the above command has been typed in, a user could type in whatever he or
she wishes. When you have completed creating the file, you can save and exit the file by
pressing CTRL+Z, which would create ^Z, and then press enter. An easier way to view and edit
files in MS-DOS would be to use the edit command.
About ctty
Ctty is a MS-DOS utility that allows you to change the standard computer input/output device.
Availability
The ctty command is an internal command and is available in
MS-DOS 5.0 and above
Windows 95
Windows 98
Windows NT
Syntax
Changes the terminal device used to control your system.
CTTY device
device The terminal device you want to use, such as COM1.
About date
The date command can be used to look at the current date of the computer as well as change
the date to an alternate date.
Availability
The date command is an internal command and is available in
MS-DOS 5.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or sets the date.
DATE [date]
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
Examples
date
Display the current date and prompt for a new one. If no date is entered, the current date will
be kept.
Additional information about setting the computer date can also be found on document
CH000554.
How to set a computer's date and time.
Question
How to set a computer's date and time.
Answer
Below is a listing of different methods of how to change the computer's date and time in each of
the major operating systems and through the CMOS setup.
If the computer looses or resets the time and date after it has been off the CMOS battery is
bad and needs to be replaced.
Windows Vista and 7 users
Windows 9x, NT, 2000, and XP users
Through the BIOS / CMOS setup
MS-DOS and Windows command line users
Linux and Unix users
Apple users
Setting the date and time in Windows Vista and 7
1. Click on the Date and Time in the notification area. This is commonly the bottom right-hand
corner of the screen.
2. In the Window that appears click Change date and time settings
Setting the date and time in Microsoft Windows 95, 98, ME, NT 4.0, 2000, and XP
1. Right-click on the time in your Systray. This is commonly in the bottom right-hand of your
screen.
2. Click the Adjust Date/Time menu item.
3. This will open the Date/Time Properties window. In this window you can adjust the time, date,
and time zone. If you wish to change how the computer handles daylight savings, click the Time
Zone tab and check or uncheck the 'Automatically adjust clock for daylight saving changes'
option.
4. Once the proper date and time has been set, click Apply and then Ok.
You may also double-click the time to open the Date/Time Properties window.
How to view the date in Windows after it has been set.
Setting the date and time in the BIOS / CMOS setup
1. Enter the CMOS setup.
2. In the main or system setup screen you should be able to see the date and time. Using
your arrow keys, navigate to the date and change the date. Once highlighted on the month, day,
or year, press your arrow keys or your page up / page down keys to change the date.
These steps may vary for your BIOS; additional help, information, and simulations can be found
on the BIOS help page. You can also change the date and time by following the steps for your
operating system below.
Setting the date and time in MS-DOS and Windows command line
Setting the date through MS-DOS can be done by using the date command. Additional
information and help with this command can be found on the date command page.
To adjust the time while in MS-DOS use the time command. Additional information about this
command can be found on the time command page.
Setting the date in Linux and Unix
Use the date command to set the date and time. See the date command page for further
information and examples of how to do this.
Setting the date on the Apple operating system
1. Open the Apple Menu
2. Open the Control Panels
3. Open Date & Time
4. Within the Date & Time window you will be able to set the date, time, time zone, and change
the network time server.
About debug
Debug is a method of looking at portions of your computer and writing assembly code to
perform certain tasks on your computer.
MS-DOS 2.x - 4.x uses debug.com
MS-DOS 5.x and above uses debug.exe
Availability
The debug command is an external command and is available in the below Microsoft operating
systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Syntax
DEBUG [[drive:][path]filename [testfile-parameters]]
About Defrag
Microsoft Defrag was first introduced with MS-DOS 6.0 and is a software utility capable of
organizing the files on the hard disk drive.
Availability
The scandisk command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 6.0 and above
Users looking for steps on how to run Defrag in Windows and not from the command line
should see document CH001126.
Defrag syntax
Below is a listing of available switches in MS-DOS Defrag 6.0 and above. It is important to note
that these commands will not work in Windows 95 and above and defrag should never be ran
while Windows is running in the background.
defrag Drive: /F /U /S:order /B /Skiphigh /LCD /BW /G0 /A /H
Drive: Drive letter that you wish to defragment.
Examples
defrag c:
Defrag the main hard disk drive and correct any fragmented files.
See document CH000662 for other commonly asked questions about Microsoft Defrag.
Question
How do I run Microsoft Defrag?
Answer
Do not run Defrag if you are using a SSD drive.
Windows XP, 2000, Vista, and 7 users
Windows 95/98 users
Windows NT users
Windows 3.x / MS-DOS users
Windows 2000, XP, Vista, and 7 Defrag
To run Defrag, we recommend you follow the below steps.
Double-click My Computer or open Explorer.
Highlight the local hard disk C: drive by clicking on it once.
Right-click the highlighted local drive Click Properties
Click the Tools tab and click the Defragment now button.
Windows 95, 98, and ME Defrag
Windows 95 improved the functionality of Defrag as did Windows 98. To run Defrag from
Windows, follow the below steps.
Click Start
Click Run and type Defrag in the run box
Click ok
Within the Defrag window, select the drive that you wish to be checked and click ok.
Windows NT Defrag
Windows NT is not shipped with Microsoft Defrag. However, various third-party companies offer
utilities that can Defrag and check your hard disk drive for you. Symantec a well respected
computer company, offers such a program.
Windows 3.x and MS-DOS Defrag
Defrag was first available in MS-DOS 6.0 and was available ever since. If you are running MS-DOS
6.0+ and would like to run Defrag, follow the below steps.
If you are in Windows 3.x, click File and then Exit to get to the MS-DOS prompt.
From MS-DOS type CD\DOS and press enter.
From the C:\DOS> type Defrag and press enter, which should begin running Defrag on the
computer.
Finally, some computer manufacturers have changed the installation directory of where Defrag
is located if you are unable to run Defrag from DOS directory, go to the Windows directory by
typing CD\Windows. See the MS-DOS Defrag command page for additional information on this
command.
Question
How do I run Microsoft Defrag?
Answer
Do not run Defrag if you are using a SSD drive.
Windows XP, 2000, Vista, and 7 users
Windows 95/98 users
Windows NT users
Windows 3.x / MS-DOS users
Windows 2000, XP, Vista, and 7 Defrag
To run Defrag, we recommend you follow the below steps.
Double-click My Computer or open Explorer.
Highlight the local hard disk C: drive by clicking on it once.
Right-click the highlighted local drive Click Properties
Click the Tools tab and click the Defragment now button.
Windows 95, 98, and ME Defrag
Windows 95 improved the functionality of Defrag as did Windows 98. To run Defrag from
Windows, follow the below steps.
Click Start
Click Run and type Defrag in the run box
Click ok
Within the Defrag window, select the drive that you wish to be checked and click ok.
Windows NT Defrag
Windows NT is not shipped with Microsoft Defrag. However, various third-party companies offer
utilities that can Defrag and check your hard disk drive for you. Symantec a well respected
computer company, offers such a program.
Windows 3.x and MS-DOS Defrag
Defrag was first available in MS-DOS 6.0 and was available ever since. If you are running MS-DOS
6.0+ and would like to run Defrag, follow the below steps.
If you are in Windows 3.x, click File and then Exit to get to the MS-DOS prompt.
From MS-DOS type CD\DOS and press enter.
From the C:\DOS> type Defrag and press enter, which should begin running Defrag on the
computer.
Finally, some computer manufacturers have changed the installation directory of where Defrag
is located if you are unable to run Defrag from DOS directory, go to the Windows directory by
typing CD\Windows. See the MS-DOS Defrag command page for additional information on this
command.