

        Ŀ Ŀ Ŀ Ŀ Ŀ Ŀ
        ӷ   ӷ     ķ     ķ  ӷ  ķ     ķ  
                           Ŀ                 
                    Ŀ   Ľ         Ľ     Ŀ
                  ķ     ķ         ķ   ķ  
                  Ŀ          Ŀ           Ŀ     
           Ľ      Ľ     Ľ  ֽ     Ŀ   Ľ  
               
 


          Ŀ Ŀ Ŀ Ŀ Ŀ Ŀ
            ķ   ӷ   ӷ   ķ   ӷ  ķ     ķ 
                                             Ŀ 
                                                Ľ 
             Ŀ                             ķ 
             ķ                                 Ŀ
            Ľ      Ľ    Ľ  Ŀ ֽ  Ľ     Ľ 
                


                     Ŀ Ŀ Ŀ
                     ӷ  ķ    ķ   ӷ  ķ  
                                              
                        Ŀ                Ľ  
                                        ķ  
                                               
                     ֽ           Ľ   ֽ     Ŀ
                              


   ķ  ķ         ķ ķ ķ
     ͸  ͸      ͸           Ը  ͸     ͸     ͸  
                    ͼ                               ͼ
                 ķ                            ķ
        ӷ     ͸   ķ                  ͸  
      ͼ     ķ      ͼ                  ķ     
    ӷ        ӷ                            
  ͼ      ͼ ͼ         ͼ ͼ ͼ
 


                          Ŀ     Ŀ Ŀ
                                ķ   ķ 
                           Ŀ     Ľ     
                           ķ           
                           Ľ  Ŀ  Ŀ  Ľ 
                             



 
                         What's New in MS-DOS 6.2?
 
Welcome to Microsoft MS-DOS, the most widely used operating system for
personal computers. MS-DOS 6.2 improves on the safety and ease of use
provided by MS-DOS 6. The rest of this topic describes features new to
MS-DOS 6.2. For information about features included in both MS-DOS 6 and
MS-DOS 6.2, see the Welcome chapter of the MS-DOS 6 User's Guide.
 
Safety Features and Enhancements
 
  MS-DOS 6.2 includes ScanDisk, a new utility that detects, diagnoses, and
   repairs disk errors on uncompressed drives and DoubleSpace compressed
   drives. ScanDisk can repair file system errors (such as crosslinks and
   lost clusters) and physical disk errors. ScanDisk keeps a log of its
   repairs and enables you to undo any of the changes it made. DoubleSpace
   runs ScanDisk to check the reliability of your disk before it begins
   compression. You can also run ScanDisk yourself by typing SCANDISK at the
   command prompt. For more information, see <An Introduction to ScanDisk>.
 
  DoubleSpace includes DoubleGuard safety checking, which protects against
   data corruption by verifying data integrity before writing data to your
   disk. If DoubleGuard detects that the memory DoubleSpace is using has
   been corrupted by another program, it shuts down your computer
   immediately to minimize damage to your data.
 
   Although DoubleGuard is on by default, you can turn it off to save
   memory. To do this, use the <DBLSPACE /DOUBLEGUARD> command, or turn off
   the DoubleGuard option in the Options dialog (start DoubleSpace, and then
   choose Options from the Tools menu).
 
  The MS-DOS extended-memory manager, HIMEM, automatically tests your
   system's memory when you start your computer. This test can identify
   memory chips that are no longer reliable. (Unreliable memory can result
   in system instability or loss of data.) To turn off the memory test, add
   the /TESTMEM:OFF switch to the command that starts HIMEM. For more
   information, see <HIMEM.SYS>.
 
  Setup now configures SMARTDrive as a read-only cache by default. Even if
   write-caching is enabled, MS-DOS does not display the command prompt
   until SMARTDrive has written its cache to your disk. This prevents you
   from turning off your computer before the data in memory is saved.
 
  The <MOVE>, <COPY>, and <XCOPY> commands now ask you for confirmation
   before copying a file over another file that has the same name. (However,
   when issued from a batch file, these commands do not prompt for
   confirmation before overwriting a file.)
 
Ease-of-Use Features and Other Enhancements
 
  With MS-DOS 6.2, you can easily uncompress a DoubleSpace drive or even
   completely uninstall DoubleSpace from memory. For more information, see
   <DBLSPACE /UNCOMPRESS>.
 
  SMARTDrive now caches CD-ROM drives. (For this support to be enabled, the
   MSCDEX program must be loaded before SMARTDrive. To find out if
   SMARTDrive is caching your CD-ROM drive, type SMARTDRV at the command
   prompt. If SMARTDRV lists the drive letter for your CD-ROM drive, the
   drive is being cached. For more information, see <SMARTDRV>.
 
  DoubleSpace automatically mounts compressed floppy disks and other
   compressed removable media  even when Windows is running. Although
   automounting is enabled by default, you can turn it off to save memory.
   To do this, use the <DBLSPACE /AUTOMOUNT> command, or turn off the
   Automount option in the Options dialog (start DoubleSpace, and then
   choose Options from the Tools menu).
 
  You can now bypass or carry out individual commands in your AUTOEXEC.BAT
   and other batch programs. (In MS-DOS 6, this capability was limited to
   your CONFIG.SYS file.) This feature makes it easier to isolate problems
   when you are troubleshooting problems in your system configuration or in
   batch programs.
 
   To step through the commands in your AUTOEXEC.BAT file, press F8 when
   your computer starts. For more information, see "Bypassing CONFIG.SYS and
   AUTOEXEC.BAT Commands" in the <CONFIG.SYS Commands> topic. To step
   through other batch files, use the <COMMAND /Y> command.
 
  If you need to, you can bypass DoubleSpace when you start your computer.
   This makes troubleshooting easier and also temporarily frees memory for
   use by other applications. For more information, see "Bypassing
   DoubleSpace" in the <CONFIG.SYS Commands> topic.
 
  The <DISKCOPY> command now uses your hard disk as an interim storage
   area, which makes copying from one floppy disk to another faster and
   easier.
 
  Microsoft Defragmenter makes better use of your computer's extended
   memory, so it can now defragment much larger disks and disks containing
   many more files and directories. For more information on running
   Defragmenter, see the <DEFRAG> command.
 
  The output of the DIR, MEM, CHKDSK, and FORMAT commands is much easier to
   read, since it now includes thousands separators when displaying numbers
   greater than 999. For example, "1000000 bytes free" now reads "1,000,000
   bytes free."
 

 
                        An Introduction to ScanDisk
 
ScanDisk is a full-featured disk analysis and repair program. It is designed
to work on both uncompressed drives and DoubleSpace compressed drives.
 
Starting ScanDisk
 
To start ScanDisk, type the following command:
 
    scandisk
 
ScanDisk begins checking the current drive. If ScanDisk finds any problems,
it displays a dialog explaining the problem.
 
To check a specific drive, type the drive letter after the ScanDisk command.
For example, to check drive D, type the following command:
 
    scandisk d:
 
Running ScanDisk
 
If ScanDisk doesn't find any problems with your drive, you don't have to do
much. Just let it run, and when it completes, choose the Exit button at the
bottom of the screen by typing X or by clicking Exit with the mouse.
 
If ScanDisk finds a problem, it displays a Problem Found dialog that briefly
explains the problem and what will happen if you fix it. Most Problem Found
dialogs have a Fix It button, a Don't Fix It button, and a More Info button.
To have ScanDisk correct the problem, choose the Fix It button.
 
Using the More Info dialogs
 
Most ScanDisk screens and dialogs include a More Info button. This displays
another dialog with more information  usually additional technical details
 about the current screen. For some types of problems, the More Info
dialog lists the names of affected files.
 
ScanDisk and compressed drives
 
If you run ScanDisk on a mounted or unmounted compressed drive, it offers to
check the host (physical) drive first. In general, you should allow it to do
so, since an error on the host drive could cause problems with the
compressed drive.
 
Creating an Undo disk
 
If ScanDisk finds a problem and you choose Fix It, ScanDisk offers to create
an Undo floppy disk that you can later use to restore your disk to its
previous state. You can restore your disk's previous state only if you
haven't changed it since making repairs. Creating an Undo disk is easy 
you just insert a blank, formatted floppy disk in drive A or drive B, and
then choose the Drive A or Drive B button in the dialog ScanDisk displays.
 
Customizing ScanDisk by using the SCANDISK.INI file
 
The SCANDISK.INI file contains settings that determine many aspects of
ScanDisk's behavior. Most of the settings determine how ScanDisk will behave
if you start it with the /CUSTOM switch. You can also use the settings in
SCANDISK.INI to control other aspects of ScanDisk's behavior; for example,
to prevent ScanDisk from prompting you for an Undo disk, just change the
Undo setting in SCANDISK.INI to "Never". For more information about
SCANDISK.INI, see the comments within the file.
 

 
                              DoubleSpace Tips
 
This topic provides tips for getting the most out of DoubleSpace, and also
answers some common questions about DoubleSpace. For additional information
about DoubleSpace, see the "Freeing Disk Space" chapter in the MS-DOS 6
User's Guide, or see the <DBLSPACE> command.
 
What does DoubleSpace do?
 
DoubleSpace is a disk-compression program. It stores more files in less
space by storing those files more efficiently. Most files are stored fairly
inefficiently  somewhat like a sponge that has a lot of air holes in it.
When you squeeze a sponge, it becomes temporarily smaller; but when you let
go of it, the sponge returns to its original shape and size. When you
compress a drive, DoubleSpace "squeezes" the files on that drive until they
are as small as possible  just like squeezing a sponge. A file stored on a
compressed drive stays "squeezed" until you use it. When the file is loaded
into memory, DoubleSpace uncompresses the file so that it returns to its
original size, just as a sponge does when you let go of it. When you're
finished using the file, DoubleSpace "squeezes" it again and stores it back
on the compressed drive.
 
When should I use DoubleSpace?
 
You should use DoubleSpace if you are running low on disk space and don't
want to invest in a larger hard disk drive. DoubleSpace can dramatically
increase your available disk space. However, because DoubleSpace uses at
least 33K of memory, it makes sense not to install DoubleSpace unless you
need it.
 
How does DoubleSpace "squeeze" a file?
 
Most files contain a lot of repeated data. When DoubleSpace finds repeated
data in a file, it retains the first occurrence of that data, and replaces
any other occurrences of that data with a cross-reference to the first
occurrence. The cross-reference takes less space than the original data.
 
For example, the following phrase includes the repeated data "at ":
 
    The fat cat sat up.
 
DoubleSpace compresses this sentence by replacing the repeated "at "
characters (including the space) with a cross-reference to the first "at ".
In this example, cross- references are represented by the # character:
 
    The fat c#s#up.
 
Why does DoubleSpace compress some files more than others?
 
Some files contain more repeated data than others. For example, program
files are usually compiled so that they are stored as efficiently as
possible; program files are typically not as compressible as some other
types of files. Bitmap files and text files typically compress well, since
most such files contain a lot of repeated data. Files that were compressed
by using a standalone compression program such as PKZIP usually do not
compress any further; although you can store such files on a compressed
drive, there is little advantage to doing so.
 
Will DoubleSpace slow down my system?
 
If you have a computer with a fast CPU and a fast hard disk, you probably
won't notice much difference in system speed after installing DoubleSpace.
If you have a fast CPU and a slow hard disk, DoubleSpace might actually
improve your system's speed. If your computer has a slow CPU, you may notice
a reduction in speed after compressing your drive.
 
What happens during DoubleSpace Setup?
 
DoubleSpace Setup configures your computer to run DoubleSpace and compresses
the drive of your choice. DoubleSpace Setup first runs ScanDisk to check
your hard disk for logical and physical errors. If necessary, it runs the
Microsoft Defragmenter to defragment the files on your disk. Finally, it
compresses the files on your drive. For more information about running
DoubleSpace Setup, see the "Freeing Disk Space" chapter of the MS-DOS 6
User's Guide.
 
Now that I've installed DoubleSpace, why do I have an additional drive?
 
When DoubleSpace Setup is complete, you will have an additional drive.
 
If you chose to create a new compressed drive, the additional drive is the
compressed drive you just created.
 
If you compressed an existing drive (for example, drive C) the additional
drive is an uncompressed drive. It is used to store files that must remain
uncompressed (such as the Windows swap file). The additional drive also
contains important system files such as IO.SYS, MSDOS.SYS, DBLSPACE.BIN,
DBLSPACE.INI and DBLSPACE.000.
 
CAUTION:  Do not delete or otherwise tamper with the hidden files on the new
          drive. If you do, you might lose your compressed drive and all the
          files it contains.
 
For more information about DoubleSpace Setup, see "Understanding Disk
Compression" in the "Freeing Disk Space" chapter of the MS-DOS 6 User's
Guide.
 
Can I copy a file from a compressed drive to an uncompressed drive (such as
a floppy disk or a network drive)?
 
Yes. You can copy files between compressed drives and uncompressed drives
just as you would between two uncompressed drives. A file is actually
compressed only when it is stored on a compressed drive. When you copy a
file from your compressed drive, DoubleSpace reads the file into memory and
uncompresses it. The file is then copied to the uncompressed drive in its
uncompressed state.
 
If I compress a drive and then add more files to it, do I need to recompress
the drive?
 
No. Whenever you copy a file to a DoubleSpace drive, DoubleSpace saves the
file in compressed form. It doesn't matter whether the file was on the drive
when you compressed the drive.
 
If I'm using DoubleSpace, what should I do to maintain my system?
 
In general, maintaining a computer that's running DoubleSpace is just like
maintaining an uncompressed system. To ensure the safety of your data and
the stability of your system, do the following frequently (for example, once
a week):
 
  Back up your data files regularly. You can back up your files by using
   either Backup for MS-DOS or Backup for Windows. For more information, see
   the following section. Also, see the chapter "Managing Your System" in
   the MS-DOS 6 User's Guide.
 
  Check your hard disk regularly for logical and physical errors. To check
   and repair a drive, use the ScanDisk program. For more information, see
   <SCANDISK>.
 
  Check your computer's memory and hard disk for viruses. Viruses can
   damage data, and can even prevent your computer from starting or running
   properly. To check for viruses, use Anti-Virus. Be sure to check all your
   drives  compressed and uncompressed drives. For more information, see
   the chapter "Managing Your System" in the MS-DOS 6 User's Guide.
 
  Defragment your hard disk drive periodically. (Since defragmentation can
   take a long time, you might want to do it at the end of the day.) For
   more information, see the chapter "Managing Your System" in the MS-DOS 6
   User's Guide.
 
  Set up Undelete so that you can restore any files that you accidentally
   delete. For information about setting up Undelete, see the chapter
   "Managing Your System" in the MS-DOS 6 User's Guide.
 
How should I back up my files if I'm using DoubleSpace?
 
You should back up and restore the files on a compressed drive just as you
would the files on an uncompressed drive. (For information about using
Microsoft Backup, see the chapter "Managing Your System" in the MS-DOS 6
User's Guide.)
 
When backing up the files on the host drive (the uncompressed drive that
contains the compressed volume file (CVF) for your compressed drive), you
typically do not need to back up any files that have names in the form
DBLSPACE.nnn (for example, DBLSPACE.000). The DBLSPACE.nnn file essentially
contains your compressed drive. Although it is possible to back up the
DBLSPACE.nnn file, doing so is redundant if you have also backed up the
files on that compressed drive. In general, it's best to back up the files
on your compressed drive directly, rather than by backing up the associated
CVF (the DBLSPACE.nnn file). This is because backing up only the CVF does
not allow you to restore individual files or directories later. When you
restore the backup copy of a DBLSPACE.nnn file, it replaces the entire
compressed drive with the backup copy. This means that you will lose all
changes to all files on that drive that were made since the backup copy was
created.
 
I installed DoubleSpace and now I'm running out of memory. What can I do?
 
If you have an 80386 or higher computer, run <MemMaker> after installing
DoubleSpace. MemMaker can move portions of DoubleSpace out of conventional
memory, which makes more memory available for running programs. Also, make
sure the BUFFERS command in your CONFIG.SYS file is set to no more than 10
buffers. For more information about BUFFERS and DoubleSpace, see <BUFFERS>.
 
If you have an 80286 computer with at least 1 MB of memory, make sure your
CONFIG.SYS file contains a DOS=HIGH command and a DEVICE command for
HIMEM.SYS. (MS-DOS Setup normally adds these commands to your CONFIG.SYS
file.) With these commands, MS-DOS, and parts of DoubleSpace, can load into
the high memory area.
 
Is it all right to run SMARTDrive if I'm using DoubleSpace?
 
SMARTDrive and DoubleSpace are designed to work together. If Setup
determines that your computer has enough memory to run SMARTDrive, it
automatically installs SMARTDrive by adding a SMARTDRV command to your
AUTOEXEC.BAT file. In particular, you should run SMARTDrive if you are
running DoubleSpace and you use Windows; in that case, using SMARTDrive can
significantly speed up your computer.
 
SMARTDrive is designed to speed up your system and safeguard your data. By
default, Setup configures SMARTDrive so that write-caching is disabled. (If
SMARTDrive was originally configured to allow write-caching, Setup will not
change your configuration.) Write-caching provides much faster performance
than read-only caching, but is not as conservative. For more information
about SMARTDrive, see <SMARTDRV>.



                               Batch Commands
 
A batch file or batch program is an unformatted text file that contains one
or more MS-DOS commands and is assigned a .BAT extension. When you type the
name of the batch program at the command prompt, the commands are carried
out as a group.
 
Any MS-DOS command you use at the command prompt can also be put in a batch
program. In addition, the following MS-DOS commands are specially designed
for batch programs:
 
<Call>                    <If>
<Choice>                  <Pause>
<Echo>                    <Rem>
<For>                     <Shift>
<Goto>
 
You can use the COMMAND /Y command to step through a batch program line by
line, and can selectively bypass or carry out individual commands. This is
useful for tracking down problems in batch files. For more information, see
<COMMAND>.
 
                            CONFIG.SYS Commands
 
The CONFIG.SYS file is a text file that contains special commands. These
commands configure your computer's hardware components so that MS-DOS and
applications can use them. When MS-DOS starts, it carries out the commands
in the CONFIG.SYS file. Typically, the CONFIG.SYS file is located in the
root directory of drive C.
 
CONFIG.SYS commands
 
The following CONFIG.SYS commands can be used only in the CONFIG.SYS file:
 
<Buffers>                 <Files>
<Country>                 <Install>
<Device>                  <Lastdrive>
<Devicehigh>              <Numlock>
<Dos>                     <Shell>
<Drivparm>                <Stacks>
<Fcbs>                    <Switches>
 
The following commands are commonly used in the CONFIG.SYS file and can also
be typed at the command prompt:
 
<Break>
<Rem>
<Set>
 
The following special CONFIG.SYS commands are used only to define multiple
configurations within the CONFIG.SYS file:
 
<Include>
<Menucolor>
<Menudefault>
<Menuitem>
<Submenu>
 
For more information about defining multiple configurations, see
<Multi-Config Commands>.
 
Special characters in the CONFIG.SYS file
 
The CONFIG.SYS file can also contain the following special characters:
 
   ;   Specifies that the current line is a descriptive comment
       and should not be carried out. Insert this character at the
       beginning of the line. (You can also insert a comment by using
       the REM command.)
 
   ?   Specifies that MS-DOS is to ask for confirmation before
       carrying out the current command. Insert this character
       immediately after the command you want to prompt for, without
       any intervening spaces, but before the equal sign (=). For example,
       to have MS-DOS ask for confirmation before carrying out the
       DOS=HIGH command, you would change the command to read
       DOS?=HIGH. To have MS-DOS ask for confirmation before
       carrying out the DEVICEHIGH /L:1,7280=MYFILE.SYS
       command, you would change the command to read as follows:
       DEVICEHIGH? /L:1,7280=MYFILE.SYS
 
Bypassing CONFIG.SYS and AUTOEXEC.BAT commands
 
If you are having system problems that you suspect are caused by one or more
commands in your CONFIG.SYS or AUTOEXEC.BAT file, you might want to bypass
some or all the commands in these files. (For information about bypassing
DoubleSpace, see the next section.)
 
  To bypass all the commands in your CONFIG.SYS and AUTOEXEC.BAT files,
   press the F5 key immediately after starting your computer, when you see
   the text "Starting MS-DOS...".
 
  To bypass individual CONFIG.SYS and AUTOEXEC.BAT commands, press the F8
   key instead. MS-DOS will then prompt you to carry out or bypass each
   command. To carry out all remaining startup commands, press ESC. To
   bypass all remaining startup commands, press F5.
 
To disable this feature, add the <SWITCHES /N> command to your CONFIG.SYS
file.
 
Starting your computer without loading DBLSPACE.BIN
 
DBLSPACE.BIN is the part of MS-DOS that provides access to DoubleSpace
compressed drives. Normally, if your hard drive has been compressed using
DoubleSpace, DBLSPACE.BIN is loaded even if you press F5 or F8. There are
two ways to disable this:
 
  To start your computer without loading DBLSPACE.BIN, and to bypass all
   the commands in your CONFIG.SYS and AUTOEXEC.BAT files, press CTRL+F5.
 
  To start your computer without loading DBLSPACE.BIN, and to bypass
   individual commands in your CONFIG.SYS & AUTOEXEC.BAT files, press
   CTRL+F8. MS-DOS will then prompt you to carry out or bypass each
   CONFIG.SYS and AUTOEXEC.BAT command. To carry out all remaining startup
   commands, press ESC. To bypass all remaining startup commands, press F5.
 
Note:  If you bypass DBLSPACE.BIN, you will not be able to gain access to
       your DoubleSpace compressed drives until you restart your computer
       with DBLSPACE.BIN. (Your compressed drives will remain on your hard
       disk as hidden files with names such as DBLSPACE.000. Do not delete
       or rename such files.)
 
To disable this feature, use the <DBLSPACE /SWITCHES> command.
 
For more information about your CONFIG.SYS file, see the chapter
"Configuring Your System" in the MS-DOS User's Guide.
 
                               Device Drivers
 
The following installable device drivers are provided with MS-DOS:
 
<ANSI.SYS>                <HIMEM.SYS>
<CHKSTATE.SYS>            <INTERLNK.EXE>
<DBLSPACE.SYS>            <POWER.EXE>
<DISPLAY.SYS>             <RAMDRIVE.SYS>
<DRIVER.SYS>              <SETVER.EXE>
<EGA.SYS>                 <SMARTDRV.EXE>
<EMM386.EXE>
 
The files COUNTRY.SYS and KEYBOARD.SYS are not device drivers. They are data
files for the COUNTRY and KEYB commands, respectively. Do not try to load
either of these files with the DEVICE command. If you do, your system halts,
and you cannot restart MS-DOS. For information about loading COUNTRY.SYS,
see the <COUNTRY> command. For information about loading KEYBOARD.SYS, see
the <KEYB> command.
 
                           International Commands
 
The following commands are useful when changing country-specific settings
and character sets (code pages):
 
<Chcp>
<Country>
<Keyb>
<Mode>
<Nlsfunc>
 

 
               Commands for Defining Multiple Configurations
 
A single CONFIG.SYS file can define several different system configurations.
To define multiple configurations, you use the following special CONFIG.SYS
commands:
 
<Include>
<Menucolor>
<Menudefault>
<Menuitem>
<Submenu>
 
To define multiple configurations, follow these general steps:
 
1  Define a startup menu in the CONFIG.SYS file by using a [menu] header
   followed by one or more <MENUITEM> commands. The <MENUDEFAULT>,
   <MENUCOLOR> and <SUBMENU> commands can be used to define special
   characteristics of the startup menu.
 
2  Create a configuration block in the CONFIG.SYS file for each
   configuration you want. A configuration block begins with a block header
    a name surrounded by square brackets. To each block, add the
   <CONFIG.SYS commands> that you want MS-DOS to carry out when that
   configuration is selected from the startup menu.
 
3  (Optional) In the AUTOEXEC.BAT file, use <batch commands> such as <GOTO>
   and <IF> to have MS-DOS carry out different AUTOEXEC.BAT commands
   depending on the startup configuration.
 
   When a configuration is selected from the startup menu, MS-DOS defines an
   environment variable named CONFIG and sets it to the name of the selected
   configuration block. To have MS-DOS carry out different sets of commands
   for different CONFIG values, add a GOTO %CONFIG% command to your
   AUTOEXEC.BAT file.
 
For more information about defining multiple configurations, see the chapter
"Configuring Your System" in the MS-DOS User's Guide.
 

 
                    Multiple Configurations  Examples
 
Defining multiple configurations in your CONFIG.SYS file
 
The following CONFIG.SYS file defines two configurations:
 
    [Menu]
    menuitem=Steve
    menuitem=Lisa
 
    [Common]
    dos=high
    buffers=15
    device=c:\dos\himem.sys
 
    [Steve]
    files=20
    device=c:dos\emm386 2048
 
    [Lisa]
    files=40
    device=c:\net\network.sys
 
    [Common]
 
This CONFIG.SYS file configures the computer for either Steve or Lisa. For
both configurations, MS-DOS carries out the three commands in the first
[common] section: DOS=HIGH, BUFFERS=15, and DEVICE=C:\DOS\HIMEM.SYS. Steve
uses a desktop publishing program that requires expanded memory, so his
configuration includes a command for EMM386. He does not use the network.
Lisa uses the network but not desktop publishing. Her configuration starts
the network driver.
 
Defining multiple configurations in your AUTOEXEC.BAT file
 
When a configuration is selected from the startup menu, MS-DOS defines an
environment variable named CONFIG and sets it to the name of the selected
configuration block. In the AUTOEXEC.BAT file, you can use the <GOTO>
command to have MS-DOS carry out different sets of commands for different
CONFIG values.
 
The following AUTOEXEC.BAT file uses the GOTO command with the CONFIG
variable to carry out different sets of commands. This AUTOEXEC.BAT file is
designed to work with the sample CONFIG.SYS file in the preceding section.
 
    c:\dos\smartdrv.exe
    set temp=c:\temp
    c:\dos\msav
 
    ; Go to the section that matches the current
    ; value of the CONFIG variable
    goto %config%
 
    :Steve
    path=c:\dos;c:\deskpub;c:\typeset
    c:\mouse\mouse.com
    deskpub
    ; now skip Lisa's section & go to end
    goto end
 
    :Lisa
    path=c:\dos;c:\network;c:\utility
    doskey
    net logon lisa
    goto end
 
    :end
 
When MS-DOS runs this AUTOEXEC.BAT file, it starts SMARTDrive, sets the TEMP
environment variable, and starts the MS-DOS Anti-Virus program. MS-DOS then
goes to the section that matches the value of the CONFIG variable.
 
If the name of the selected configuration is "Steve," MS-DOS goes to the
Steve section. It then sets the search path for Steve, loads the MOUSE.COM
program from the C:\MOUSE directory, and runs the desktop publishing
program. The GOTO END command instructs MS-DOS to skip to the End section;
this prevents the commands in the Lisa section from being carried out for
Steve's configuration.
 
If the current configuration is "Lisa," the search path is set differently,
MS-DOS runs the Doskey program, and a Logon command instructs the network
driver (loaded from the CONFIG.SYS file) to connect the computer to the
network.
 

 
                                  ANSI.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 of which
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.
 
This device driver must be loaded by a <DEVICE> or <DEVICEHIGH> command in
your CONFIG.SYS file.
 
Note:  In this topic bold letters in syntax and ANSI escape sequences
       indicate text you must type exactly as it appears.
 
Syntax
 
    DEVICE=[drive:][path]ANSI.SYS [/X] [/K] [/R]
 
Parameter
 
[drive:][path]
   Specifies the location of the ANSI.SYS file.
 
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 make computers
     more accessible to people with disabilities).
 
Parameters used in ANSI escape sequences
 
Pn
    Numeric parameter. Specifies a decimal number.
 
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.
 
ANSI escape sequences for cursor movement, graphics, and keyboard settings
 
In the following 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 positionthe upper-left corner of the screen (line 0, column
    0). This escape sequence works the same way as the following 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
    following 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
       0    All attributes off
       1    Bold on
       4    Underscore (on monochrome display adapter only)
       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
 
    Parameters 30 through 47 meet the ISO 6429 standard.
 
ESC[=psh
    Set Mode: Changes the screen width or type to the mode specified
    by one of the following values:
 
       0      40 x 148 x 25 monochrome (text)
       1      40 x 148 x 25 color (text)
       2      80 x 148 x 25 monochrome (text)
       3      80 x 148 x 25 color (text)
       4      320 x 148 x 200 4-color (graphics)
       5      320 x 148 x 200 monochrome (graphics)
       6      640 x 148 x 200 monochrome (graphics)
       7      Enables line wrapping
      13      320 x 148 x 200 color (graphics)
      14      640 x 148 x 200 color (16-color graphics)
      15      640 x 148 x 350 monochrome (2-color graphics)
      16      640 x 148 x 350 color (16-color graphics)
      17      640 x 148 x 480 monochrome (2-color graphics)
      18      640 x 148 x 480 color (16-color graphics)
      19      320 x 148 x 200 color (256-color graphics)
 
ESC[=Psl
    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 following 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 following table are not valid for all
            computers. Check your computer's documentation for values that
            are different.
 
Key                       Code      SHIFT+code  CTRL+code  ALT+code

 
F1                        0;59      0;84        0;94       0;104
 
F2                        0;60      0;85        0;95       0;105
 
F3                        0;61      0;86        0;96       0;106
 
F4                        0;62      0;87        0;97       0;107
 
F5                        0;63      0;88        0;98       0;108
 
F6                        0;64      0;89        0;99       0;109
 
F7                        0;65      0;90        0;100      0;110
 
F8                        0;66      0;91        0;101      0;111
 
F9                        0;67      0;92        0;102      0;112
 
F10                       0;68      0;93        0;103      0;113
 
F11                       0;133     0;135       0;137      0;139
 
F12                       0;134     0;136       0;138      0;140
 
HOME (num keypad)         0;71      55          0;119      
 
UP ARROW (num keypad)     0;72      56          (0;141)    
 
PAGE UP (num keypad)      0;73      57          0;132      
 
LEFT ARROW (num keypad)   0;75      52          0;115      
 
RIGHT ARROW (num          0;77      54          0;116      
keypad)
 
END (num keypad)          0;79      49          0;117      
 
DOWN ARROW (num keypad)   0;80      50          (0;145)    
 
PAGE DOWN (num keypad)    0;81      51          0;118      
 
INSERT (num keypad)       0;82      48          (0;146)    
 
DELETE  (num keypad)      0;83      46          (0;147)    
 
HOME                      (224;71)  (224;71)    (224;119)  (224;151)
 
UP ARROW                  (224;72)  (224;72)    (224;141)  (224;152)
 
PAGE UP                   (224;73)  (224;73)    (224;132)  (224;153)
 
LEFT ARROW                (224;75)  (224;75)    (224;115)  (224;155)
 
RIGHT ARROW               (224;77)  (224;77)    (224;116)  (224;157)
 
END                       (224;79)  (224;79)    (224;117)  (224;159)
 
DOWN ARROW                (224;80)  (224;80)    (224;145)  (224;154)
 
PAGE DOWN                 (224;81)  (224;81)    (224;118)  (224;161)
 
INSERT                    (224;82)  (224;82)    (224;146)  (224;162)
 
DELETE                    (224;83)  (224;83)    (224;147)  (224;163)
 
PRINT SCREEN                                0;114      
 
PAUSE/BREAK                                 0;0        
 
BACKSPACE                 8         8           127        (0)
 
ENTER                     13                  10         (0
 
TAB                       9         0;15        (0;148)    (0;165)
 
NULL                      0;3                          
 
A                         97        65          1          0;30
 
B                         98        66          2          0;48
 
C                         99        66          3          0;46
 
D                         100       68          4          0;32
 
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
 
,                         44        60                   0;51
 
.                         46        62                   0;52
 
/                         47        63                   0;53
 
`                         96        126                  (0;41)
 
ENTER (keypad)            13                  10         (0;166)
 
/ (keypad)                47        47          (0;142)    (0;74)
 
* (keypad)                42        (0;144)     (0;78)     
 
- (keypad)                45        45          (0;149)    (0;164)
 
+ (keypad)                43        43          (0;150)    (0;55)
 
5 (keypad)                (0;76)    53          (0;143)    
 

 
                              ANSI.SYSNotes
 
Remapping extended keys
 
If you have a keyboard with 101 keys, you may want to use the /X switch to
remap certain extended keys. For example, there are two HOME keys on
keyboards with 101 keys: One on the numeric keypad and the other in the
block of cursor-control keys. Unless you specify the /X switch, the two HOME
keys are the same to MS-DOS.
 
Ignoring extended keys
 
If you have a program that does not correctly interpret input from an
enhanced keyboard, use the /K switch with ANSI.SYS. Your enhanced keyboard
will then use conventional keyboard functions.
 
Using both the /X switch and the /K switch
 
You cannot specify ANSI.SYS with both the /X switch and the /K switch.
 

 
                             ANSI.SYSExamples
 
To exchange the backslash and question-mark keys by using literal strings,
type the following escape sequence:
 
    ESC["\";"?"pESC["?";"\"p
 
To exchange the backslash and question-mark keys by using each key's ASCII
value, type the following escape sequence:
 
    ESC[92;63pESC[63;92p
 
To restore the backslash and question-mark keys to their original meanings,
type the following escape sequence:
 
    ESC[92;92pESC[63;63p
 
To specify that MS-DOS display a directory listing when you press the F2
key, type the following at the command prompt:
 
    prompt $e[0;60;"dir";13p
 
To specify a black screen background color and a high-intensity screen
foreground color, type the following at the command prompt:
 
    prompt $e[1;32;40m$p$g
 

 
                                   APPEND
 
Enables programs to open data files in specified directories as if the files
were in the current directory. Do not use this command when Windows is
running.
 
The specified directories are called appended directories because, for the
sake of opening data files, they can be found as if they were appended to
the current directory.
 
Syntax
 
    APPEND [[drive:]path[;...]] [/X[:ON|:OFF]][/PATH:ON|/PATH:OFF] [/E]
 
To display the list of appended directories, use the following syntax:
 
    APPEND
 
To cancel the existing list of appended directories, use the following
syntax:
 
    APPEND ;
 
Parameters
 
[drive:]path
    Specifies the drive (if other than the current drive) and directory that
    you want to append to the current directory. You can specify multiple
    entries of [drive:]path, separating the entries with semicolons.
 
;
    When used by itself (APPEND ;), cancels the existing list of appended
    directories.
 
Switches
 
/X[:ON|:OFF]
    Specifies whether MS-DOS is to search (/X:ON) or not search (/X:OFF)
    appended directories when executing programs. You can abbreviate /X:ON
    to /X. If you want to specify X:ON, you must do it the first time you
    use APPEND after starting your system. After that, you can switch
    between X:ON and X:OFF. The default value is /X:OFF.
 
/PATH:ON|/PATH:OFF
    Specifies whether a program is to search appended directories for a data
    file when a path is already included with the name of the file the
    program is looking for. The default setting is /PATH:ON.
 
/E
    Assigns the list of appended directories to an environment variable
    named APPEND. This switch can be used only the first time you use APPEND
    after starting your system. If you use /E, you can use the SET command
    to display the list of appended directories. For information about
    environment variables, see the <SET> command.
 
Caution
 
Do not use Append with Microsoft Windows or the Windows Setup program.
 
Related Command
 
To set a search path for executable files, see the <PATH> command.
 

 
                               APPENDNotes
 
Running APPEND with Microsoft Windows
 
Do not use Append with Microsoft Windows or the Windows Setup program.
 
Running APPEND multiple times
 
You can use APPEND as many times as you want after starting your system.
However, note the following:
 
  The /E switch is valid only the first time you use APPEND after starting
   your system.
 
  The second and subsequent times you run APPEND, you must omit the .EXE
   filename extension. If you try to run APPEND by typing APPEND.EXE, it
   will not load more than once.
 
Storing the list of appended directories in the environment
 
You can use the /E switch with APPEND to assign the list of appended
directories to an environment variable named APPEND. To do this, first use
the APPEND command with only the /E switch. Then use APPEND again, this time
including the directories you want to append. You cannot specify /E and
[drive:]path on the same command line.
 
Specifying multiple appended directories
 
To append more than one directory, separate multiple entries with
semicolons. If you use the APPEND command with the [drive:]path parameters
again, the specified directory or directories replace any directories
specified in a previous APPEND command.
 
Appended directories and the DIR command
 
If you specify the DIR command, the resulting list does not include
filenames from appended directories.
 
Filename conflicts
 
If a file in an appended directory has the same name as a file in the
current directory, programs open the file in the current directory.
 
Using APPEND with programs that create new files
 
When a program opens a file in an appended directory, the file can be found
as if it were in the current directory. If the program then saves the file
by creating a new file with the same name, the new file is created in the
current directory (not the appended directory). APPEND is appropriately used
for data files that are not to be modified or that are to be modified
without creating new copies of the files. Database programs often modify
data files without making new copies. Text editors and word processors,
however, usually save modified data files by making new copies. To avoid
confusion, do not use APPEND with these programs.
 
Using the /X:ON switch and the path command
 
When /X:ON is specified, you can run a program located in an appended
directory by typing the program name at the command prompt. Usually, you use
the PATH command to specify directories that contain programs. However, when
your program is in an appended directory, you do not need to use the PATH
command to specify that directory. MS-DOS finds a program in an appended
directory by following the usual order in which MS-DOS searches for a
program; that is, first in the current directory, then in the appended
directories, and then in the search path.
 
MS-DOS functions that always use appended directories
 
Even when the /X:ON switch is not specified, appended directories are used
when programs call the following MS-DOS Interrupt 21h functions:
 
  Open File (0Fh)
 
  Open File Handle (3Dh)
 
  Get File Size (23h)
 
When /X:ON is specified, appended directories are used when programs call
any of the Interrupt 21h functions in the preceding list or any of the
Interrupt 21h functions in the following list:
 
  Find First Entry (11h)
 
  Find First File (4Eh)
 
  Execute Program (EXEC) (4Bh)
 
Using APPEND with network drives
 
You can use the APPEND command to append directories that are located on
network drives.
 

 
                              APPENDExamples
 
To allow programs to open data files in a directory named LETTERS on the
disk in drive B and in a directory named REPORTS on the disk in drive A as
if the files were in the current directory, type the following command:
 
    append b:\letters;a:\reports
 
To append the same directories and keep a copy of the list of appended
directories in the MS-DOS environment, type the following commands:
 
    append /e
 
    append b:\letters;a:\reports
 
These must be the first APPEND commands you use after starting your system.
 

 
                                   ATTRIB
 
Displays or changes file attributes.
 
This command displays, sets, or removes the Read-Only, Archive, System, and
Hidden attributes assigned to files or directories.
 
Syntax
 
    ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H][[drive:][path]filename] [/S]
 
To display all attributes of all files in the current directory, use the
following syntax:
 
    ATTRIB
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file(s) you want to process.
 
Switches
 
+R
    Sets the Read-Only file attribute.
 
-R
    Clears the Read-Only file attribute.
 
+A
    Sets the Archive file attribute.
 
-A
    Clears the Archive file attribute.
 
+S
    Sets the file as a System file.
 
-S
    Clears the System file attribute.
 
+H
    Sets the file as a Hidden file.
 
-H
    Clears the Hidden file attribute.
 
/S
    Processes files in the current directory and all of its subdirectories.
 
Related Command
 
For more information about copying files and directories with different
attributes, see the <XCOPY> command.
 

 
                               ATTRIBNotes
 
Combining the Hidden and System attributes
 
If a file has both the Hidden and System attributes set, you can clear both
attributes only with a single ATTRIB command. For example, to clear the
Hidden and System attributes for the RECORD.TXT file, you would type:
 
    ATTRIB -S -H RECORD.TXT
 
Using ATTRIB with groups of files
 
You can use wildcards (? and *) with the filename parameter to display or
change the attributes for a group of files. If a file has the System or
Hidden attribute set, you must clear that attribute before you can change
any other attributes for that file.
 
Changing the attributes for a directory
 
You can display or change the attributes for a directory. To use ATTRIB with
a directory, you must explicitly specify the directory name; you cannot use
wildcards to work with directories. For example, to hide the directory
C:\SECRET, you would type the following:
 
    ATTRIB +H C:\SECRET
 
The following command would affect only files, not directories:
 
    ATTRIB +H C:*.*
 
Viewing archive attributes
 
The Archive attribute (a) is used to mark files that have changed since they
were previously backed up. The MSBACKUP, RESTORE, and XCOPY commands use
these Archive attributes. For information about Archive attributes, see the
<MSBACKUP>, <RESTORE>, and <XCOPY> commands.
 

 
                              ATTRIBExamples
 
To display the attributes of a file named NEWS86 located on the current
drive, type the following command:
 
    attrib news86
 
To assign the Read-Only attribute to the file REPORT.TXT, type the following
command:
 
    attrib +r report.txt
 
To remove the Read-Only attribute from files in the \PUBLIC\JONES directory
on a disk in drive B and from files in any subdirectories of \PUBLIC\JONES,
type the following command:
 
    attrib -r b:\public\jones\*.* /s
 
As a final example, suppose you want to give an associate a disk containing
all files in the default directory on a disk in drive A except files with
the .BAK extension. Because you can use <XCOPY> to copy only those files
marked with the Archive attribute, you need to set the Archive attribute for
those files you want to copy. To do this, you would use the following two
commands to set the Archive attribute for all files on drive A and then to
clear the attribute for those files with the .BAK extension:
 
    attrib +a a:*.*
 
    attrib -a a:*.bak
 
Next, use the XCOPY command to copy the files from the disk in drive A to
the disk in drive B. The /A switch in the following command causes XCOPY to
copy only those files marked with the Archive attribute:
 
    xcopy a: b: /a
 
If you want XCOPY to clear each file's Archive attribute after it copies the
file, use the /M switch instead of /A, as in the following example:
 
    xcopy a: b: /m
 

 
                                   BREAK
 
Sets or clears extended CTRL+C checking. You can use this command at the
command prompt or in your CONFIG.SYS file.
 
You can press CTRL+C to stop a program or an activity (file sorting, for
example). Typically, MS-DOS checks for CTRL+C only while it reads from the
keyboard or writes to the screen or a printer. If you set BREAK to ON, you
extend CTRL+C checking to other functions, such as disk read and write
operations.
 
Syntax
 
    BREAK [ON|OFF]
 
To display the current BREAK setting, use the following syntax:
 
    BREAK
 
In your CONFIG.SYS file, use the following syntax:
 
    BREAK=ON|OFF
 
Parameter
 
ON|OFF
    Turns extended CTRL+C checking on or off.
 

 
                                BREAKNote
 
Including BREAK in CONFIG.SYS
 
The default setting for BREAK is OFF. You can include the BREAK command in
your CONFIG.SYS file to enable extended CTRL+C checking every time you start
your system.
 

 
                              BREAKExamples
 
To specify that MS-DOS is to check for CTRL+C only while it is reading from
the keyboard or writing to the screen or printer, type the following
command:
 
    break off
 
To specify that MS-DOS is to check for CTRL+C while it is reading from a
disk or the keyboard or writing to a disk or the screen, type the following
command:
 
    break on
 
To turn on this extended CTRL+C checking every time you start your system,
include the following command in your CONFIG.SYS file:
 
    break=on
 

 
                                  BUFFERS
 
Allocates memory for a specified number of disk buffers when your system
starts. You can use this command only in your CONFIG.SYS file.
 
Syntax
 
    BUFFERS=n[,m]
 
Parameters
 
n
    Specifies the number of disk buffers. The value of n must be in the
    range 1 through 99.
 
m
    Specifies the number of buffers in the secondary buffer cache. The value
    of m must be in the range 0 through 8.
 
Default settings
 
The default setting for the number of disk buffers depends on the
configuration of your system, as shown in the following table:
 
Configuration              Buffers      Bytes
                           (n)

 
<128K of RAM, 360K disk    2            
 
<128K of RAM, > 360K       3            
disk
 
128K to 255K of RAM        5            2672
 
256K to 511K of RAM        10           5328
 
512K to 640K of RAM        15           7984
 
The default setting for the number of buffers in the secondary cache (m) is
0 (no secondary cache buffers).
 
If you specify an invalid value for n or m, BUFFERS uses the default setting
of no secondary cache buffers.
 

 
                               BUFFERSNotes
 
Using BUFFERS with DoubleSpace
 
If you are using DoubleSpace and SMARTDrive, and MS-DOS is loaded into the
HMA, set BUFFERS=10. This ensures that there will be enough room in the HMA
for MS-DOS, DoubleSpace, and all your buffers. (If BUFFERS is set to a value
higher than 10, there might not be enough room in the HMA for all your
buffers, and MS-DOS will place all the buffers into conventional memory.) If
you're using SMARTDrive, specifying more than 10 buffers will not speed up
your system much, but will use additional memory.
 
Using BUFFERS with SMARTDRV.EXE
 
If you are using SMARTDRV.EXE, either use a smaller value for BUFFERS, or do
not specify a BUFFERS command at all.
 
How MS-DOS uses buffers
 
MS-DOS uses the memory reserved for each disk buffer to hold data during
read and write operations. To achieve the best performance with programs
such as word processors, specify a value between 10 and 20 for n. If you
plan to create many subdirectories, you might want to increase the number of
buffers to 20 or 30. Each buffer requires approximately 532 bytes of memory.
Therefore, the more buffers you have, the less memory you have available for
programs. (To find out how much memory MS-DOS is using for disk buffers, use
the MEM /D /P command.)
 
If MS-DOS is loaded in the high memory area (HMA) and there is enough room
in the HMA to contain all the buffers, MS-DOS also places the buffers in the
HMA. If you specify more than 48 buffers, or if you are running DoubleSpace
and specify more than 10 buffers, there might not be enough room in the HMA
for all the buffers. In that case, MS-DOS places all of the buffers into
conventional memory.
 
Using the secondary buffer cache
 
Using the cache can speed up certain disk operations if you are using a
computer with an 8086 processor. If you are using a computer with a faster
processor, it is better to use <SMARTDRV.EXE> for a cache.
 

 
                              BUFFERSExample
 
To create 20 disk buffers, include the following command in your CONFIG.SYS
file:
 
    buffers=20
 

 
                                    CALL
 
Calls one batch program from another without causing the first batch program
to stop.
 
Syntax
 
    CALL [drive:][path]filename [batch-parameters]
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the batch program you want to call.
    Filename must have a .BAT extension.
 
batch-parameters
    Specifies any command-line information required by the batch program.
 

 
                                CALLNotes
 
Using batch-parameters
 
Batch-parameters can contain any information that you can pass to a batch
program, including switches, filenames, the replaceable parameters %1
through %9, and environment variables such as %baud%.
 
Using pipes and redirection symbols
 
Do not use pipes ("|") and redirection symbols ("<<","<",">", and ">>") with
the CALL command.
 
Making a recursive call
 
You can create a batch program that calls itself; however, you must provide
an exit command. Otherwise, the parent and child batch programs can loop
endlessly.


 
                               CALLExamples
 
To run the CHECKNEW.BAT program from another batch program, include the
following command in the parent batch program:
 
    call checknew
 
Suppose the parent batch program accepts two replaceable parameters and you
want it to pass those parameters to CHECKNEW.BAT. You can use the following
command in the parent batch program:
 
    call checknew %1 %2
 

 
                                    CHCP
 
Displays the number of the active character set (code page). You can also
use the CHCP command to change the active character set for all devices that
support character set switching.
 
You must install the <NLSFUNC> program before you can use the CHCP command.
 
For an introduction to using character sets and the CHCP command, see the
chapter "Customizing For International Use" in the MS-DOS 6 User's Guide.
 
Tables of the character sets included with MS-DOS are shown in the appendix
"Keyboard Layouts and Character Sets" in the MS-DOS 6 User's Guide.
 
Syntax
 
    CHCP [nnn]
 
To display the number of the active character set, use the following
syntax:
 
    CHCP
 
Parameter
 
nnn
    Specifies the prepared system character set defined by the COUNTRY
    command in the CONFIG.SYS file. MS-DOS provides character sets for the
    following countries and languages:
 
    437    United States
 
    850    Multilingual (Latin I)
 
    852    Slavic (Latin II)
 
    860    Portuguese
 
    863    Canadian-French
 
    865    Nordic
 
    Additional countries and languages are supported by the EGA2.CPI file.
    For more information, see the README.TXT file.
 
Related Commands
 
For more information about character sets, see the <COUNTRY>, <NLSFUNC>, and
<MODE (set device code pages)> commands.
 

 
                                CHCPNotes
 
Requirements for using the CHCP command
 
Before you can use the CHCP command, you must specify the location of the
COUNTRY.SYS file by using the <COUNTRY> command and load the <NLSFUNC>
program into memory.
 
Assigning a new character set
 
After you assign a new character set, any program you start uses that new
character set. However, any program (not including COMMAND.COM) that you
started before assigning the new character set will probably attempt to use
the original character set.
 

 
                               CHCPExamples
 
To view the active character set setting, type the following command:
 
    chcp
 
MS-DOS responds with a message similar to the following:
 
    Active code page: 437
 
To change the active character set to 850 (Multilingual), type the following
command:
 
    chcp 850
 
MS-DOS alerts you if the specified character set has not been prepared for
your system. The following error message appears:
 
    Invalid code page
 
If a device (monitor, keyboard, printer) is not prepared for a character
set, MS-DOS displays an error message in the following format:
 
    Code page 850 not prepared for device nnn
 

 
                                 CHDIR (CD)
 
Displays the name of the current directory or changes the current
directory.
 
Syntax
 
    CHDIR [drive:][path]
 
    CHDIR[..]
 
    CD [drive:][path]
 
    CD[..]
 
To display the current drive letter and directory name, use either of the
following syntax lines:
 
    CHDIR
 
    CD
 
Parameters
 
[drive:][path]
    Specifies the drive (if other than the current drive) and directory to
    which you want to change.
 
 ..
    Specifies that you want to change to the parent directory.
 

 
                                CHDIRNotes
 
Changing to the root directory
 
The root directory is the top of the directory hierarchy for a drive. To
return to the root directory, type the following command:
 
    cd \
 
Using the current directory from a different drive
 
If you are working in the \PUBLIC\JONES directory on drive C and you change
to drive D, you can copy files to and from the \PUBLIC\JONES directory by
specifying only the drive letter C.
 
Changing the directory on another drive
 
You can change the current directory on another drive by specifying the
drive letter on the command line when you use CHDIR or CD.



 
                              CHDIRExamples
 
Either of the following commands changes your current directory to the
directory named PRIMETIM:
 
    chdir \primetim
 
    cd \primetim
 
Suppose you have a directory named SPECIALS with a subdirectory named
SPONSORS. To change your current directory to \SPECIALS\SPONSORS, type the
following command:
 
    cd \specials\sponsors
 
Or, if your current directory is \SPECIALS, you can use the following
command to change to the \SPECIALS\SPONSORS directory:
 
    cd sponsors
 
To change from a subdirectory back to the parent directory, type the
following command:
 
    cd..
 
To display the name of the current directory, you can use CHDIR or CD
without a parameter. For example, if your current directory is \PUBLIC\JONES
on the disk in drive B, type CHDIR to see the following response:
 
    B:\PUBLIC\JONES
 
If you are working on drive D and you want to copy all files in the
\PUBLIC\JONES and \PUBLIC\LEWIS directories on drive C to the root directory
on drive D, type the following commands:
 
    chdir c:\public\jones
    copy c:*.* d:\
    chdir c:\public\lewis
    copy c:*.* d:\
 
If, instead, you want to copy all files in the \PUBLIC\JONES and
\PUBLIC\LEWIS directories to your current location on drive D, type the
following commands:
 
    chdir c:\public\jones
    copy c:*.* d:
    chdir c:\public\lewis
    copy c:*.* d:
 
For more information on copying files, see the <COPY> command.
 
 

 
                                CHKSTATE.SYS
 
Used by the MemMaker memory-optimization program to track the optimization
process.
 
During optimization, MemMaker adds the CHKSTATE.SYS command line to the
beginning of your CONFIG.SYS file. When the optimization process is
complete, MemMaker removes the CHKSTATE.SYS command line.
 
CHKSTATE.SYS is used exclusively by MemMaker.
 

 
                                   CHKDSK
 
Checks the status of a disk and displays a status report. Can also fix disk
errors.
 
The status report shows errors found in the MS-DOS filing system, which
consists of the file allocation table and directories. CHKDSK also displays
a summary of disk usage. (CHKDSK does not verify that the information in
your files can be accurately read.) If errors exist on the disk, CHKDSK
alerts you with a message.
 
Note:  The ScanDisk program is the preferred method of fixing drive
       problems, and should be used instead of the CHKDSK /F command. For
       more information, see the <SCANDISK> command.
 
Syntax
 
    CHKDSK [drive:][[path]filename] [/F] [/V]
 
To display the status of the disk in the current drive, use the following
syntax:
 
    CHKDSK
 
Parameters
 
drive:
    Specifies the drive that contains the disk that you want CHKDSK to
    check.
 
[path]filename
    Specifies the location and name of a file or set of files that you want
    CHKDSK to check for fragmentation. You can use wildcards (* and ?) to
    specify multiple files.
 
Switches
 
/F
    Fixes errors on the disk. Do not use this option when running CHKDSK
    from other programs; for more information, see "Using CHKDSK With Open
    Files" in <CHKDSKNotes>. In general, when fixing disk errors, use
    <ScanDisk> instead of CHKDSK.
 
/V
    Displays the name of each file in every directory as the disk is
    checked.
 

 
                               CHKDSKNotes
 
Format of status reports
 
MS-DOS displays CHKDSK status reports similar to the following example:
 
    Volume Serial Number is B1AF-AFBF
 
      72,214,528 bytes total disk space
         73,728 bytes in 3 hidden files
         30,720 bytes in 12 directories
      11,493,376 bytes in 386 user files
         61,440 bytes in bad sectors
      6,055,264 bytes available on disk
 
          2,048 bytes in each allocation unit
         35,261 total allocation units on disk
         29,568 available allocation units on disk
 
        655,360 total bytes memory
        493,456 bytes free
 
Fixing disk errors
 
The ScanDisk program is the preferred method of fixing disk errors. For more
information, see the <SCANDISK> command.
 
If you want to use CHKDSK to fix disk errors, use the /F switch. (CHKDSK
corrects disk errors only if you specify the /F switch.) CHKDSK /F displays
a prompt similar to the following:
 
    10 lost allocation units found in 3 chains.
    Convert lost chains to files?
 
If you press Y, MS-DOS saves each lost chain in the root directory as a file
with a name in the format FILEnnnn.CHK. When CHKDSK finishes, you can
examine these files to see if they contain any data you need. If you press
N, MS-DOS fixes the disk but does not save the contents of the lost
allocation units.
 
If you do not use the /F switch, CHKDSK alerts you with a message if a file
needs to be fixed but does not fix the error(s).
 
Using CHKDSK with open files
 
Never use CHKDSK when files are currently open. CHKDSK is designed for use
when the files on the disk are in an unchanging state  that is, when they
are not open. When a file is open, it is probably changing, and MS-DOS will
update the file allocation table and the directory structure to reflect
changes. Such updates are not always made immediately, and updates to the
file allocation table and the directories occur at different times. If you
run CHKDSK when files are open on the disk, it interprets differences
between the directory structure and the file allocation tables as errors.
Running CHKDSK /F when files are open can result in corruption or loss of
data. Therefore, never run CHKDSK /F from another program, or when Microsoft
Windows or the MS-DOS Task Swapper is running.
 
Using CHKDSK with assigned drives and networks
 
The CHKDSK command does not work on drives formed by the SUBST command. You
cannot use CHKDSK to check a disk on a network drive.
 
Physical disk errors
 
The CHKDSK command finds only logical errors in the file system, not
physical disk errors. To identify and repair physical disk errors, use the
ScanDisk program. For more information, see the <SCANDISK> command.
 
Bad disk sectors
 
Bad sectors reported by CHKDSK were marked as "bad" when your disk was first
prepared for operation. ScanDisk and other physical disk-error correction
utilities can also mark sectors as "bad." Bad sectors pose no danger.
 
Cross-Linked Files
 
CHKDSK reports a cross-linked file if two files or directories are recorded
as using the same disk space. If CHKDSK finds a cross-linked file, it
displays a message similar to the following:
 
    <File> is cross linked on allocation unit <number>
 
CHKDSK will not fix a cross-linked file, even if you specify the /F switch.
To correct a cross-linked file, run ScanDisk. Some of the information in
these files may be lost.
 
ERRORLEVEL parameters
 
If CHKDSK does not find any errors, it returns an ERRORLEVEL value of 0. If
CHKDSK found one or more errors, it returns an ERRORLEVEL value of 255.
 
Saving a CHKDSK status report to a file
 
You can save a CHKDSK status report by redirecting the output to a file. Do
not use the /F switch when you redirect CHKDSK output to a file.
 

 
                              CHKDSKExamples
 
To find out how much data is stored on drive C and how much space is still
free, and to check the disk for errors, type the following command:
 
    chkdsk c:
 
CHKDSK pauses and displays messages if it encounters errors.
 
To redirect the output of CHKDSK to a file named STATUS, type the following
command:
 
    chkdsk a: > status
 
Because the output is redirected, MS-DOS does not repair errors it
encounters during the check; but it records all the errors in a report file.
Afterward, you can use CHKDSK with the /F switch without redirection to
correct any errors noted in the status report.
 

 
                                   CHOICE
 
Prompts the user to make a choice in a batch program. Displays a specified
prompt and pauses for the user to choose from among a specified set of keys.
You can use this command only in batch programs.
 
For more information on the ERRORLEVEL parameter, see <CHOICENote> and the
<IF> command.
 
Syntax
 
    CHOICE [/C[:]keys] [/N] [/S] [/T[:]c,nn] [text]
 
Parameters
 
text
    Specifies text you want to be displayed before the prompt. Quotation
    marks are necessary only if you include a switch character (/) as part
    of the text before the prompt. If you don't specify text, CHOICE
    displays only a prompt.
 
Switches
 
/C[:]keys
    Specifies allowable keys in the prompt. When displayed, the keys will be
    separated by commas, will appear in brackets ([]), and will be followed
    by a question mark. If you don't specify the /C switch, CHOICE uses YN
    as the default. The colon (:) is optional.
 
/N
    Causes CHOICE not to display the prompt. The text before the prompt is
    still displayed, however. If you specify the /N switch, the specified
    keys are still valid.
 
/S
    Causes CHOICE to be case sensitive. If the /S switch is not specified,
    CHOICE will accept either upper or lower case for any of the keys that
    the user specifies.
 
/T[:]c,nn
    Causes CHOICE to pause for a specified number of seconds before
    defaulting to a specified key. The values for the /T switch are as
    follows:
 
    c
        Specifies the character to default to after nn seconds. The
        character must be in the set of choices specified in the /C switch.
 
    nn
        Specifies the number of seconds to pause. Acceptable values are from
        0 to 99. If 0 is specified, there will be no pause before
        defaulting.
 

 
                                CHOICENote
 
ERRORLEVEL parameters
 
The first key you assign returns a value of 1, the second a value of 2, the
third a value of 3, and so on. If the user presses a key that is not among
the keys you assigned, CHOICE sounds a warning beep (that is, it sends a
BEL, or 07h, character to the console).
 
If CHOICE detects an error condition, it returns an ERRORLEVEL value of 255.
If the user presses CTRL+BREAK or CTRL+C, CHOICE returns an ERRORLEVEL value
of 0.
 
When you use ERRORLEVEL parameters in a batch program, list them in
decreasing order.
 

 
                              CHOICEExamples
 
What the user sees when you use CHOICE in a batch file
 
If you use the following syntax in a batch file,
 
    choice /c:ync
 
the user sees the following when CHOICE is started:
 
    [Y,N,C]?
 
If you add text to the syntax,
 
    choice /c:ync Yes, No, or Continue
 
the user sees the following when CHOICE is started:
 
    Yes, No, or Continue [Y,N,C]?
 
What the user sees if you leave out a prompt
 
If, as in the following example, you use the /N switch to leave out the
prompt in a batch program,
 
    choice /n Yes, No, or Continue?
 
the user sees only the text you specified when CHOICE is started:
 
    Yes, No, or Continue?
 
What the user sees if you use the T switch
 
If you use the following syntax in a batch program,
 
    choice /c:ync /t:n,5
 
the user sees the following when CHOICE is started:
 
    [Y,N,C]?
 
If, after 5 seconds, the user hasn't pressed a key, CHOICE chooses N and
returns an ERRORLEVEL value of 2. If the user presses a key before 5
seconds, CHOICE returns the value corresponding to the user's choice.
 
To have the option of defragmenting drive C when you start your computer,
you could add the following lines to your AUTOEXEC.BAT file:
 
    choice Defrag drive /ty,5
    if errorlevel 2 goto SkipDefrag
    defrag c:
    :SkipDefrag
 
If you press N within 5 seconds, DEFRAG will not run and CHOICE returns an
ERRORLEVEL value of 2. If you do not press N within 5 seconds, or if you
choose Y, DEFRAG is run on drive C.
 
Using CHOICE in a batch program
 
The following batch program demonstrates using the CHOICE option to select
one of three programs: MS-DOS Editor, Microsoft Anti-Virus, or Microsoft
Backup.
 
Notice that the IF ERRORLEVEL statements are listed in decreasing order.
MS-DOS will consider the IF statement true if the ERRORLEVEL parameter
returned by CHOICE is greater than or equal to the parameter specified in
the IF command.
 
    @echo off
    cls
    echo.
    echo A   Microsoft Editor
    echo B   Microsoft Anti-Virus
    echo C   Microsoft Backup
    echo.
    choice /c:abc Choose an option
    if errorlevel 3 goto MSBackup
    if errorlevel 2 goto Msav
    if errorlevel 1 goto Edit
 
    :Edit
    edit
    goto End
 
    :Msav
    msav
    goto End
 
    :Msbackup
    msbackup
    goto End
 
    :End
 
 

 
                                    CLS
 
Clears the screen.
 
The cleared screen shows only the command prompt and cursor.
 
Syntax
 
    CLS
 

 
                                  COMMAND
 
Starts a new instance of the MS-DOS command interpreter.
 
A command interpreter is a program that lets you type commands. Use the EXIT
command to stop the new command interpreter and return control to the old
one.
 
Syntax
    COMMAND [[drive:]path] [device] [/E:nnnnn] [/Y [/C command|/K command]]
 
In your CONFIG.SYS file, use the following syntax:
 
    SHELL=[[dos-drive:]dos-path]COMMAND.COM [[drive:]path][device]
    [/E:nnnn] [/P [/MSG]]
 
Parameters
 
[drive:]path
    Specifies the directory in which the command interpreter is to look for
    the COMMAND.COM file when the transient part of the program needs to be
    reloaded. This parameter must be included when loading COMMAND.COM for
    the first time if the COMMAND.COM file is not located in the root
    directory. This parameter is used to set the COMSPEC environment
    variable. For more information, see Transient and Resident Memory in
    <COMMANDNotes>.
 
device
    Specifies a different device for command input and output. For more
    information about this parameter, see the <CTTY> command.
 
[dos-drive:]dos-path
    Specifies the location of the COMMAND.COM file.
 
Switches
 
/C command
    Specifies that the command interpreter is to perform the specified
    command and then exit. This switch must be the last switch on the
    command line.
 
/E:nnnnn
    Specifies the environment size, where nnnnn is the size in bytes. The
    value of nnnnn must be in the range 160 through 32768. MS-DOS rounds
    this number up to a multiple of 16 bytes. The default value is 256.
 
/K command
    Runs the specified command, program, or batch program and then displays
    the MS-DOS command prompt. This switch must be the last switch on the
    COMMAND command line.
 
    This switch is particularly useful for specifying a startup batch file
    for the MS-DOS Prompt in Windows (much like AUTOEXEC.BAT for MS-DOS). To
    do this, open the DOSPRMPT.PIF file using the PIF Editor, and type the
    /K switch in the Optional Parameters box. It is not recommended to use
    the /K switch on the SHELL command line in your CONFIG.SYS file; doing
    so can cause problems with applications and installation programs that
    make changes to your AUTOEXEC.BAT file.
 
/P
    Should be used only when COMMAND is used with the SHELL command in the
    CONFIG.SYS file. The /P switch makes the new copy of the command
    interpreter permanent. In this case, the EXIT command cannot be used to
    stop the command interpreter. If you specify /P, MS-DOS runs your
    AUTOEXEC.BAT file before displaying the command prompt. If there is no
    AUTOEXEC.BAT file in the root directory of the startup drive, MS-DOS
    carries out the DATE and TIME commands instead. If you do not have a
    SHELL command in your CONFIG.SYS file, COMMAND.COM is automatically
    loaded from the root directory with the /P switch.
 
/MSG
    Specifies that all error messages should be stored in memory. Usually,
    some messages are stored only on disk. This switch is useful only if you
    are running MS-DOS from floppy disks. You must specify the /P switch
    when you use the /MSG switch. For more information about using the /MSG
    switch, see <COMMANDNotes>.
/Y
    Directs COMMAND.COM to step through the batch file specified by the /C
    or /K switches. This switch is useful for debugging batch files. For
    example, to step through the TEST.BAT batch file line by line, you would
    type COMMAND /Y /C TEST. The /Y switch requires either the /C or the /K
    switch.
 
Related Command
 
The <SHELL> command is the preferred method of using COMMAND to permanently
increase space for the environment table.
 

 
                               COMMANDNotes
 
Limits on environment size
 
If nnnnn is less than 160 or greater than 32768, MS-DOS uses the default
value of 256 bytes and displays the following message:
 
    Parameter value not in allowed range.
 
Changing your terminal device
 
You can specify a different device (such as AUX) for input and output by
using the device parameter. For more information about device, see the
<CTTY> command.
 
Running multiple command interpreters
 
When you start a new command interpreter, MS-DOS creates a new command
environment. This new environment is a copy of the parent environment. You
can change the new environment without affecting the old one. The default
size of the new environment is 256 bytes or the size of the current
environment rounded up to the next 16 bytes, whichever is larger. Use the /E
switch to override the default size. (Note that the current environment
refers to the memory actually being used, not to the environment size
specified with the previous /E switch.)
 
Transient and resident memory
 
MS-DOS loads the command interpreter in two parts: the resident part (which
is always in memory) and the transient part (at the top of conventional
memory). Some programs write over the transient part of COMMAND.COM when
they run. When this happens, the resident part must locate the COMMAND.COM
file on disk to reload the transient part. The COMSPEC environment variable
identifies where COMMAND.COM is located on the disk. If COMSPEC is set to a
floppy disk drive, MS-DOS might prompt you to insert a disk that contains
COMMAND.COM.
 
If MS-DOS is loaded in the HMA, a portion of resident COMMAND.COM is also
loaded into the HMA, making more conventional memory available for
programs.
 
Using the /MSG switch
 
Usually, MS-DOS leaves many error messages in the COMMAND.COM file on the
disk instead of using memory to store them. When MS-DOS needs to display one
of these messages, MS-DOS retrieves the message from the disk containing
COMMAND.COM.
 
If you are running MS-DOS from floppy disks instead of from a hard disk,
MS-DOS cannot retrieve such error messages unless you have the disk
containing COMMAND.COM in drive A. If this disk is not present, MS-DOS
displays one of the following short messages instead of the full message:
 
    Parse error
 
    Extended error
 
You can make sure MS-DOS displays complete error messages by using the /MSG
switch with COMMAND. This switch forces MS-DOS to keep these error messages
in memory so that they are always available when needed.
 
Use the /MSG switch with COMMAND if you have a floppy disk system, unless
you cannot afford to lose the memory used to store the error messages.
 
You must also specify the /P switch when you use the /MSG switch.
 
Internal commands
 
COMMAND is called a command processor because it reads any commands that you
type and processes them.
 
Some commands are recognized and carried out by COMMAND itself. These
commands are considered internal to COMMAND. Other MS-DOS commands are
separate programs located on your hard disk, which MS-DOS loads just like
your other programs.
 
The following MS-DOS commands are implemented by COMMAND:
 
<BREAK>            <ECHO>              <REM>
<CALL>             <EXIT>              <RENAME (REN)>
<CHCP>             <FOR>               <RMDIR (RD)>
<CHDIR (CD)>       <GOTO>              <SET>
<CLS>              <IF>                <SHIFT>
<COPY>             <LOADHIGH (LH)>     <TIME>
<CTTY>             <MKDIR (MD)>        <TYPE>
<DATE>             <PATH>              <VER>
<DEL (ERASE)>      <PAUSE>             <VERIFY>
<DIR>              <PROMPT>            <VOL>
 

 
                             COMMANDExamples
 
The following command specifies that the MS-DOS command interpreter is to
start a new command interpreter from the current program, run a batch
program named MYBAT.BAT, and then return to the first command interpreter:
 
    command /c mybat.bat
 
The following CONFIG.SYS command specifies that COMMAND.COM is located in
the DOS directory on drive C:
 
    shell=c:\dos\command.com c:\dos\ /e:1024
 
This command directs MS-DOS to set the COMSPEC environment variable to
C:\DOS\COMMAND.COM. This command also creates an environment of 1024 bytes
for this command interpreter.
 
The following command starts an instance of COMMAND.COM and runs the
MYBATCH.BAT file, stepping through the file command by command:
 
    command /y /c mybatch.bat
 

 
                                    COPY
 
Copies one or more files to the location you specify.
 
This command can also be used to combine files. When more than one file is
copied, MS-DOS displays each filename as the file is copied.
 
Syntax
 
    COPY [/Y|/-Y] [/A|/B] source [/A|/B] [+ source [/A|/B] [+
    ...]][destination [/A|/B]] [/V]
 
Parameters
 
source
    Specifies the location and name of a file or set of files from which you
    want to copy. Source can consist of a drive letter and colon, a
    directory name, a filename, or a combination.
 
destination
    Specifies the location and name of a file or set of files to which you
    want to copy. Destination can consist of a drive letter and colon, a
    directory name, a filename, or a combination.
 
Switches
 
/Y
    Indicates that you want COPY to replace existing file(s) without
    prompting you for confirmation. By default, if you specify an existing
    file as the destination file, COPY will ask you if you want to overwrite
    the existing file. (Previous versions of MS-DOS would simply replace the
    existing file.) If the COPY command is part of a batch file, COPY will
    behave as in previous versions. Specifying this switch overrides all
    defaults and the current setting of the COPYCMD environment variable.
 
/-Y
    Indicates that you want COPY to prompt you for confirmation when
    replacing an existing file. Specifying this switch overrides all
    defaults and the current setting of the COPYCMD environment variable.
 
/A
    Indicates an ASCII text file. When the /A switch precedes the list of
    filenames on the command line, it applies to all files whose names
    follow the /A switch, until COPY encounters a /B switch, in which case
    the /B switch applies to the file whose name precedes the /B switch.
 
    When the /A switch follows a filename, it applies to the file whose name
    precedes the /A switch and to all files whose names follow the /A
    switch, until COPY encounters a /B switch, in which case the /B switch
    applies to the file whose name precedes the /B switch.
 
    An ASCII text file can use an end-of-file character (CTRL+Z) to indicate
    the end of the file. When combining files, COPY treats files as ASCII
    text files by default.
 
/B
    Indicates a binary file. When the /B switch precedes the list of
    filenames on the command line, it applies to all files whose names
    follow the /B switch, until COPY encounters an /A switch, in which case
    the /A switch applies to the file whose name precedes the /A switch.
 
    When the /B switch follows a filename, it applies to the file whose name
    precedes the /B switch and to all files whose names follow the /B
    switch, until COPY encounters an /A switch, in which case the /A switch
    applies to the file whose name precedes the /A switch.
 
    The /B switch specifies that the command interpreter is to read the
    number of bytes specified by the file size in the directory. The /B
    switch is the default value for COPY unless COPY is combining files.
 
/V
    Verifies that new files are written correctly.
 
Related Command
 
For information about copying directories and subdirectories, see the
<XCOPY> command.
 

 
                                COPYNotes
 
Setting the COPYCMD environment variable
 
You can set the COPYCMD environment variable to specify whether you want the
COPY, MOVE, and XCOPY commands to prompt you for confirmation before
overwriting a file, whether issued from the command prompt or a batch file.
 
To force the COPY, MOVE, and XCOPY commands to prompt you before overwriting
in all cases, set the COPYCMD environment variable /-Y. To force these
commands to overwrite in all cases without prompting you, set the COPYCMD
environment variable to /Y.
 
Typing any of these commands with the /Y or /-Y switch overrides all
defaults and the current setting of the COPYCMD environment variable.
 
Copying to and from devices
 
You can substitute a device name for one or more occurrences of source or
for destination.
 
Using or omitting the /B switch when copying to a device
 
When destination is a device (for example, COM1 or LPT1), the /B switch
causes MS-DOS to copy data to the device in binary mode. In binary mode, all
characters (including such special characters as CTRL+C, CTRL+S, CTRL+Z, and
carriage return) are copied to the device as data. Whereas, omission of the
/B switch causes MS-DOS to copy data to the device in ASCII mode. In ASCII
mode, such special characters as those previously listed may cause MS-DOS to
take special action during the copying process.
 
Using the default destination file
 
If you do not specify a destination file, MS-DOS creates a copy with the
same name, creation date, and creation time as the original file, placing
the new copy in the current directory on the current drive. If the source
file is on the current drive and in the current directory and you do not
specify a different drive or directory for the destination file, the COPY
command stops and MS-DOS displays the following error message:
 
    File cannot be copied onto itself
    0 File(s) copied
 
Using the /V switch
 
If MS-DOS cannot verify a write operation, it displays an error message.
Although recording errors rarely occur with the COPY command, the /V switch
lets you verify that critical data has been correctly recorded. The /V
switch also slows down the COPY command, because MS-DOS must check each
sector recorded on the disk.
 
Using the /A and /B switches
 
The effect of an /A or /B switch depends upon its position on the command
line. When the /A or /B switch follows the source filename, COPY performs as
shown in the following list:
 
/A
    Treats the file as an ASCII (text) file and copies data that precedes
    the first end-of-file character. COPY does not copy the first
    end-of-file character or the remainder of the file.
 
/B
    Copies the entire file, including any end-of-file character.
 
When the /A or /B switch follows the destination filename, COPY performs as
shown in the following list:
 
/A
    Adds an end-of-file character as the last character of the file.
 
/B
    Does not add an end-of-file character.
 
Combining files with the COPY command
 
If you specify more than one source, separating entries with a plus sign
(+), COPY combines the files, creating a single file. If you use wildcards
in source but specify a single filename in destination, COPY combines all
files matching the filename in source and creates a single file with the
filename specified in destination.
 
In either case, COPY assumes the combined files are ASCII files unless you
specify the /B switch. (Do not combine non-ASCII files without specifying
the /B switch; doing so can result in truncated files, since most binary
files contain CTRL+Z characters which cause COPY to behave as if it has
reached the end of the file.)
 
If the name of the destination file is the same as the name of one of the
files being copied (except the first file), the original contents of the
destination file are lost. When this happens, COPY displays the following
message:
 
    Content of destination lost before copy
 
Copying files in subdirectories
 
To copy all of a directory's files and subdirectories, you should use the
XCOPY command.
 
Copying zero-length files
 
COPY does not copy files that are 0 bytes long; instead, it deletes such
files. Use XCOPY to copy these files.
 
Changing the time and date of a file
 
If you want to assign the current time and date to a file without modifying
the file, use a command in the following format. The commas indicate the
omission of the destination parameter.
 
    copy /b source+,,



 
                               COPYExamples
 
The following command copies a file and ensures that an end-of-file
character is at the end of the copied file:
 
    copy memo.doc letter.doc /a
 
To copy the NOTE.TXT file from the current drive and directory to the
directory MYNOTES, and to prevent MS-DOS from prompting you before
overwriting the destination file (if it already exists), type the following
command:
 
    copy note.txt mynotes /y
 
To copy a file named ROBIN.TYP from the current drive and directory to an
existing directory named BIRDS that is located on drive C, type the
following command:
 
    copy robin.typ c:\birds
 
If the BIRDS directory doesn't exist, MS-DOS copies the file ROBIN.TYP into
a file named BIRDS that is located in the root directory on the disk in
drive C.
 
To copy several files into one file, list any number of files as source
parameters on the COPY command line. Separate filenames with a plus sign (+)
and specify a filename for the resulting combined file, as the following
example shows:
 
    copy mar89.rpt + apr89.rpt + may89.rpt report
 
This command combines the files named MAR89.RPT, APR89.RPT, and MAY89.RPT
from the current drive and directory and places them in a file named REPORT
in the current directory on the current drive. When files are combined, the
destination file is created with the current date and time. If you omit
destination, MS-DOS combines the files and stores them under the name of the
first specified file. For example, if a file named REPORT already exists,
you can use the following command to combine all four files in REPORT:
 
    copy report + mar89.rpt + apr89.rpt + may89.rpt
 
You can also combine several files into one by using wildcards, as the
following example shows:
 
    copy *.txt combin.doc
 
This command combines all files in the current directory on the current
drive that have the extension .TXT into one file named COMBIN.DOC, also in
the current directory on the current drive.
 
If you want to combine several binary files into one by using wildcards,
include the /B switch, as the following example shows:
 
    copy /b *.exe combin.exe
 
This prevents MS-DOS from treating CTRL+Z as an end-of-file character.
 
CAUTION:  If you combine binary files, the resulting file might not be
          usable due to internal formatting.
 
In the following example, COPY combines each file that has a .TXT extension
with its corresponding .REF file. The result is a file with the same
filename but with a .DOC extension. Thus, COPY combines FILE1.TXT with
FILE1.REF to form FILE1.DOC. Then COPY combines FILE2.TXT with FILE2.REF to
form FILE2.DOC, and so on.
 
    copy *.txt + *.ref *.doc
 
The following COPY command combines first all files with the .TXT extension,
then all files with the .REF extension into one file named COMBIN.DOC:
 
    copy *.txt + *.ref combin.doc
 
Copying information from the keyboard
 
The following COPY command copies what you type at the keyboard to the
OUTPUT.TXT file:
 
    copy con output.txt
 
After you type this command and press ENTER, MS-DOS copies everything you
type to the file OUTPUT.TXT. When you are finished typing, press CTRL+Z to
indicate that you want to end the file. The CTRL+Z character will appear on
the screen as "Z". You can also end a COPY CON command by pressing the F6
key. When you press F6, it generates the CTRL+Z character, which appears on
the screen as Z.
 
The following example copies information from the keyboard to the printer
connected to LPT1:
 
    copy con lpt1
 

 
                                  COUNTRY
 
Enables MS-DOS to use country-specific conventions for displaying times,
dates, and currency; for determining the order by which characters are
sorted; and for determing which characters can be used in filenames. You can
use this command only in your CONFIG.SYS file.
 
The COUNTRY command configures MS-DOS to recognize the character set and
punctuation conventions observed when using one of the supported languages.
 
Syntax
 
    COUNTRY=xxx[,[yyy][,[drive:][path]filename]]
 
Parameters
 
xxx
    Specifies the country code.
 
yyy
    Specifies the character set for the country.
 
[drive:][path]filename
    Specifies the location and name of the file containing country
    information.
 
Related Commands
 
For information about changing characters and their arrangement on your
keyboard, see the <KEYB> command, or see the chapter "Customizing for
International Use" in the MS-DOS 6 User's Guide.
 
For information about preparing and selecting character sets, see the
<MODE (set device code pages)> command.
 
For information about loading country-specific information, see the
<NLSFUNC> command.
 

 
                               COUNTRYNotes
 
Changing default settings
 
MS-DOS uses the United States as the default setting. You can use the
COUNTRY command in your CONFIG.SYS file to change the setting.
 
If you do not specify the location and name of the file containing
country-specific information, MS-DOS tries to find the COUNTRY.SYS file in
the root directory of your startup drive.
 
Specifying supported languages
 
The following table lists each country or language supported by MS-DOS. The
table also lists the character sets you can use with each country code. For
example, if you use country code 003, you can use only character set 437 or
850 for the yyy parameter. The first of the two character sets listed for
each country or language is its default character set.
 
Country or language    Country       Character sets
                       code

 
Belgium                032           850, 437
 
Brazil                 055           850, 437
 
Canadian-French        002           863, 850
 
Croatia                038           852, 850
 
Czech Republic         042           852, 850
 
Denmark                045           850, 865
 
Finland                358           850, 437
 
France                 033           850, 437
 
Germany                049           850, 437
 
Hungary                036           852, 850
 
International          061           437, 850
English
 
Italy                  039           850, 437
 
Latin America          003           850, 437
 
Netherlands            031           850, 437
 
Norway                 047           850, 865
 
Poland                 048           852, 850
 
Portugal               351           850, 860
 
Serbia/Yugoslavia      038           852, 850
 
Slovakia               042           852, 850
 
Slovenia               038           852, 850
 
Spain                  034           850, 437
 
Sweden                 046           437, 850
 
Switzerland            041           850, 437
 
United Kingdom         044           437, 850
 
United States          001           437, 850
 
Character sets for the following countries or languages are also available
with special versions of MS-DOS: Arabic, Israel, Japan, Korea, People's
Republic of China, and Taiwan.
 
Specifying international time and date formats
 
The country code specifies the time and date formats used by the following
MS-DOS commands: BACKUP, DATE, RESTORE, and TIME.
 
The following table lists the date and time formats related to each country
code. For each country code, the "Date format" column shows how MS-DOS
displays January 3, 1993, and the "Time format" column shows how MS-DOS
displays 5:35 P.M. (with 0 seconds and 0 hundredths of a second).
 
Country or language    Country       Date         Time format
                       code          format

 
Belgium                032           23/01/1993   17:35:00
 
Brazil                 055           23/01/1993   17:35:00
 
Canadian-French        002           1993-01-23   17:35:00
 
Czechoslovakia         042           1993-01-23   17:35:00
 
Denmark                045           23-01-1993   17.35.00
 
Finland                358           23.01.1993   17.35.00
 
France                 033           23.01.1993   17:35:00
 
Germany                049           23.01.1993   17:35:00
 
Hungary                036           1993-01-23   17:35:00
 
International          061           23-01-1993   5:35:00.00p
English
 
Italy                  039           23/01/1993   17.35.00
 
Latin America          003           23/01/1993   5:35:00.00p
 
Netherlands            031           23-01-1993   17:35:00
 
Norway                 047           23.01.1993   17:35:00
 
Poland                 048           1993-01-23   17:35:00
 
Portugal               351           23-01-1993   17:35:00
 
Spain                  034           23/01/1993   17:35:00
 
Sweden                 046           1993-01-23   17.35.00
 
Switzerland            041           23.01.1993   17,35,00
 
United Kingdom         044           23/01/1993   17:35:00.00
 
United States          001           01-23-1993   5:35:00.00p
 
Yugoslavia             038           1993-01-23   17:35:00
 
Character sets for the following countries or languages are also available
with special versions of MS-DOS: Arabic, Israel, Japan, Korea, People's
Republic of China, and Taiwan.
 

 
                             COUNTRYExamples
 
To convert international currency, time, date, and case to French
conventions, add the following command to your CONFIG.SYS file:
 
    country=033
 
For this example, assume that the COUNTRY.SYS file is in the root directory
of the startup drive. If COUNTRY.SYS is in a different location, you would
specify the location in [drive:]path on the command line.
 
To specify a character set with the country code for France, type the
following:
 
    country=033,850
 
If you omit the character set but include the [drive:][path] filename
parameter, you must still type the comma that would have preceded the
character set, as the following example shows:
 
    country=033,,c:\dos\country.sys
 

 
                                    CTTY
 
Changes the terminal device used to control your computer.
 
Use the CTTY command if you want to use another device to enter commands.
 
Syntax
 
    CTTY device
 
Parameter
 
device
    Specifies the alternative device you want to use to type MS-DOS
    commands. Valid values for the device parameter are PRN, LPT1, LPT2,
    LPT3, CON, AUX, COM1, COM2, COM3, and COM4.
 
Related Command
 
For more information about changing the input device when specifying a
command interpreter, see the <COMMAND> command.



 
                                CTTYNotes
 
Setting up a serial port for CTTY
 
Use the MODE command to set up your serial port for baud rate, parity, bits,
and stop bit before using the CTTY command.
 
Using CTTY with programs that do not use MS-DOS
 
Many programs do not use MS-DOS for input or output. These programs send
input directly to the hardware on your computer. The CTTY command has no
effect on these programs; it affects only programs that use MS-DOS for
reading keyboard input and displaying output.
 
Setting the terminal device with COMMAND
 
In addition to the CTTY command, you can use the device parameter of the
COMMAND command to specify the input device.


 
                               CTTYExamples
 
To change control of all input and output from the current device (your
computer monitor and keyboard) to the AUX port, type the following at the
command prompt:
 
    ctty aux
 
In this example, a remote terminal device connected to the AUX port controls
input and output for your system.
 
To transfer input and output back to the monitor and keyboard, type the
following command at the remote terminal:
 
    ctty con
 

 
                                    DATE
 
Displays the date and prompts you to change the date if necessary.
 
MS-DOS records the current date for each file you create or change; this
date is listed next to the filename in the directory.
 
Syntax
 
    DATE [mm-dd-yy]
 
Parameter
 
mm-dd-yy
    Sets the date you specify. Values for day, month, and year must be
    separated by periods (.), hyphens (-), or slash marks (/). The date
    format depends on the COUNTRY setting you are using in your CONFIG.SYS
    file. The following list shows the valid values for the month, day, and
    year portions of the mm-dd-yy parameter.
 
    mm    1 through 12
 
    dd    1 through 31
 
    yy    80 through 99    or    1980 through 2099
 
Related Command
 
For information about changing the current time, see the <TIME> command.
 

 
                                DATENotes
 
Adjusting for days in a month
 
MS-DOS is programmed to change months and years correctly, whether the month
has 28, 29, 30, or 31 days.
 
Using the DATE command in your AUTOEXEC.BAT file
 
To prompt users for the date every time the computer is restarted, include
the DATE command in your AUTOEXEC.BAT file.
 
Changing the date format
 
To display the date in other format besides mm-dd-yy, add the COUNTRY
command to your CONFIG.SYS file. You can change the date format to the
European standard format (dd-mm-yy) or to the Scientific International
(Metric) format (yy-mm-dd).
 

 
                                  DBLSPACE
 
Compresses hard disk drives or floppy disks, and configures drives that were
compressed by using DoubleSpace.
 
Syntax
 
When you issue the DBLSPACE command by itself, the DoubleSpace program
starts. This program provides an easy-to-use, menu-oriented user interface
for setting up and working with compressed drives. For more information, see
the chapter "Making More Disk Space Available" in the MS-DOS 6 User's Guide.
For tips on using DoubleSpace, see <DoubleSpace Tips>.
 
If you add switches or parameters to the DBLSPACE command, MS-DOS carries
out the requested task without starting the DoubleSpace program. The command
syntax differs from task to task. You can use the DBLSPACE command to
perform the following tasks:
 
  Compress a hard disk drive or floppy disk. For more information, see
   <DBLSPACE /COMPRESS>.
 
  Create a new compressed drive in the free space on an existing drive. For
   more information, see <DBLSPACE /CREATE>.
 
  Defragment a compressed drive. For more information, see
   <DBLSPACE /DEFRAGMENT>.
 
  Delete a compressed drive. For more information, see <DBLSPACE /DELETE>.
 
  Format a compressed drive. For more information, see <DBLSPACE /FORMAT>.
 
  Display information about a compressed drive. For more information, see
   <DBLSPACE /INFO>.
 
  Display a list of the drives on your computer. The list includes
   compressed and uncompressed hard disk drives, floppy disk drives, and
   other removable-media drives. It does not include network drives. For
   more information, see <DBLSPACE /LIST>.
 
  Mount a compressed volume file (CVF). When DoubleSpace mounts a CVF, it
   assigns it a drive letter; you can then use the files that CVF contains.
   For more information, see <DBLSPACE /MOUNT>.
 
  Change the estimated compression ratio of a compressed drive. For more
   information, see <DBLSPACE /RATIO>.
 
  Change the size of a compressed drive. For more information, see
   <DBLSPACE /SIZE>.
 
  Uncompress a compressed drive. For more information, see
   <DBLSPACE /UNCOMPRESS>.
 
  Unmount a compressed drive. For more information, see
   <DBLSPACE /UNMOUNT>.
 
  Change the settings in your DBLSPACE.INI file. For more information, see
   <DBLSPACE.INI>.
 

 
                              DBLSPACENotes
 
Fixing problems with drives compressed using DoubleSpace
 
Previous versions of DoubleSpace included the DoubleSpace Chkdsk command
(DBLSPACE /CHKDSK) for checking the validity of the specified compressed
drive.
 
DoubleSpace no longer provides a Chkdsk command. Instead, MS-DOS version 6.2
includes the new ScanDisk program, a full-featured disk analysis and repair
utility. ScanDisk can check and repair both uncompressed drives and
DoubleSpace drives. It can even check and repair unmounted DoubleSpace
compressed volume files. For more information, see <ScanDisk>.
 
Running the DBLSPACE command without switches or parameters
 
The first time you run the DBLSPACE command, it starts the DoubleSpace Setup
program. DoubleSpace Setup compresses your hard disk drive and loads
DBLSPACE.BIN into memory. DBLSPACE.BIN is the part of MS-DOS that provides
access to compressed drives.
 
Thereafter, when you run the DBLSPACE command without specifying any
switches or parameters, the DoubleSpace program starts. This program lists
your compressed drives and provides menu commands for working with them. You
can perform all DoubleSpace tasks either from within the DoubleSpace program
or from the MS-DOS command line.
 
DBLSPACE.BIN and DBLSPACE.SYS
 
DBLSPACE.BIN is the part of MS-DOS that provides access to your compressed
drives. When you start your computer, MS-DOS loads DBLSPACE.BIN along with
other operating system functions, before carrying out the commands in your
CONFIG.SYS and AUTOEXEC.BAT files. DBLSPACE.BIN initially loads in
conventional memory, since it loads before device drivers that provide
access to upper memory. Normally, if your hard drive has been compressed
using DoubleSpace, DBLSPACE.BIN is loaded even if you press F5 or F8. For
information about starting your computer without loading DBLSPACE.BIN, see
<CONFIG.SYS commands>.
 
The DBLSPACE.SYS device driver does not provide access to compressed drives;
it simply determines the final location of DBLSPACE.BIN in memory. When
loaded with a DEVICE command, the DBLSPACE.SYS device driver moves
DBLSPACE.BIN from the top to the bottom of conventional memory. When loaded
with a DEVICEHIGH command, DBLSPACE.SYS moves DBLSPACE.BIN from conventional
to upper memory, if available. Whenever possible, DBLSPACE.SYS moves a
portion of DBLSPACE.BIN into the HMA.
 
For more information, see the topic <DBLSPACE.SYS>.
 
How DoubleSpace assigns drive letters
 
When you install DoubleSpace, it creates a new drive and assigns a drive
letter to that drive. DoubleSpace skips the first four available drive
letters and assigns the next available drive letter to the new drive. For
example, if your computer has only drives A, B, and C, DoubleSpace skips
letters D, E, F, and G, and assigns drive letter H to the new drive.
 
When assigning letters to additional drives (for example, if you compress
another drive), DoubleSpace works backwards from the first drive letter it
assigned. In the example above, DoubleSpace would next assign the letter G.
 
DoubleSpace attempts to avoid drive-letter conflicts with drives created by
FDISK, RAMDrive, networks, or other installable device drivers that assign
drive letters. However, if a drive-letter conflict does occur, DoubleSpace
resolves the conflict by reassigning its drive letters.
 
Compressing a RAMDrive
 
To compress a RAMDrive, use the <DBLSPACE /CREATE> command. Although it is
possible to compress a RAMDrive by using the DBLSPACE /COMPRESS command, it
is not recommended. Due to the inherent volatility of a RAMDrive,
DoubleSpace's automatic recovery mechanisms cannot work on a RAMDrive.
 
If you compress your RAMDrive, make sure the DEVICE command for RAMDRIVE.SYS
appears in your CONFIG.SYS file before the DEVICE=DBLSPACE.SYS command.
Otherwise, the compressed RAMDrive will not be automatically mounted when
your computer starts.
 
 

 
                              DBLSPACE /CHKDSK
 
Previous versions of DoubleSpace included the DoubleSpace Chkdsk command
(DBLSPACE /CHKDSK) for checking the validity of the specified compressed
drive.
 
DoubleSpace no longer provides a Chkdsk command. Instead, MS-DOS version 6.2
includes the new ScanDisk program, a full-featured disk analysis and repair
utility. ScanDisk can check and repair both uncompressed drives and
DoubleSpace drives. It can even check and repair unmounted DoubleSpace
compressed volume files. For more information, see <ScanDisk>.
 

 
                             DBLSPACE /COMPRESS
 
Compresses the files on an existing hard disk drive, floppy disk, or other
removable media. Compressing an existing drive makes more space available on
that drive.
 
Note:  DoubleSpace cannot compress a drive that's completely full. To
       compress your startup hard disk drive, the drive must contain at
       least 1.2 MB of free space. Other hard disk drives and floppy disks
       must contain at least 1.1 MB of free space. (DoubleSpace cannot
       compress 360K floppy disks.)
 
Syntax
 
    DBLSPACE /COMPRESS drive1: [/NEWDRIVE=drive2:] [/RESERVE=size] [/F]
 
Parameter
 
drive1:
    Specifies the existing drive you want to compress.
 
Switches
 
/COMPRESS
    Compresses the hard disk drive or floppy disk specified by the drive
    parameter. This switch can be abbreviated to /COM.
 
/NEWDRIVE=drive2:
    Specifies the drive letter for the uncompressed (host) drive. After
    DoubleSpace compresses an existing drive, your system will include both
    the existing drive (now compressed) and a new uncompressed drive. The
    /NEWDRIVE switch is optional; if you omit it, DoubleSpace assigns the
    next available drive letter to the new drive. This switch can be
    abbreviated to /NEW.
 
/RESERVE=size
    Specifies how many megabytes of space to leave uncompressed. Because
    some files, such as the Windows swap file, do not work properly when
    stored on a compressed drive, it's a good idea to reserve some
    uncompressed space. The uncompressed space will be located on the new
    uncompressed drive. (If the drive you are compressing contains a Windows
    permanent swap file, DoubleSpace moves the file to the new uncompressed
    drive.) This switch can be abbreviated to /RES.
 
/F
    Prevents DoubleSpace from displaying the final screen when compression
    is complete. This screen includes compression statistics. If you specify
    the /F switch, DoubleSpace returns to the command prompt when
    compression is complete.
 

 
                        DBLSPACE /COMPRESS  Notes
 
Compressing Floppy Disks
 
You can use DoubleSpace to increase the storage capacity of floppy disks in
addition to hard disks. After compressing a floppy disk, you can use it to
store data or to transfer data from one computer to another.
 
Compressing a floppy disk is similar to compressing an existing hard disk
drive. You can compress a floppy disk that is completely empty or one that
contains a few files. (Make sure the floppy disk is formatted and has at
least 1.1 MB of free space. DoubleSpace cannot compress a floppy disk that
is full. DoubleSpace also cannot compress 360K floppy disks.)
 
Using Compressed Floppy Disks
 
In general, you use a compressed floppy disk just as you would a normal
floppy disk. The main difference is that, to use a compressed floppy disk to
transfer data from one computer to another, both computers must be running
DoubleSpace.
 
Mounting Compressed Floppy Disks
 
By default, DoubleSpace automatically mounts a compressed floppy disk when
you try to use that disk. However, if you disable DoubleSpace's Automount
feature in order to save memory, you must mount each compressed floppy disk
yourself, before you can use it.
 
If you have turned off Automount, when you first compress a floppy disk,
DoubleSpace mounts it for you. However, if you change floppy disks or
restart your computer, you will have to remount the floppy disk before you
can use it again.
 
To mount a floppy disk, use the <DBLSPACE /MOUNT> command.
 
To enableor disable DoubleSpace's Automount feature, use the
<DBLSPACE /AUTOMOUNT> command.
 

 
                       DBLSPACE /COMPRESS  Examples
 
To compress drive D, type the following command:
 
    dblspace /compress d:
 
Because this command does not specify how much space to leave uncompressed,
DoubleSpace leaves 2 MB of uncompressed space (the default). Because the
command does not specify a drive letter for the uncompressed drive,
DoubleSpace assigns the next available drive letter to the new uncompressed
drive (the host drive).
 
To direct DoubleSpace to compress drive E, assign the drive letter F to the
new uncompressed drive (the host drive), and leave 4 MB of uncompressed
space on drive F, type the following command:
 
    dblspace /compress e: /newdrive=f: /reserve=4
 

 
                              DBLSPACE /CREATE
 
Creates a new compressed drive by using free space on an uncompressed drive.
The new compressed drive will provide more storage capacity than the amount
of space it uses.
 
Syntax
 
    DBLSPACE /CREATE drive1: [/NEWDRIVE=drive2:] [/SIZE=size |
    /RESERVE=size]
 
Parameter
 
drive1:
    Specifies the uncompressed drive that contains the space you want to use
    to create the new drive.
 
Switches
 
/CREATE
    Creates a new compressed drive by using free space on the uncompressed
    drive specified by drive1. This switch can be abbreviated to /CR.
 
/NEWDRIVE=drive2:
    Specifies the drive letter for the new compressed drive. The /NEWDRIVE
    switch is optional; if you omit it, DoubleSpace assigns the next
    available drive letter to the new drive. This switch can be abbreviated
    to /N.
 
/RESERVE=size
    Specifies how many megabytes of free space DoubleSpace should leave on
    the uncompressed drive. To make the compressed drive as large as
    possible, specify a size of 0.
 
    You can include either the /RESERVE switch or the /SIZE switch, but not
    both. If you omit both switches, DoubleSpace reserves 2 MB of free
    space. The /RESERVE switch can be abbreviated as /RE.
 
/SIZE=size
    Specifies the total size, in megabytes, of the compressed volume file.
    (This is the amount of space on the uncompressed drive that you want to
    allocate to the compressed drive.) You can include either the /RESERVE
    switch or the /SIZE switch, but not both. The /SIZE switch can be
    abbreviated as /SI.
 

 
                        DBLSPACE /CREATE  Examples
 
To create a new compressed drive that uses all available space on
uncompressed drive E, type the following command:
 
    dblspace /create e: /reserve=0
 
To create a new compressed drive by using 10 MB of space on uncompressed
drive E, type the following command:
 
    dblspace /create e: /size=10
 
To create a new compressed drive by using space on uncompressed drive D, and
to direct DoubleSpace to leave 2.75 MB of free space on drive D, type the
following command:
 
    dblspace /create d: /reserve=2.75
 
The following command creates a new compressed drive by using all but 2 MB
of the space on drive D:
 
    dblspace /create d:
 
Because the command includes neither the /RESERVE switch nor the /SIZE
switch, DoubleSpace uses the default value for the /RESERVE switch and
leaves 2 MB of space on drive D.
 

 
                            DBLSPACE /DEFRAGMENT
 
Defragments the selected compressed drive. Defragmenting a compressed drive
consolidates the free space on it. If you are planning to reduce the size of
a compressed drive, you should first use the Defragment command to
consolidate the drive's free space. You can then make the drive smaller than
you could if you did not first defragment it.
 
Syntax
 
    DBLSPACE /DEFRAGMENT [/F ] [drive:]
 
Parameter
 
drive1:
    Specifies the drive you want to defragment. This parameter is optional;
    if you do not specify a drive, DoubleSpace defragments the current
    drive.
 
Switches
 
/DEFRAGMENT
    Directs DoubleSpace to defragment the specified drive. This switch can
    be abbreviated as /DEF.
 
/F
    Enables the specified drive to be defragmented more fully. For more
    information about using the /F switch, see Notes.
 

 
                       DBLSPACE /DEFRAGMENT  Notes
 
Difference between DBLSPACE /DEFRAGMENT and the DEFRAG command
 
The <DEFRAG> command optimizes disk performance by reorganizing the files on
a drive. You can use DEFRAG to optimize uncompressed drives. Although you
can run DEFRAG on a compressed drive, doing so will probably not improve
your system's speed.
 
Unlike the DEFRAG command, the DBLSPACE /DEFRAGMENT command does not speed
up your system. DBLSPACE /DEFRAGMENT simply consolidates a compressed
drive's free space so that all the free space is at the end of the
compressed volume file. This provides the fullest utilization of your disk
space, and also enables you to reduce the size of the compressed drive more
than you otherwise could.
 
Thoroughly defragmenting a compressed drive
 
To defragment a compressed drive as much as possible, use both the DEFRAG
command and the DBLSPACE /DEFRAGMENT command, as follows:
 
1. Defragment the drive by using the DEFRAG command.
 
2. Defragment it again by using the DBLSPACE /DEFRAGMENT /F command.
 
3. Defragment it a third time by using the DBLSPACE /DEFRAGMENT command
   without the /F switch.
 

 
                      DBLSPACE /DEFRAGMENT  Example
 
To defragment compressed drive D, you would type the following at the
command prompt:
 
    dblspace /defragment d:
 
To defragment the current compressed drive, type the following command:
 
    dblspace /defragment
 
To defragment compressed drive C as much as possible, type the following
commands:
 
    defrag c:
    dblspace /defragment /f c:
    dblspace /defragment c:
 

 
                              DBLSPACE /DELETE
 
Deletes the selected compressed drive and erases the associated compressed
volume file.
 
CAUTION:  Deleting a compressed drive erases the entire drive and all the
          files it contains.
 
Syntax
 
    DBLSPACE /DELETE drive:
 
Parameter
 
drive:
    Specifies the drive you want to delete. (DoubleSpace will not allow you
    to delete drive C.)
 
Switch
 
/DELETE
    Deletes the specified drive. This switch can be abbreviated as /DEL.
 
See <DBLSPACE /DELETE  Note> for information about restoring a compressed
drive that has been accidentally deleted.
 

 
                          DBLSPACE /DELETE  Note
 
If you accidentally delete a compressed drive, you might be able to restore
it by using Microsoft Undelete. When DoubleSpace deletes a compressed drive,
it actually deletes a file on your uncompressed drive. This file is called
the "compressed volume file". A compressed volume file has a filename in the
form DBLSPACE.xxx (for example, DBLSPACE.000).
 
First, restore the deleted compressed volume file by using Undelete. Once
you have restored the file, remount it by using the <DBLSPACE /MOUNT>
command. If DoubleSpace cannot remount the compressed volume file, run
<ScanDisk> on that compressed volume file.
 
For information about using Microsoft Undelete, see the chapter "Managing
Your System" in the MS-DOS 6 User's Guide.
 

 
                        DBLSPACE /DELETE  Example
 
The following command directs DoubleSpace to delete compressed drive E:
 
    dblspace /delete e:
 
DoubleSpace then deletes the compressed volume file for drive E. This
completely erases drive E and all the files it contains.
 
Note:  You cannot delete drive C.
 
See <DBLSPACE /DELETE  Note> for information about restoring a compressed
drive that has been accidentally deleted.
 

 
                              DBLSPACE /FORMAT
 
Formats the selected compressed drive.
 
CAUTION:  Formatting a compressed drive deletes all the files it contains.
          You cannot unformat a drive that has been formatted by using
          DBLSPACE /FORMAT.
 
Syntax
 
    DBLSPACE /FORMAT drive:
 
Parameter
 
drive:
    Specifies the drive you want to format. (DoubleSpace will not allow you
    to format drive C.)
 
Switch
 
/FORMAT
    Directs DoubleSpace to format the specified compressed drive. This
    switch can be abbreviated as /F.
 

 
                        DBLSPACE /FORMAT  Example
 
The following command directs DoubleSpace to format compressed drive E:
 
    dblspace /format e:
 
DoubleSpace then formats compressed drive E, which completely erases all the
files on it.
 

 
                               DBLSPACE /INFO
 
Displays information about the selected drive's free and used space, the
name of its compressed volume file, and its actual and estimated compression
ratios.
 
You can use the DBLSPACE /INFO command while Windows is running.
 
Syntax
 
    DBLSPACE [/INFO | drive:]
 
Parameter
 
drive:
    Specifies the compressed drive about which you want information. If you
    don't specify a drive letter, DoubleSpace displays information about the
    current drive.
 
Switch
 
/INFO
    Directs DoubleSpace to display information about the selected drive.
    This switch is optional and can be omitted as long as you specify a
    drive letter.
 

 
                         DBLSPACE /INFO  Examples
 
The following command displays information about the current drive:
 
    dblspace /info
 
The following command displays information about drive C:
 
    dblspace /info c:
 
The following command displays information about drive E:
 
    dblspace e:
 

 
                               DBLSPACE /LIST
 
Lists and briefly describes all your computer's drives (except network
drives and CD-ROM drives), and specfies whether DoubleSpace's Automount and
DoubleGuard features are enabled or disabled.
 
You can use the DBLSPACE /LIST command while Windows is running.
 
Syntax
 
    DBLSPACE /LIST
 
Switch
 
/LIST
    Directs DoubleSpace to display a list of your computer's local
    (non-network) drives. This switch can be abbreviated to /LI.
 

 
                         DBLSPACE /LIST  Example
 
The following command displays a list of your computer's drives (except
network drives and CD-ROM drives):
 
    dblspace /list
 
When you type this command, DoubleSpace displays information similar to the
following:
 
Drive  Type                        Total Free  Total Size  CVF Filename
-        -
  A    Removable-media drive       No disk in drive
  B    Compressed floppy disk         1.27 MB     1.27 MB  H:DBLSPACE.000
  C    Compressed hard drive         13.99 MB    96.49 MB  K:DBLSPACE.000
  D    Local hard drive               2.38 MB    39.98 MB
  E    Local hard drive              37.33 MB   201.94 MB
  F    Available for DoubleSpace
  G    Available for DoubleSpace
  H    Floppy drive                   0.00 MB     0.70 MB
  I    Available for DoubleSpace
  J    Available for DoubleSpace
  K    Local hard drive              12.52 MB    66.80 MB
 
DoubleGuard safety checking is enabled.
Automounting is enabled.
 

 
                              DBLSPACE /MOUNT
 
Establishes a connection between a compressed volume file (CVF) and a drive
letter so that you can use the files the CVF contains. DoubleSpace usually
mounts CVFs automatically. You need to mount a CVF only only if you
previously unmounted it, or if the CVF is located on a floppy disk and
Automount is disabled.
 
Syntax
 
    DBLSPACE /MOUNT[=nnn] drive1: [/NEWDRIVE=drive2:]
 
Parameter
 
drive1:
    Specifies the drive that contains the compressed volume file you want to
    mount. You must specify a drive letter.
 
Switches
 
/MOUNT=nnn
    Directs DoubleSpace to mount the compressed volume file with the
    filename extension specified by the nnn parameter. For example, to mount
    a CVF named DBLSPACE.001, you would specify /MOUNT=001. If you omit the
    nnn parameter, DoubleSpace attempts to mount the compressed volume file
    named DBLSPACE.000. The /MOUNT switch can be abbreviated as /MO.
 
/NEWDRIVE=drive2:
    Specifies the drive letter to assign to the new drive. This switch is
    optional; if you don't specify a drive letter, DoubleSpace assigns the
    new drive the next available drive letter. This switch can be
    abbreviated as /NEW.
 

 
                        DBLSPACE /MOUNT  Examples
 
To mount a compressed floppy disk in drive A, you would type the following:
 
    dblspace /mount a:
 
To mount the compressed volume file DBLSPACE.001 located on uncompressed
drive D, you would type the following:
 
    dblspace /mount=001 d:
 

 
                              DBLSPACE /RATIO
 
Changes the estimated compression ratio of the selected drive. DoubleSpace
uses this ratio to estimate how much free space the drive contains. You
might want to change the estimated compression ratio if you plan to store
new files with a compression ratio that differs greatly from the current
ratio.
 
Syntax
 
    DBLSPACE /RATIO[=r.r] [drive: | /ALL]
 
Parameter
 
drive:
    Specifies the drive for which you want to change the estimated
    compression ratio.
 
    You can include either a drive letter or the /ALL switch, but not both.
    If you specify neither the drive nor the /ALL switch, DoubleSpace
    changes the estimated compression ratio for the current drive.
 
Switch
 
/RATIO=r.r
    Changes the estimated compression ratio of the specified drive(s). To
    change the ratio to a specific number, specify the ratio you want. You
    can specify a ratio from 1.0 to 16.0. If you don't specify a ratio,
    DoubleSpace sets the drive's estimated compression ratio to the average
    actual compression ratio for all the files currently on the drive. This
    switch can be abbreviated as /RA.
 
/ALL
    Specifies that you want to change the ratio of all currently mounted
    compressed drives. (If you use this switch, you cannot also specify a
    value for the drive parameter.)
 

 
                        DBLSPACE /RATIO  Examples
 
To change the estimated compression ratio of all your compressed drives to
match each drive's actual compression ratio, type the following command:
 
    dblspace /ratio /all
 
To change drive D's estimated compression ratio so that it is 3.2 to 1, you
would type the following:
 
    dblspace /ratio=3.2 d:
 
To change the estimated compression ratio of the current drive to 6 to 1,
you would type the following:
 
    dblspace /ratio=6
 
To have DoubleSpace adjust the compression ratio for all your drives each
time your computer starts, add the following command to the end of your
AUTOEXEC.BAT file:
 
    dblspace /ratio /all
 

 
                               DBLSPACE /SIZE
 
Enlarges or reduces the size of a compressed drive. You might want to
enlarge a compressed drive if its host drive contains plenty of free space.
You might want to reduce the size of a compressed drive if you need more
free space on the host drive.
 
Syntax
 
    DBLSPACE /SIZE[=size1 | /RESERVE=size2] drive:
 
Parameter
 
drive:
    Specifies the drive you want to resize.
 
Switches
 
/SIZE=size1
    Changes the size of the specified drive. You can specify the new size of
    the drive by using the size1 parameter. The size of the drive is the
    number of megabytes of space that the drive's compressed volume file
    uses on the uncompressed (host) drive. The /SIZE switch can be
    abbreviated as /SI.
 
    You can specify the drive's new size by using either the size1 parameter
    or the /RESERVE switch, but not both. If you include neither the size1
    parameter nor the /RESERVE switch, DoubleSpace makes the drive as small
    as possible.
 
/RESERVE=size2
 
    Specifies how many megabytes of free space you want the uncompressed
    (host) drive to contain after DoubleSpace resizes the drive. The
    /RESERVE switch can be abbreviated as /RES.
 
    You can specify the drive's new size by using either the /RESERVE switch
    or the size1 parameter of the /SIZE switch, but not both. If you include
    neither the /RESERVE switch nor the size1 parameter, DoubleSpace makes
    the drive as small as possible.
 

 
                         DBLSPACE /SIZE  Examples
 
To change the size of drive C so that its compressed volume file uses 60.5
MB of space on drive D, type the following command:
 
    dblspace /size=60.5 c:
 
To change the size of drive E so that its host drive, drive D, contains 20
MB of free uncompressed space, type the following command:
 
    dblspace /size /reserve=20 e:
 
To change the size of drive C so that it is as large as possible, type the
following command:
 
    dblspace /size /reserve=0 c:
 

 
                            DBLSPACE /UNCOMPRESS
 
Uncompresses a drive that was compressed by using DoubleSpace. When you
uncompress the last mounted drive, the /UNCOMPRESS switch also removes
DBLSPACE.BIN from memory. (DBLSPACE.BIN is the portion of MS-DOS that
provides access to compressed drives. It uses about 50K of memory.)
 
Syntax
 
    DBLSPACE /UNCOMPRESS drive:
 
Parameter
 
drive:
    Specifies the drive you want to uncompress.
 
Switch
 
/UNCOMPRESS
    Uncompresses the specified drive.
 

 
                         DBLSPACE /UNCOMPRESS-Notes
 
Backing up before uncompressing
 
Before uncompressing your drive, you should back up the files it contains.
To back up your files, use Microsoft Backup for MS-DOS (MSBACKUP) or
Microsoft Backup for Windows.
 
Invalid pathnames after uncompressing
 
When you uncompress a drive, DoubleSpace either changes that drive's letter
or the letter of its host drive (depending on how the compressed drive was
originally created.) DoubleSpace shows how the drive letters will change
when it uncompresses the drive.
 
Some programs have settings that include explicit pathnames and drive
letters. If a program's settings specify a drive that is no longer valid
after uncompressing, the program will probably display an error message or
be unable to find one of its components or data files. In that case, you
need to correct the drive letter specified by that setting.
 
Disk Space
 
You can uncompress a drive only if the data it contains will fit on the host
drive. If you use the DBLSPACE /UNCOMPRESS command, and DoubleSpace
indicates your drive will not have enough free disk space, delete
unnecessary files or move them to another drive.
 
Duplicate Filenames on Compressed and Host Drives
 
If the root directories of the compressed and host drives contain files or
directories with identical names, DoubleSpace cannot uncompress the
compressed drive. If this happens, DoubleSpace displays an error message,
and creates a DBLSPACE.LOG file that lists the files involved. Use the TYPE
command to view the contents of the DBLSPACE.LOG file. Then, remove or
rename one copy of each file, and then try uncompressing the drive again.
 
Uninstalling DoubleSpace
 
When you uncompress the last mounted compressed drive, DoubleSpace first
uncompresses the drive, and then removes DBLSPACE.BIN from memory.
(DBLSPACE.BIN is the portion of MS-DOS that provides access to compressed
drives. It uses about 50K of memory.) If there are any unmounted compressed
drives left on your computer, you will not be able to mount them until you
reinstall DoubleSpace. (To reinstall DoubleSpace, type DBLSPACE at the
command prompt.)
 

 
                        DBLSPACE /UNCOMPRESS-Example
 
To uncompress drive E, type the following command:
 
    dblspace /uncompress e:
 

 
                             DBLSPACE /UNMOUNT
 
Breaks the connection between the selected drive's compressed volume file
and its drive letter. Unmounting a drive makes it temporarily unavailable.
 
You cannot unmount drive C.
 
Syntax
 
    DBLSPACE /UNMOUNT [drive:]
 
Parameter
 
drive:
    Specifies the drive you want to unmount. This parameter is optional; if
    you omit it, DoubleSpace unmounts the current drive.
 
Switch
 
/UNMOUNT
    Unmounts the specified compressed drive.
 

 
                        DBLSPACE /UNMOUNT  Example
 
To unmount compressed drive E, type the following command:
 
    dblspace /unmount e:
 

 
                                DBLSPACE.SYS
 
Determines the final memory location of DBLSPACE.BIN.
 
DBLSPACE.BIN is the part of MS-DOS that provides access to your compressed
drives. When you start your computer, MS-DOS loads DBLSPACE.BIN along with
other operating system functions, before carrying out the commands in your
CONFIG.SYS and AUTOEXEC.BAT files. DBLSPACE.BIN always loads in conventional
memory because it loads before device drivers that provide access to upper
memory.
 
When you run DoubleSpace Setup, it adds a command for DBLSPACE.SYS to your
CONFIG.SYS file.
 
Syntax
 
    DEVICE = [drive:][path]DBLSPACE.SYS /MOVE [/NOHMA]
 
    DEVICEHIGH = [drive:][path]DBLSPACE.SYS /MOVE [/NOHMA]
 
Switches
 
/MOVE
    Moves DBLSPACE.BIN to its final location in memory.
 
    Initially, DBLSPACE.BIN loads at the top of conventional memory. After
    MS-DOS finishes carrying out the commands in the CONFIG.SYS file, it
    moves DBLSPACE.BIN to the bottom of conventional memory. When
    DBLSPACE.SYS is loaded by using the DEVICE command, it moves
    DBLSPACE.BIN from the top of conventional memory to the bottom. This can
    be useful for avoiding conflicts with programs that are loaded from the
    CONFIG.SYS file and require access to the top of conventional memory.
 
    When DBLSPACE.SYS is loaded by using the DEVICEHIGH command,
    DBLSPACE.BIN moves to upper memory, if available. Moving DBLSPACE.BIN to
    upper memory makes more conventional memory available.
 
/NOHMA
    Prevents DBLSPACE.SYS from moving a portion of DBLSPACE.BIN to the high
    memory area (HMA).
 
    If MS-DOS is loaded into the HMA, DBLSPACE.SYS moves a  portion of
    DBLSPACE.BIN to the HMA (if there is enough room in the HMA). Use this
    switch if you do not want DBLSPACE.BIN to use the HMA.
 
    Parameter
 
    [drive:][path]
    Specifies the location of the DBLSPACE.SYS file.
 

 
                           DBLSPACE.SYS  Notes
 
DBLSPACE.SYS does not provide access to compressed drives
 
The DBLSPACE.SYS device driver does not provide access to compressed drives;
it simply moves DBLSPACE.BIN to its final location in memory. (DBLSPACE.BIN
is the part of MS-DOS that provides access to compressed drives; it loads
with other operating system functions, before MS-DOS carries out the
commands in your CONFIG.SYS file.)
 
If your compressed drive's host drive requires a device driver
 
A few disk drives require an installable device driver. If such a drive
contains compressed volume files (either you compressed that drive, or you
created new compressed drives on that drive), the command for the
DBLSPACE.SYS device driver must appear in the CONFIG.SYS file after the
command for your drive's device driver. Otherwise, DoubleSpace will not
mount any compressed volume files located on that drive when your computer
starts.
 
Avoiding conflicts with programs that require access to the top of
conventional memory
 
When you start your computer, MS-DOS loads DBLSPACE.BIN at the top of
conventional memory; after processing the CONFIG.SYS file, MS-DOS moves
DBLSPACE.BIN to the bottom of conventional memory.
 
However, a few programs that are loaded from the CONFIG.SYS file require
access to the top of conventional memory and do not work properly if
DBLSPACE.BIN is located there. To avoid such conflicts, DoubleSpace Setup
adds a command for DBLSPACE.SYS before any command that starts a program
that is known to require this area of memory. The DBLSPACE.SYS device driver
moves DBLSPACE.BIN from the top of conventional memory to another area of
memory (either to the bottom of conventional memory or to upper memory).
 
Depending on your configuration, your CONFIG.SYS file might contain more
than one command for DBLSPACE.SYS. This will not cause any problems.
 
Moving part of DBLSPACE.BIN to the high memory area
 
By default, if your CONFIG.SYS file contains a DOS=HIGH command,
DBLSPACE.SYS moves the compression server, a portion of DBLSPACE.BIN, to the
HMA. To move a portion of DBLSPACE.BIN to the HMA, you must have an 80286 or
higher computer with extended memory, and must be running HIMEM or another
extended-memory manager.
 
Moving DBLSPACE.BIN to upper memory
 
When loaded with a DEVICEHIGH command, the DBLSPACE.SYS device driver moves
DBLSPACE.BIN from conventional to upper memory. If there is no upper memory
block large enough to accommodate DBLSPACE.BIN, it is instead moved to the
bottom of conventional memory.
 
To use the upper memory area, you must have an 80386 or 80486 computer with
extended memory.
 
Using BUFFERS with DoubleSpace
 
If you are using DoubleSpace and SMARTDrive, and MS-DOS is loaded into the
HMA, set BUFFERS=10. This ensures that there will be enough room in the HMA
for MS-DOS, DoubleSpace, and all your buffers. (If BUFFERS is set to a value
higher than 10, there might not be enough room in the HMA for all your
buffers, and MS-DOS will place all the buffers into conventional memory.) If
you're using SMARTDrive, specifying more than 10 buffers will not speed up
your system much, but will use additional memory.
 

 
                          DBLSPACE.SYS  Examples
 
To move a portion of DBLSPACE.BIN to the HMA and move the rest to the bottom
of conventional memory, you must have an 80286 or higher computer, and your
CONFIG.SYS file must contain a DOS=HIGH command and a `DEVICE command for
HIMEM or another extended-memory manager. Load DBLSPACE.SYS by using the
following command:
 
    device=dblspace.sys /move
 
To move a portion of DBLSPACE.BIN to the HMA and the rest to the upper
memory area (if available), you must have an 80386 or higher computer with
extended memory. Ensure that your CONFIG.SYS file contains a DEVICE command
for DBLSPACE.SYS, and then run MemMaker.
 
To move all of DBLSPACE.BIN to the bottom of conventional memory, and to
prevent DBLSPACE.BIN from using the HMA or upper memory, load DBLSPACE.SYS
by using the following command:
 
    device=dblspace.sys /move /nohma
 
To move all of DBLSPACE.BIN to upper memory (if available), and to prevent
DBLSPACE.BIN from using the HMA, load DBLSPACE.SYS by using the following
command:
 
    devicehigh=dblspace.sys /move /nohma
 
 

 
                             DBLSPACE.INI File
 
The DBLSPACE.INI file is a text file with the System, Read-Only, and Hidden
attributes. DoubleSpace stores this file in the root directory of your
startup drive. The DBLSPACE.INI file contains variables that DoubleSpace
uses when your computer starts.
 
Note:  Although it is possible to change these variables yourself (by using
       the <DBLSPACE> command or by editing the file directly), you should
       do so only if you understand what they do and what the results might
       be. Before changing the DBLSPACE.INI file, you should make a backup
       copy of the file. For changes to the DBLSPACE.INI settings to take
       effect, you must restart your computer.
 
The DBLSPACE.INI file can contain one or more of the following variables:
 
AUTOMOUNT=0|1|A...Z
 
    Enables or disables the automatic mounting of removable drives,
    including floppy disk drives. By default, DoubleSpace automatically
    mounts all removable drives. To change this setting, use the
    <DBLSPACE /AUTOMOUNT> command.
 
DOUBLEGUARD=0|1
 
    The DOUBLEGUARD setting enables or disables DoubleGuard(tm) safety
    checking. When DoubleGuard is enabled, DoubleSpace will constantly check
    its memory for damage by some other program. By default, DoubleGuard is
    enabled. To change this setting, use the <DBLSPACE /DOUBLEGUARD>
    command.
 
LASTDRIVE=drive
 
    The LASTDRIVE setting specifies the highest drive letter available for
    use by DoubleSpace. To change this setting, use the
    <DBLSPACE /LASTDRIVE> command.
 
MAXFILEFRAGMENTS=n
 
    The MAXFILEFRAGMENTS setting sets the limit for the amount of
    fragmentation allowed for all mounted compressed volume files. To change
    this setting, use the <DBLSPACE /MAXFILEFRAGMENTS> command.
 
    The MAXREMOVABLEDRIVES setting specifies how many additional drives
    DoubleSpace should allocate memory for when your computer starts. This
    determines how many additional compressed drives you can create,
    compress, or mount without restarting your computer. To change this
    setting, use the <DBLSPACE /MAXREMOVABLEDRIVES> command.
 
ROMSERVER=0|1
    Enables or disables the check for a ROM BIOS Microsoft Real-time
    Compresson Interface (MRCI) server. By default, the ROM MRCI check is
    disabled. To change this setting, use the <DBLSPACE /ROMSERVER>
    command.
 
SWITCHES=/F|/N|/FN
 
    Controls the way the CTRL+F5 and CTRL+F8 keys work. (Normally, you can
    press CTRL+F5 or CTRL+F8 to bypass DoubleSpace when your computer
    starts.) To change this setting, use the <DBLSPACE /SWITCHES> command.
    (To remove SWITCHES settings from your DBLSPACE.INI file, you must edit
    the file directly.)
 
ActivateDrive=x,yn
    This setting specifies that DoubleSpace should mount a compressed volume
    file when your computer starts. The DBLSPACE.INI file can contain more
    than one ActivateDrive setting. Except for the host drive letter, which
    you can change by using the <DBLSPACE /HOST> command, do not change the
    ActivateDrive setting yourself.
 
    The ActivateDrive setting requires the following parameters:
 
    x
        The drive letter to assign to the newly mounted compressed drive.
 
    y
        The drive letter of the host drive. To change the host drive letter,
        use the <DBLSPACE /HOST> command.
 
    n
        The number of the compressed volume file (CVF). To determine the CVF
        number, examine its filename extension. If the CVF filename is
        DBLSPACE.000, set n to 0; if the CVF filename is DBLSPACE.001, set n
        to 1, and so on.
 
FIRSTDRIVE=x
 
    Set by DoubleSpace each time it modifies the DBLSPACE.INI file.
    DoubleSpace uses this setting to control the overall assignment of drive
    letters. Do not change this setting yourself.
 

 
                            DBLSPACE /AUTOMOUNT
 
Modifes the AUTOMOUNT setting in the <DBLSPACE.INI> file. The AUTOMOUNT
setting enables or disables the automatic mounting of removable drives,
including floppy disk drives. By default, DoubleSpace automatically mounts
all removable drives.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /AUTOMOUNT=0|1|A...Z
 
Parameters
 
0
    Prevents DoubleSpace from automatically mounting removable drives. Use
    this value to save memory.
 
1
    Directs DoubleSpace to automatically mount all removable drives. This is
    the default setting.
 
A...Z
    Directs DoubleSpace to automatically mount specified removable drives.
    For example, to have DoubleSpace automatically mount drives A, B, and G,
    you would type DBLSPACE /AUTOMOUNT=ABG at the command prompt.
 

 
                       DBLSPACE /AUTOMOUNTExamples
 
If you have floppy drives A and B, and a Bernoulli removable drive D, the
following command enables automatic mounting of all these drives:
 
    dblspace /automount=1
 
Note:  Before a floppy drive actually mounts, you must insert the floppy
       disk in the drive, and then begin using the floppy disk.
 
If you just want to enable automatic mounting of floppy drives A and B, use
the following command:
 
    dblspace /automount=ab
 
 

 
                           DBLSPACE /DOUBLEGUARD
 
Modifes the DOUBLEGUARD setting in the <DBLSPACE.INI> file. The DOUBLEGUARD
setting enables or disables DoubleGuard(tm) safety checking. When
DoubleGuard is enabled, DoubleSpace will constantly check its memory for
damage by some other program. If it detects any memory damage, DoubleSpace
will halt your computer to minimize damage to your data. By default,
DoubleGuard is enabled.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /DOUBLEGUARD=0|1
 
Parameters
 
    0
    Prevents DoubleSpace from checking its memory for damage by other
    programs. Using this switch might speed up your system, but could result
    in loss of data if a program violates the memory DoubleSpace is using.
 
1
    Directs DoubleSpace to check its memory for damage by other programs.
    This is the default setting.
 

 
                               DBLSPACE /HOST
 
Changes the drive letter of the host drive for the specfied compressed drive
by modifying the corresponding ActivateDrive setting in the <DBLSPACE.INI>
file. You cannot use this switch to change the letter of a compressed
drive's host drive if you used free space to create that compressed drive.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE drive1: /HOST=drive2
 
Parameters
 
drive1
 
    Specifies the current drive letter of either the compressed drive or its
    host drive.
 
drive2
    Specifies the new drive letter for the host drive.
 

 
                          DBLSPACE /HOSTExamples
 
If your compressed drive letter is C, and your host drive letter is H, you
can use the following command to change the host drive letter to G:
 
    dblspace c: /host=g:
 
You can also use the following command to change the host drive letter to
G:
 
    dblspace h: /host=g:
 
 

 
                            DBLSPACE /LASTDRIVE
 
Modifes the LASTDRIVE setting in the <DBLSPACE.INI> file. The LASTDRIVE
setting specifies the highest drive letter available for use by
DoubleSpace.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DLBSPACE /LASTDRIVE=drive
 
Parameter
 
drive
 
    The drive letter that is the highest drive letter you want to be
    available to DoubleSpace. (If another program uses one of the drive
    letters specified for DoubleSpace, the highest drive letter available to
    DoubleSpace will be higher than that specified by LASTDRIVE.)
 
 

 
                         DBLSPACE /MAXFILEFRAGMENTS
 
Modifes the MAXFILEFRAGMENTS setting in the <DBLSPACE.INI> file. The
MAXFILEFRAGMENTS setting sets the limit for the amount of fragmentation
allowed for all mounted compressed volume files.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /MAXFILEFRAGMENTS=n
 
Parameter
 
n
 
    The maximim number of fragments in which the compressed volume files may
    be stored on the host drive. For each fragment, 6 bytes of memory are
    allocated.
 
 

 
                        DBLSPACE /MAXREMOVABLEDRIVES
 
Modifes the MAXREMOVABLEDRIVES setting in the <DBLSPACE.INI> file. The
MAXREMOVABLEDRIVES setting specifies how many additional drives DoubleSpace
should allocate memory for when your computer starts. This determines how
many additional compressed drives you can create, compress, or mount without
restarting your computer.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /MAXREMOVABLEDRIVES=n
 
Parameter
 
n
 
    The number of additional drives for which DoubleSpace should allocate
    memory when your computer starts. DoubleSpace allocates 96 bytes of
    memory for each additional drive.
 
 

 
                            DBLSPACE /ROMSERVER
 
Modifes the ROMSERVER setting in the <DBLSPACE.INI> file. The ROMSERVER
setting enables or disables the check for a ROM BIOS Microsoft Real-time
Compresson Interface (MRCI) server. By default, the ROM MRCI check is
disabled.
 
CAUTION: Do not enable the MRCI check unless you are certain that you have
hardware that uses the MRCI. The MRCI check can interfere with a ROM BIOS
that does not have the MRCI.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /ROMSERVER=0|1
 
Parameters
 
0
        Disables the check for the ROM BIOS MRCI server.
 
    1
        Enables the check for the ROM BIOS MRCI server.



 
                             DBLSPACE /SWITCHES
 
Modifes the SWITCHES setting in the <DBLSPACE.INI> file. The SWITCHES
setting controls the way the CTRL+F5 and CTRL+F8 keys work. (Normally, you
can press CTRL+F5 or CTRL+F8 to bypass DoubleSpace when your computer
starts.)
 
If your DBLSPACE.INI file does not contain a /SWITCHES setting, you can use
CTRL+F5 or CTRL+F8 to keep from loading DoubleSpace when your computer
starts. For more information, see <CONFIG.SYS commands>.
 
Note:  For this switch to take effect, you must restart your computer.
 
Syntax
 
    DBLSPACE /SWITCHES=F|N
 
Parameters
 
The values for /SWITCHES are as follows:
 
N
    Prevents you from using CTRL+F8 or CTRL+F5 to bypass DoubleSpace when
    your computer starts.
 
    If you choose this setting and press CTRL+F8, MS-DOS will still allow
    you to selectively choose commands in your CONFIG.SYS and AUTOEXEC.BAT
    files. If you choose this setting and press CTRL+F5, MS-DOS will still
    bypass your AUTOEXEC.BAT and CONFIG.SYS files.
 
    (Although you do not use the "/" character when specifying the N
    parameter , the setting in the DBLSPACE.INI file is SWITCHES=/N.)
 
F
    Reduces the amount of time you have to press CTRL+F8 or CTRL+F5 when
    your computer starts. Use this setting to speed up processing of your
    startup files. (Although you do not use the "/" character when
    specifying the F parameter , the setting in the DBLSPACE.INI file is
    SWITCHES=/F.)
 

 
                         DBLSPACE /SWITCHESNotes
 
Removing /SWITCHES settings
 
To remove any /SWITCHES settings in your DBLSPACE.INI file, you must edit
the file directly. To edit the file, use a text editor such as MS-DOS Editor
(EDIT).
 
DBLSPACE /SWITCHES and the SWITCHES command
 
The DoubleSpace /SWITCHES command and the SWITCHES setting in the
DBLSPACE.INI file affect only the behavior of the CTRL+F5 and CTRL+F8 keys.
To control the behavior of the F5 and F8 keys, use the <SWITCHES> command.
 
 

 
                                   DEBUG
 
Starts the Debug program, which you can use to test and debug executable
files.
 
For information on DEBUG command-line syntax, type DEBUG /? at the command
prompt.
 
For a list of Debug commands, start Debug, and then type ?.
 
For more information about Debug commands, see the MS-DOS 6.2 Technical
Reference, which comes with the MS-DOS 6.2 Resource Kit. To order the
Resource Kit, use the coupon in the back of your MS-DOS 6 User's Guide.
 

 
                                   DEFRAG
 
Reorganizes the files on a disk to optimize disk performance. Do not use
this command when Windows is running.
 
Syntax
    DEFRAG [drive:] [/F] [/S[:]order] [/B] [/SKIPHIGH] [/LCD | /BW | /G0]
    [/H]
 
    DEFRAG [drive:] [/U] [/B] [/SKIPHIGH] [/LCD | /BW | /G0] [/H]
 
Parameter
 
drive:
    Specifies the drive that contains the disk you want to optimize.
 
Switches
 
/F
    Defragments files and ensures that the disk contains no empty spaces
    between files.
 
/U
    Defragments files and leaves empty spaces, if any, between files.
 
/S
    Controls how the files are sorted in their directories. If you omit this
    switch, DEFRAG uses the current order on the disk. The colon (:) is
    optional. The following list describes each of the values you can use to
    sort files. Use any combination of the values, and do not separate these
    values with spaces.
 
    N
        In alphabetic order by name
 
    N-
        In reverse alphabetic order by name (Z through A)
 
    E
        In alphabetic order by extension
 
    E-
        In reverse alphabetic order by extension (Z through A)
 
    D
        By date and time, earliest first
 
    D-
        By date and time, latest first
 
    S
        By size, smallest first
 
    S-
        By size, largest first
 
/B
    Restarts your computer after files have been reorganized.
 
/SKIPHIGH
    Loads DEFRAG into conventional memory. By default, DEFRAG is loaded into
    upper memory, if upper memory is available.
 
/LCD
    Starts DEFRAG using an LCD color scheme.
 
/BW
    Starts DEFRAG using a black and white color scheme.
 
/G0
    Disables the graphic mouse and graphic character set.
 
/H
    Moves hidden files.
 

 
                               DEFRAGNotes
 
Network and INTERLNK drives
 
You cannot use DEFRAG to optimize network drives or drives created with
INTERLNK.
 
Disk information reported by DEFRAG and CHKDSK
 
Disk information that DEFRAG reports differs from information that CHKDSK
reports. DEFRAG reports hidden and user files as one number; CHKDSK reports
numbers for each type. DEFRAG counts the root as a directory; CHKDSK does
not. DEFRAG does not count the volume label as a file; CHKDSK does.
 
Start DEFRAG only from MS-DOS
 
If you start DEFRAG from a program such as Microsoft Windows, you may lose
data.
 
DEFRAG exit codes
 
The following list briefly describes the meaning of each DEFRAG exit code
(ERRORLEVEL parameter):
 
0
    The defragmentation was successful.
 
1
    An internal error occurred.
 
2
    The disk contained no free clusters. To operate, DEFRAG needs 1 free
    cluster.
 
3
    The user pressed CTRL+C to stop the process.
 
4
    A general error occurred.
 
5
    DEFRAG encountered an error while reading a cluster.
 
6
    DEFRAG encountered an error while writing a cluster.
 
7
    An allocation error occurred. To correct the error, use the <SCANDISK>
    command.
 
8
    A memory error occurred.
 
9
    There was insufficient memory to defragment the disk.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by DEFRAG. For an example of a batch
program that processes exit codes, see the <CHOICE> command.
 

 
                              DEFRAGExample
 
To load DEFRAG into conventional memory and specify that DEFRAG sort files
according to the date they were created, from latest created to earliest
created, type the following command:
 
    defrag c: /f /sd- /skiphigh
 
This example fully optimizes drive C, but slows DEFRAG.



 
                                DEL (Erase)
 
Deletes the files you specify.
 
Syntax
 
    DEL [drive:][path]filename [/P]
 
    ERASE [drive:][path]filename [/P]
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file or set of files you want to
    delete.
 
Switch
 
/P
    Prompts you for confirmation before deleting the specified file.
 
Related Commands
 
For information about retrieving a deleted file, see the <UNDELETE>
command.
 
For information about removing a directory, see the <RMDIR> command.
 
For information about deleting a directory, its files, and all
subdirectories and files subordinate to it, see the <DELTREE> command.
 

 
                                 DELNotes
 
Using the /P switch
 
If you use the /P switch, DEL displays the name of a file and prompts you
with a message in the following format:
 
    filename, Delete (Y/N)?
 
Press Y to confirm the deletion, N to cancel the deletion and display the
next filename (if you specified a group of files), or CRTL+C to stop the DEL
command.
 
Deleting more than one file at a time
 
You can delete all the files in a directory by typing the DEL command
followed by [drive:]path. You can also use wildcards (* and ?) to delete
more than one file at a time. However, you should use wildcards cautiously
with the DEL command to avoid deleting files unintentionally. Suppose you
type the following command:
 
    del *.*
 
DEL displays the following prompt:
 
    All files in directory will be deleted! Are you sure (Y/N)?
 
Press Y and then ENTER to delete all files in the current directory, or
press N and then ENTER to cancel the deletion.
 
Before you use wildcards with the DEL command to delete a group of files,
you can use the same wildcards with the DIR command to see a list of the
names of all the files included in the group.
 
CAUTION:  Once you delete a file from your disk, you may not be able to
          retrieve it. Although the UNDELETE command can retrieve deleted
          files, it can do so with certainty only if no other files have
          been created or changed on the disk. If you accidentally delete a
          file that you want to keep, stop what you are doing and
          immediately use the UNDELETE command to retrieve the file.
 
          For more information on undeleting files, see the chapter
          "Managing Your System" in the MS-DOS 6 User's Guide.
 

 
                               DELExamples
 
To delete the CAT.TMP file from the TEST directory on drive C, you can use
either of the following commands:
 
    del c:\test\cat.tmp
 
    erase c:\test\cat.tmp
 
To delete all the files in a directory named TEST on drive C, you can use
either of the following commands:
 
    del c:\test
 
    del c:\test\*.*
 

 
                                  DELTREE
 
Deletes a directory and all the files and subdirectories that are in it.
 
Syntax
 
    DELTREE [/Y] [drive:]path [[drive:]path[...]]
 
Parameter
 
drive:path
    Specifies the name of the directory you want to delete. The DELTREE
    command will delete all the files contained in the directory you
    specify, as well as all subdirectories and files in the subdirectories
    subordinate to this directory. You can specify more than one directory.
 
Switch
 
/Y
    Carries out the DELTREE command without first prompting you to confirm
    the deletion.
 
Related Commands
 
For information about removing a directory, see the <RMDIR> command.
 
For information about deleting files, see the <DEL> command.
 

 
                               DELTREENotes
 
DELTREE and hidden, system, and read-only attributes
 
The DELTREE command deletes all files contained in a directory or
subdirectory, regardless of attributes.
 
Errorlevel parameters
 
If DELTREE successfully deleted the directory, it returns an ERRORLEVEL
value of 0.
 
Using wildcards with DELTREE
 
You can use wildcards with the DELTREE command, but use them with extreme
caution. If you specify a wildcard that matches both directory names and
filenames, both the directories and files will be deleted. Before specifying
wildcards with the DELTREE command, use the DIR command to view the files
and directories you will delete.
 

 
                              DELTREEExample
 
To delete the TEMP directory on drive C, including all files and
subdirectories of the TEMP directory, type the following at the command
prompt:
 
    deltree c:\temp
 

 
                                   DEVICE
 
Loads the device driver you specify into memory. You can use this command
only in your CONFIG.SYS file.
 
Syntax
 
    DEVICE=[drive:][path]filename [dd-parameters]
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the device driver you want to load.
 
[dd-parameters]
    Specifies any command-line information required by the device driver.
 
Related Command
 
For information about loading device drivers into the upper memory area, see
the <DEVICEHIGH> command.
 

 
                               DEVICENotes
 
Using standard device drivers
 
The standard installable device drivers provided with MS-DOS 6 are
<ANSI.SYS>, <DISPLAY.SYS>, <DRIVER.SYS>, <DBLSPACE.SYS>, <EGA.SYS>,
<EMM386.EXE>, <HIMEM.SYS>, <INTERLNK.EXE>, <POWER.EXE>, <RAMDRIVE.SYS>,
<SETVER.EXE>, and <SMARTDRV.EXE>.
 
The files COUNTRY.SYS and KEYBOARD.SYS are not device drivers. They are data
files for the COUNTRY and KEYB commands, respectively. Do not try to load
either of these files with the DEVICE command. If you do, your system halts,
and you cannot restart MS-DOS. For information about loading COUNTRY.SYS,
see the <COUNTRY> command. For information about loading KEYBOARD.SYS, see
the <KEYB> command.
 
Installing device drivers for other products
 
When you purchase a mouse, a scanner, or a similar product, the manufacturer
usually includes device-driver software. To install a device driver, specify
its location and name on a DEVICE command line.
 
Installing a third-party console driver
 
If you install both DISPLAY.SYS and a third-party console driver, such as
VT52.SYS, the third-party device driver must be installed first. Otherwise,
the third-party device driver may disable DISPLAY.SYS.
 
Installing multiple device drivers
 
Sometimes one installable device driver will require that it be loaded
before or after another in your CONFIG.SYS file. For example, EMM386.EXE
requires HIMEM.SYS to be loaded first. If the device driver requires that
another device driver be loaded before it, make sure the commands are listed
in the correct order in your CONFIG.SYS file.
 

 
                              DEVICEExample
 
If you plan to use an ANSI escape sequence to control the screen and
keyboard, you should add the following command to your CONFIG.SYS file
(assuming MS-DOS files are in the DOS directory on drive C):
 
    device=c:\dos\ansi.sys
 

 
                                 DEVICEHIGH
 
Loads device driver you specify into the upper memory area. Loading a device
driver into the upper memory area frees more bytes of conventional memory
for other programs. If upper memory is not available, the DEVICEHIGH command
functions just like the DEVICE command.
 
You can use this command only in your CONFIG.SYS file.
 
Syntax
 
    DEVICEHIGH [drive:][path]filename [dd-parameters]
 
To specify the region(s) of memory into which to load the device driver, use
the following syntax:
 
    DEVICEHIGH [[/L:region1[,minsize1][;region2[,minsize2] [/S]]=
    [drive:][path]filename [dd-parameters]
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the device driver you want to load
    into the upper memory area.
 
dd-parameters
    Specifies any command-line information required by the device driver.
 
Switches
 
/L:region1[,minsize1][;region2[,minsize2]...
    Specifies one or more regions of memory into which to load the device
    driver. By default, MS-DOS loads the driver into the largest free
    upper-memory block (UMB) and makes all other UMBs available for the
    driver's use. You can use the /L switch to load the device driver into a
    specific region of memory or to specify which region(s) the driver can
    use.
 
    To load the driver into the largest block in a specific region of upper
    memory, specify the region number after the /L switch. For example, to
    load the driver into the largest free block in region 4, you would type
    /L:4. (To list the free areas of memory, type MEM /F at the command
    prompt.)
 
    When loaded with the /L switch, a device driver can use only the
    specified memory region. Some device drivers use more than one area of
    memory; for those drivers, you can specify more than one region. (To
    find out how a particular device driver uses memory, issue the MEM /M
    command and specify the device-driver name as an argument.) To specify
    two or more regions, separate the block numbers with a semicolon (;).
    For example, to use blocks 2 and 3, you would type /L:2;3.
 
    Normally, MS-DOS loads a driver into a UMB in the specified region only
    if that region contains a UMB larger than the driver's load size
    (usually equal to the size of the executable program file). If the
    driver requires more memory while running than it does when loaded, you
    can use the minsize parameter to ensure that the driver will not be
    loaded into a UMB that is too small for it. If you specify a value for
    minsize, MS-DOS loads the driver into that region only if it contains a
    UMB that is larger than both the driver's load size and the minsize
    value.
 
/S
    Shrinks the UMB to its minimum size while the driver is loading. Using
    this switch makes the most efficient use of memory. This switch is
    normally used only by the MemMaker program, which can analyze a device
    driver's memory use to determine whether the /S switch can safely be
    used when loading that driver. This switch can be used only in
    conjunction with the /L switch and affects only UMBs for which a minimum
    size was specified.
 
Related Commands
 
For information about loading programs into the upper memory area, see the
<LOADHIGH> command.
 
For information about loading device drivers into conventional memory, see
the <DEVICE> command.
 
For information about using the MemMaker program to move programs to the
upper memory area, see the <MEMMAKER> command.
 

 
                             DEVICEHIGHNotes
 
Using the DOS=UMB command
 
To use the DEVICEHIGH command, you must also include the DOS=UMB command in
your CONFIG.SYS file. If you do not specify this command, all device drivers
are loaded into conventional memory, as if you had used the DEVICE command.
For more information, see the <DOS> command.
 
Using MemMaker to optimize upper memory area automatically
 
The MemMaker program, included with MS-DOS 6, automatically optimizes your
system's memory. MemMaker surveys the upper memory area, analyzes the memory
use of your drivers and programs, and determines which drivers and programs
fit best into the available UMBs. MemMaker then changes selected DEVICE
commands in your CONFIG.SYS file to DEVICEHIGH commands and adds /L and /S
switches as necessary. For more information about using MemMaker to optimize
your computer's memory, see "Making More Memory Available" in the MS-DOS 6
User's Guide.
 
Using MS-DOS 5 DEVICEHIGH syntax
 
The version of DEVICEHIGH provided with MS-DOS 5 used the following syntax:
 
    DEVICEHIGH SIZE=hexsize [drive:][path] filename [dd-parameters]
 
Although the MS-DOS 5 DEVICEHIGH syntax will still work with MS-DOS 6, it is
strongly recommended that you use the current DEVICEHIGH syntax whenever
possible.
 
Installing HIMEM.SYS and a UMB provider
 
To load a device driver into the upper memory area, your computer must have
extended memory. You must use the DEVICE command once to install the
HIMEM.SYS device driver and then again to install an upper-memory-block
(UMB) provider. These commands must appear before the DEVICEHIGH command in
your CONFIG.SYS file. If your computer has an 80386 or 80486 processor, you
can use EMM386.EXE as the UMB provider. If your computer has a different
processor, you must supply a different UMB provider.
 
If no upper memory area is available
 
If there is not enough upper memory area available to load the device driver
you specified with the DEVICEHIGH command, MS-DOS will load it into
conventional memory (as if you had used the DEVICE command).
 

 
                            DEVICEHIGHExamples
 
The following CONFIG.SYS commands make the upper memory area available for
running device drivers and programs:
 
    device=c:\dos\himem.sys
    device=c:\dos\emm386.exe ram
    dos=umb
 
The following command directs MS-DOS to load a device driver named
MYDRIV.SYS into the upper memory area of an 80386 computer:
 
    devicehigh=mydriv.sys
 
The following CONFIG.SYS command directs MS-DOS to run the MOUSE.SYS driver
in the upper memory area and load the driver into upper memory block 2:
 
    devicehigh=/L:2 C:\drivers\mouse.sys
 
The following command loads the MYDRIV.SYS driver into region 1 of upper
memory, and also allows the driver to use region 3 if it needs to:
 
    devicehigh=/L:1;3 C:\util\mydriv.sys
 
The following command loads the same driver into upper memory regions 1 and
3, but only if each region is at least 30 bytes in size:
 
    devicehigh=/L:1,30;3,30 C:\util\mydriv.sys
 

 
                                    DIR
 
Displays a list of the files and subdirectories that are in the directory
you specify.
 
When you use DIR without parameters or switches, it displays the disk's
volume label and serial number; one directory or filename per line,
including the filename extension, the file size in bytes, and the date and
time the file was last modified; and the total number of files listed, their
cumulative size, and the free space (in bytes) remaining on the disk.
 
Syntax
 
    DIR [drive:][path][filename] [/P] [/W]
    [/A[[:]attributes]][/O[[:]sortorder]] [/S] [/B] [/L] [/C]
 
Parameters
 
[drive:][path]
    Specifies the drive and directory for which you want to see a listing.
 
[filename]
    Specifies a particular file or group of files for which you want to see
    a listing.
 
Switches
 
/P
    Displays one screen of the listing at a time. To see the next screen,
    press any key.
 
/W
    Displays the listing in wide format, with as many as five filenames or
    directory names on each line.
 
/A[[:] attributes]
    Displays only the names of those directories and files with the
    attributes you specify. If you omit this switch, DIR displays the names
    of all files except hidden and system files. If you use this switch
    without specifying attributes, DIR displays the names of all files,
    including hidden and system files. The following list describes each of
    the values you can use for attributes. The colon (:) is optional. Use
    any combination of these values, and do not separate the values with
    spaces.
 
    H
        Hidden files
 
    -H
        Files that are not hidden
 
    S
        System files
 
    -S
        Files other than system files
 
    D
        Directories
 
    -D
        Files only (not directories)
 
    A
        Files ready for archiving (backup)
 
    -A
        Files that have not changed since the last backup
 
    R
        Read-only files
 
    -R
        Files that are not read-only
 
/O[[:] sortorder]
    Controls the order in which DIR sorts and displays directory names and
    filenames. If you omit this switch, DIR displays the names in the order
    in which they occur in the directory. If you use this switch without
    specifying sortorder, DIR displays the names of the directories, sorted
    in alphabetic order, and then displays the names of files, sorted in
    alphabetic order. The colon (:) is optional. The following list
    describes each of the values you can use for sortorder. Use any
    combination of the values, and do not separate these values with
    spaces.
 
    N
        In alphabetic order by name
 
    -N
        In reverse alphabetic order by name (Z through A)
 
    E
        In alphabetic order by extension
 
    -E
        In reverse alphabetic order by extension (Z through A)
 
    D
        By date and time, earliest first
 
    -D
        By date and time, latest first
 
    S
        By size, smallest first
 
    -S
        By size, largest first
 
    G
        With directories grouped before files
 
    -G
        With directories grouped after files
 
    C
        By compression ratio, lowest first.
 
    -C
        By compression ratio, highest first.
 
/S
    Lists every occurrence, in the specified directory and all
    subdirectories, of the specified filename.
 
/B
    Lists each directory name or filename, one per line (including the
    filename extension). This switch displays no heading information and no
    summary. The /B switch overrides the /W switch.
 
/L
    Displays unsorted directory names and filenames in lowercase. This
    switch does not convert extended characters to lowercase.
 
/C[H]
    Displays the compression ratio of files compressed using Doublespace,
    based on an 8K cluster size. The optional H switch displays the
    compression ratio of files compressed using Doublespace, based on the
    cluster size of the host drive. The /C[H] switch is ignored when used
    with the /W or /B switch.
 
Related Commands
 
For information about displaying the directory structure of a path or disk,
see the <TREE> command.
 
For information about compressing disks, see the <DBLSPACE> command.
 

 
                                 DIRNotes
 
Using wildcards with DIR
 
You can use wildcards (* and ?) to display a listing of a subset of files
and subdirectories. For an example illustrating the use of a wildcard, see
the "Examples" screen.
 
Specifying file display attributes
 
If you specify the /A switch with more than one value in attributes, DIR
displays the names of only those files with all the specified attributes.
For example, if you specify the /A switch with the R and -H values for
attributes by using either /A:R-H or /AR-H, DIR displays only the names of
read-only files that are not hidden.
 
Specifying filename sorting
 
If you specify more than one sortorder value, DIR sorts the filenames by the
first criterion first, then by the second criterion, and so on. For example,
if you specify the /O switch with the E and -S values for sortorder by using
either /O:E-S or /OE-S, DIR sorts the names of directories and files by
extension, with the largest first, and displays the final result. The
alphabetic sorting by extension causes filenames with no extensions to
appear first, then directory names, then filenames with extensions.
 
Setting date and time formats
 
The date and time formats used by DIR depend on the country setting you use
in your CONFIG.SYS file. If you don't use the COUNTRY command, the formats
are those for the United States.
 
Using redirection symbols and pipes
 
When you use a redirection symbol (>) to send DIR output to a file or a pipe
(|) to send DIR output to another command, use the /A:-D and /B switches to
list only the filenames. You can use the filename parameter with the /B and
/S switches to specify that DIR is to search the current directory and its
subdirectories for all filenames that match filename. DIR lists only the
drive letter, directory name, filename, and filename extension, one path per
line, for each filename it finds.
 
Before using a pipe for redirection, you should set the TEMP environment
variable in your AUTOEXEC.BAT file. Otherwise, the temporary file will
appear in the directory listing.
 
Presetting DIR parameters and switches
 
You can preset DIR parameters and switches by including the SET command with
the DIRCMD environment variable in your AUTOEXEC.BAT file. You can use any
valid combination of DIR parameters and switches with the SET DIRCMD
command, including the location and name of a file.
 
For example, to use the DIRCMD environment variable to set the wide display
format (/W) as the default format, include the following command in your
AUTOEXEC.BAT file:
 
    set dircmd=/w
 
For a single use of the DIR command, you can override a switch set by using
the DIRCMD environment variable. To do so, you use the same switch on the
DIR command line, but you must also precede the switch letter with a minus
sign, as the following example shows:
 
    dir /-w
 
You can change the DIRCMD default settings by typing the SET command at the
command prompt with a new parameter or switch after the equal sign (=). The
new default settings are effective for all subsequent DIR commands until you
use SET DIRCMD again on the command line or until you restart MS-DOS.
 
To clear all default settings, type the following command:
 
    set dircmd=
 
You can view the current settings of the DIRCMD environment variable by
typing the following command:
 
    set
 
MS-DOS displays a list of environment variables and their settings. For more
information about setting environment variables, see the <SET> command.
 

 
                               DIRExamples
 
Suppose you want to display all files and directories in a directory,
including hidden or system files. To specify this display, type the
following command:
 
    dir /a
 
Suppose you want DIR to display one directory listing after another, until
it has displayed the listing for every directory on the disk in the current
drive. Suppose also that you want DIR to alphabetize each directory listing,
display it in wide format, and pause after each screen. To specify such a
display, be sure the root directory is the current directory and then type
the following command:
 
    dir /s/w/o/p
 
DIR lists the name of the root directory, the names of the subdirectories of
the root directory, and the names of the files in the root directory
(including extensions). Then DIR lists the subdirectory names and filenames
in each subdirectory in the directory tree.
 
To alter the preceding example so that DIR displays the filenames and
extensions but omits the directory names, type the following command:
 
    dir /s/w/o/p/a:-d
 
To print a directory listing, type the redirection symbol and PRN after any
form of the DIR command, as the following example shows:
 
    dir > prn
 
When you specify PRN on the DIR command line, the directory listing is sent
to the printer attached to the LPT1 port. If your printer is attached to a
different port, you must replace PRN with the name of the correct port.
 
You can also redirect output of the DIR command to a file by replacing PRN
with a filename. A path is also accepted on the command line. For example,
to direct DIR output to the file DIR.DOC in the RECORDS directory, type the
following command:
 
    dir > \records\dir.doc
 
If DIR.DOC does not exist, MS-DOS creates it, unless the directory RECORDS
also does not exist. In that case, MS-DOS displays the following message:
 
    File creation error
 
To display a list of all the filenames with the .TXT extension in all
directories on drive C, type the following command:
 
    dir c:\*.txt /w/o/s/p
 
DIR displays, in wide format, an alphabetized list of the matching filenames
in each directory and pauses each time the screen fills, until you press a
key to continue.
 

 
                                  DISKCOMP
 
Compares the contents of two floppy disks.
 
This command performs a track-by-track comparison. DISKCOMP determines the
number of sides and sectors per track to compare based on the format of the
first disk you specify.
 
Syntax
 
    DISKCOMP [drive1: [drive2:]] [/1] [/8]
 
Parameters
 
drive1:
    Specifies the drive containing one of the floppy disks.
 
drive2:
    Specifies the drive containing the other floppy disk.
 
Switches
 
/1
    Compares only the first sides of the disks, even if the disks are
    double-sided and the drives can read double-sided disks.
 
/8
    Compares only the first 8 sectors per track, even if the disks contain 9
    or 15 sectors per track.
 
Related Command
 
For information about comparing two files, see the <FC> command.
 

 
                              DISKCOMPNotes
 
Invalid drive for DISKCOMP
 
The DISKCOMP command works only with floppy disks. You cannot use DISKCOMP
with a hard disk. If you specify a hard disk drive for drive1 or drive2,
DISKCOMP displays the following error message:
 
    Invalid drive specification
    Specified drive does not exist
    or is non-removable
 
DISKCOMP messages
 
If all tracks on the two disks being compared are the same, DISKCOMP
displays the following message:
 
    Compare OK
 
If the tracks are not the same, DISKCOMP displays a message similar to the
following:
 
    Compare error on
    side 1, track 2
 
When DISKCOMP completes the comparison, it displays the following message:
 
    Compare another diskette (Y/N)?
 
If you press Y, DISKCOMP prompts you to insert disks for the next
comparison. If you press N, DISKCOMP stops the comparison.
 
DISKCOMP ignores a disk's volume number when it makes the comparison.
 
Omitting drive parameters
 
If you omit the drive2 parameter, DISKCOMP uses the current drive for
drive2. If you omit both drive parameters, DISKCOMP uses the current drive
for both. If the current drive is the same as drive1, DISKCOMP prompts you
to swap disks as necessary.
 
Using one drive for the comparison
 
If you specify the same floppy disk drive for drive1 and drive2, DISKCOMP
does a comparison by using one drive and prompts you to insert the disks as
necessary. You might have to swap the disks more than once, depending on the
capacity of the disks and the amount of available memory.
 
Comparing different types of disks
 
DISKCOMP cannot compare a single-sided disk with a double-sided disk or a
high-density disk with a double-density disk. If the disk in drive1 is not
of the same type as the disk in drive2, DISKCOMP displays the following
message:
 
    Drive types or diskette types not compatible
 
Using DISKCOMP with networks and redirected drives
 
DISKCOMP does not work on a network drive or on a drive created or affected
by a SUBST command. If you attempt to use DISKCOMP with a network drive or a
drive created by the SUBST command, DISKCOMP displays an error message.
 
Comparing an original disk with a copy
 
When you use DISKCOMP with a disk that you made with the COPY command,
DISKCOMP may display a message similar to the following:
 
    Compare error on
    side 0, track 0
 
This type of error can occur even if the files on the disks are identical.
Although the COPY command duplicates information, it doesn't necessarily
place it in the same location on the destination disk. For more information
about comparing individual files on two disks, see the <FC> command.
 
DISKCOMP exit codes
 
The following list shows each exit code and gives a brief description of its
meaning:
 
0
    The disks are the same.
 
1
    Differences were found.
 
2
    The user pressed CTRL+C to stop the process.
 
3
    A critical error occurred.
 
4
    An initialization error occurred.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by DISKCOMP. For an example of a
batch program that processes exit codes, see the <CHOICE> command.
 

 
                             DISKCOMPExample
 
If your system has only one floppy disk drive, drive A, and you want to
compare two disks, type the following command:
 
    diskcomp a: a:
 
DISKCOMP prompts you to insert each disk, as required.
 

 
                                  DISKCOPY
 
Copies the entire contents of one floppy disk to another floppy disk.
DISKCOPY writes over the existing contents of the destination disk as it
copies the new information to it.
 
This command determines the number of sides to copy based on the source
drive and disk.
 
Syntax
 
    DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
 
Parameters
 
drive1:
    Specifies the drive containing the source disk.
 
drive2:
    Specifies the drive containing the destination disk.
 
Switches
 
/1
    Copies only the first side of a disk.
 
/V
    Verifies that the information is copied correctly. Use of this switch
    slows the copying process.
 
/M
    Forces DISKCOPY to use only conventional memory for interim storage. By
    default, DISKCOPY uses your hard disk as an interim storage area so you
    don't have to swap floppy disks.
 
Related Commands
 
For information about copying one or more files, see the <COPY> command.
 
For information about copying directories and subdirectories, see the
<XCOPY> command.
 
For information about comparing two disks to see if they are identical, see
the <DISKCOMP> command.
 

 
                              DISKCOPYNotes
 
Invalid drive for DISKCOPY
 
The DISKCOPY command works only with uncompressed removable disks, such as
floppy disks. You cannot use DISKCOPY with a hard disk or a network drive.
If you specify a hard disk drive for drive1 or drive2, DISKCOPY displays the
following error message:
 
    Invalid drive specification
    Specified drive does not exist
    or is non-removable
 
DISKCOPY messages
 
The DISKCOPY command prompts you to insert the source and destination disks
and waits for you to press any key before continuing.
 
After copying, DISKCOPY displays the following message:
 
    Copy another diskette (Y/N)?
 
If you press Y, DISKCOPY prompts you to insert source and destination disks
for the next copy operation. To stop the DISKCOPY process, press N.
 
If you are copying to an unformatted floppy disk in drive2, DISKCOPY formats
the disk with the same number of sides and sectors per track as are on the
disk in drive1. DISKCOPY displays the following message while it formats the
disk and copies the files:
 
    Formatting while copying
 
If the capacity of the source disk is greater than that of the destination
disk and your computer can detect this difference, DISKCOPY displays the
following message:
 
    Drive types or diskette types not compatible
 
Disk serial numbers
 
If the source disk has a volume serial number, DISKCOPY creates a new volume
serial number for the destination disk and displays the number when the copy
operation is complete.
 
Omitting drive parameters
 
If you omit the drive2 parameter, DISKCOPY uses the current drive as the
destination drive. If you omit both drive parameters, DISKCOPY uses the
current drive for both. If the current drive is the same as drive1, DISKCOPY
prompts you to swap disks as necessary.
 
Using one drive for copying
 
When you use a single drive as both the source and destination drive,
DISKCOPY stores an image of the source disk in the directory specified by
the TEMP environment variable. If there is not enough space on that drive to
contain the source-disk image, you might have to swap floppy disks. DISKCOPY
prompts you each time you should insert a disk in the drive. DISKCOPY reads
from the source disk, writes to the destination disk, and prompts you to
insert the source disk again. This process continues until the entire disk
has been copied.
 
Avoiding disk fragmentation
 
Because DISKCOPY makes an exact copy of the source disk on the destination
disk, any fragmentation on the source disk is transferred to the destination
disk. Fragmentation is the presence of small areas of unused disk space
between existing files on a disk.
 
A fragmented source disk can slow down the finding, reading, or writing of
files. To avoid transferring fragmentation from one disk to another, use
either the COPY command or the XCOPY command to copy your disk. Because COPY
and XCOPY copy files sequentially, the new disk is not fragmented.
 
Copying Startup disks
 
If you use the DISKCOPY command to copy a startup disk, the copy will also
be a startup disk. If you use COPY or XCOPY to copy a startup disk, the copy
usually will not be a startup disk.
 
DISKCOPY exit codes
 
The following list shows each exit code (ERRORLEVEL parameter) and gives a
brief description of its meaning:
 
0
    The copy operation was successful.
 
1
    A nonfatal read/write error occurred.
 
2
    The user pressed CTRL+C to stop the process.
 
3
    A critical error occurred.
 
4
    An initialization error occurred.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by DISKCOPY. For an example of a
batch program that processes exit codes, see the <CHOICE> command.
 

 
                                DISPLAY.SYS
 
Enables you to display international character sets on EGA, VGA, and LCD
monitors. This device driver must be loaded by a <DEVICE> or <DEVICEHIGH>
command in your CONFIG.SYS file.
 
For an introduction to preparing your screen and keyboard for character
sets, see the chapter "Customizing for International Use" in the MS-DOS 6
User's Guide.
 
Syntax
 
    DEVICE=[drive:][path]DISPLAY.SYS CON[:]=(type[,[hwcp][,n]])
 
    DEVICE=[drive:][path]DISPLAY.SYS CON[:]=(type[,[hwcp][,(n,m)]])
 
Parameters
 
[drive:][path]
    Specifies the location of the DISPLAY.SYS file.
 
type
    Specifies the display adapter in use. Valid values include EGA and LCD.
    The EGA value supports both EGA and VGA display adapters. If you omit
    the type parameter, DISPLAY.SYS checks the hardware to determine which
    display adapter is in use. You can also specify CGA and MONO as values
    for type, but they have no effect because character set switching is not
    enabled for these devices.
 
hwcp
    Specifies the number of the character set that your hardware supports.
    The following list shows the character sets that MS-DOS supports and the
    country or language for each:
 
        437    United States
        850    Multilingual (Latin I)
        852    Slavic (Latin II)
        860    Portuguese
        863    Canadian-French
        865    Nordic
 
    Additional character sets are supported by the EGA2.CPI file. For more
    information, see the README.TXT file.
 
    For more information about using character sets, see the appendix
    "Keyboard Layouts and Character Sets" in the MS-DOS 6 User's Guide.
 
n
    Specifies the number of character sets the hardware can support in
    addition to the primary character set specified for the hwcp parameter.
    Valid values for n are in the range 0 through 6. This value depends on
    your hardware. For EGA display adapters, the maximum value for n is 6;
    for LCD display adapters, the maximum value for n is 1.
 
m
    Specifies the number of subfonts the hardware supports for each code
    page. The default value is 2 if type is EGA, and 1 if type is LCD.
 

 
                             DISPLAY.SYSNotes
 
Using DISPLAY.SYS with monochrome or CGA display adapters
 
Because monochrome and CGA display adapters do not support character set
switching, using DISPLAY.SYS with either type of adapter has no effect.
 
Installing a third-party console driver
 
If you install both DISPLAY.SYS and a third-party console driver, such as
VT52.SYS, the third-party device driver must be installed first. Otherwise,
the third-party device driver may disable DISPLAY.SYS.
 

 
                            DISPLAY.SYSExample
 
Suppose you want DISPLAY.SYS to support an EGA display adapter with the
United States hardware character set (437) and the potential for two
additional MS-DOS character sets. To do this and to specify that DISPLAY.SYS
is in the DOS directory on drive C, add the following line to your
CONFIG.SYS file:
 
    device=c:\dos\display.sys con=(ega,437,2)
 

 
                                    DOS
 
Specifies that MS-DOS should maintain a link to the upper memory area, load
part of itself into the high memory area (HMA), or both. You can use this
command only in your CONFIG.SYS file.
 
Syntax
 
    DOS=HIGH|LOW[,UMB|,NOUMB]
 
    DOS=[HIGH,|LOW,]UMB|NOUMB
 
Parameters
 
UMB|NOUMB
    Specifies whether MS-DOS should manage upper memory blocks (UMBs)
    created by a UMB provider such as EMM386.EXE. The UMB parameter
    specifies that MS-DOS should manage UMBs, if they exist. The NOUMB
    parameter specifies that MS-DOS should not manage UMBs. The default
    setting is NOUMB.
 
HIGH|LOW
    Specifies whether MS-DOS should attempt to load a part of itself into
    the HMA (HIGH) or keep all of MS-DOS in conventional memory (LOW). The
    default setting is LOW.
 
Related Commands
 
For information about loading a device driver into the upper memory area,
see the <DEVICEHIGH> command.
 
For information about loading a program into the upper memory area, see the
<LOADHIGH> command.
 

 
                                 DOSNotes
 
Must install HIMEM.SYS for DOS=UMB or DOS=HIGH
 
You must install the HIMEM.SYS device driver or another extended memory
manager before you specify either DOS=UMB or DOS=HIGH.
 
Using the UMB parameter
 
You must specify the DOS=UMB command in order to load programs and device
drivers into the upper memory area. Using the upper memory area frees more
space in conventional memory for programs. In addition to using this
command, you must install an upper-memory-block (UMB) provider. If your
computer has an 80386 or 80486 processor, you can use <EMM386.EXE> for your
UMB provider.
 
If you specify DOS=UMB and no UMB provider is installed, MS-DOS will not
display an error message.
 
Using the HIGH parameter
 
If you specify the HIGH parameter, MS-DOS attempts to load part of itself
into the HMA. Loading part of MS-DOS into the HMA frees conventional memory
for programs. If you specify DOS=HIGH and MS-DOS is unable to use the HMA,
the following message will appear:
 
    HMA not available
    Loading DOS low
 
Combining parameters
 
You can include more than one parameter on a single DOS command line, using
commas to separate them. For example, the following command lines are
valid:
 
    dos=umb,low
 
    dos=high,umb
 
You can place the DOS command anywhere in your CONFIG.SYS file.
 

 
                                   DOSKEY
 
Loads the Doskey program into memory. The Doskey program recalls MS-DOS
commands and enables you to edit command lines and create and run macros.
 
Doskey is a memory-resident program. When installed, Doskey occupies about 3
kilobytes of resident memory.
 
Syntax
 
    DOSKEY [/REINSTALL] [/BUFSIZE=size] [/MACROS]
    [/HISTORY][/INSERT|/OVERSTRIKE] [macroname=[text]]
 
To start the Doskey program and use the default settings, use the following
syntax:
 
    DOSKEY
 
Parameter
 
macroname=[text]
    Creates a macro that carries out one or more MS-DOS commands (a Doskey
    macro). Macroname specifies the name you want to assign to the macro.
    Text specifies the commands you want to record.
 
Switches
 
/REINSTALL
    Installs a new copy of the Doskey program, even if one is already
    installed. In the latter case, the /REINSTALL switch also clears the
    buffer.
 
/BUFSIZE=size
    Specifies the size of the buffer in which Doskey stores commands and
    Doskey macros. The default size is 512 bytes. The minimum buffer size is
    256 bytes.
 
/MACROS
    Displays a list of all Doskey macros. You can use a redirection symbol
    (>) with the /MACROS switch to redirect the list to a file. You can
    abbreviate the /MACROS switch as /M.
 
/HISTORY
    Displays a list of all commands stored in memory. You can use a
    redirection symbol (>) with the /HISTORY switch to redirect the list to
    a file. You can abbreviate the /HISTORY switch as /H.
 
/INSERT|/OVERSTRIKE
    Specifies whether new text you type is to replace old text. If you use
    the /INSERT switch, new text that you type on a line is inserted into
    old text (as if you had pressed the INSERT key). If you use the
    /OVERSTRIKE switch, new text replaces old text. The default setting is
    /OVERSTRIKE.
 

 
                               DOSKEYNotes
 
Recalling a command
 
To recall a command, you can use any of the following keys after loading
Doskey into memory:
 
UP ARROW
    Recalls the MS-DOS command you used before the one displayed.
 
DOWN ARROW
    Recalls the MS-DOS command you used after the one displayed.
 
PAGE UP
    Recalls the oldest MS-DOS command you used in the current session.
 
PAGE DOWN
    Recalls the most recent MS-DOS command you used.
 
Editing the command line
 
With the Doskey program, you can edit the current command line. The
following list describes the Doskey editing keys and their functions:
 
LEFT ARROW
    Moves the cursor back one character.
 
RIGHT ARROW
    Moves the cursor forward one character.
 
CTRL+LEFT ARROW
    Moves the cursor back one word.
 
CTRL+RIGHT ARROW
    Moves the cursor forward one word.
 
HOME
    Moves the cursor to the beginning of the line.
 
END
    Moves the cursor to the end of the line.
 
ESC
    Clears the command from the display.
 
F1
    Copies one character from the template to the MS-DOS command line. (The
    template is a memory buffer that holds the last command you typed.)
 
F2
    Searches forward in the template for the next key you type after
    pressing F2. Doskey inserts the text from the template up to but not
    including the character you specify.
 
F3
    Copies the remainder of the template to the command line. Doskey begins
    copying characters from the position in the template that corresponds to
    the position indicated by the cursor on the command line.
 
F4
    Deletes characters, beginning with the current character position, up to
    a character you specify. To use this editing key, press F4 and type a
    character. Doskey deletes up to, but not including, that character.
 
F5
    Copies the current command into the template and clears the command
    line.
 
F6
    Places an end-of-file character (CTRL+Z) at the current position on the
    command line.
 
F7
    Displays all commands stored in memory, with their associated numbers.
    Doskey assigns these numbers sequentially, beginning with 1 for the
    first (oldest) command stored in memory.
 
ALT+F7
    Deletes all commands stored in memory.
 
F8
    Searches memory for a command that you want Doskey to display. To use
    this editing key, type the first character, or the first few characters,
    of the command you want Doskey to search for and then press F8. Doskey
    displays the most recent command that begins with the text you typed.
    Press F8 repeatedly to cycle through all the commands that start with
    the characters you specified.
 
F9
    Prompts you for a command number and displays the command associated
    with the number you specify. To display all the numbers and their
    associated commands, press F7.
 
ALT+F10
    Deletes all macro definitions.
 
Specifying a default insert mode
 
If you press the INSERT key, you can type text on the Doskey command line in
the middle of old text without replacing the old text. However, once you
press ENTER, Doskey returns your keyboard to replace mode. You must press
INSERT again to return to insert mode.
 
The /INSERT switch puts your keyboard in insert mode each time you press
ENTER. Your keyboard effectively remains in insert mode until you use the
/OVERSTRIKE switch. You can temporarily return to replace mode by pressing
the INSERT key; but once you press ENTER, Doskey returns your keyboard to
insert mode.
 
The cursor changes shape when you use the INSERT key to change from one mode
to the other.
 
Creating a macro
 
You can use the Doskey program to create macros that carry out one or more
MS-DOS commands.
 
You can use the following special characters to control command operations
when defining a macro:
 
$G or $g
    Redirects output. Use either of these special characters to send output
    to a device or a file instead of to the screen. This character is
    equivalent to the redirection symbol for output (>).
 
$G$G or $g$g
    Appends output to the end of a file. Use either of these special double
    characters to append output to an existing file rather than replace the
    data in the file. These double characters are equivalent to the "append"
    redirection symbol for output (>>).
 
$L or $l
    Redirects input. Use either of these special characters to read input
    from a device or a file instead of from the keyboard. This character is
    equivalent to the redirection symbol for input (<).
 
$B or $b
    Sends macro output to a command. Using one of these special characters
    is equivalent to using the pipe (|) on a command line.
 
$T or $t
    Separates commands. Use either of these special characters to separate
    commands when you are creating macros or typing commands on the Doskey
    command line.
 
$$
    Specifies the dollar-sign character ($).
 
$1 through $9
    Represents any command-line information you want to specify when you run
    the macro. The special characters $1 through $9 are batch parameters,
    which make it possible for you to use different data on the command line
    each time you run the macro. The $1 character in a DOSKEY command is
    similar to the %1 character in a batch program.
 
$*
    Represents all the command-line information you want to specify when you
    type the macro name. The special character $* is a replaceable parameter
    that is similar to the batch parameters $1 through $9, with one
    important difference. Here, everything you type on the command line
    after the macro name is substituted for the $* in the macro.
 
For example, to create a macro that performs a quick and unconditional
format of a disk, type the following command:
 
    doskey qf=format $1 /q /u
 
For information about quick and unconditional formatting, see the <FORMAT>
command.
 
You can use the DOSKEY command in a batch program to create a macro.
 
Running a macro
 
To run a macro, type the macro name starting at the first position on the
command line. If the macro was defined with $* or any of the batch
parameters $1 through $9, use a space to separate parameters.
 
You could run the QF macro created in the previous example to format a disk
in drive A quickly and unconditionally. To do so, you would type the
following command:
 
    qf a:
 
You cannot run a macro from a batch program.
 
Creating a macro with the same name as an MS-DOS command
 
You might want to create a macro that has the same name as an MS-DOS
command. This can be useful, for example, if you always use a certain
command with specific switches. To specify whether you want to run the macro
or the MS-DOS command, follow these guidelines:
 
  To run the macro, begin typing the macro name immediately after the
   command prompt, with no space between the prompt and the command name.
 
  To carry out the command, insert one or more spaces between the command
   prompt and the command name.
 
Deleting a macro
 
To delete a macro, type the following command:
 
    doskey macroname=
 

 
                              DOSKEYExamples
 
The /MACROS and /HISTORY switches are useful for creating batch programs to
save macros and commands. For example, to create a batch program named
MACINIT.BAT that includes all Doskey macros, type the following command:
 
    doskey /macros > macinit.bat
 
To use the MACINIT.BAT file, edit it to include the DOSKEY command at the
beginning of each macro line.
 
To create a batch program named TMP.BAT that contains recently used
commands, type the following command:
 
    doskey /history >  tmp.bat
 
To define a macro with multiple commands, use $T to separate commands, as
follows:
 
    doskey tx=cd\temp$tdir/w $*
 
In the preceding example, the TX macro changes the current directory to TEMP
and then displays a directory listing, using the wide display format. You
can use $* at the end of the macro to append other switches to the DIR
command when you run TX.
 
The following macro uses a batch parameter for a new directory name. The
macro first creates a new directory and then changes to it from the current
directory.
 
    doskey mc=md $1$tcd $1
 
To use the preceding macro to create and change to a directory named BOOKS,
type the following:
 
    mc books
 
To create a macro that uses batch parameters for moving a file or group of
files, type the following command:
 
    doskey mv=copy $1 $2 $t del $1
 
To create a macro that causes the MEM command to pause after each screen,
type the following command:
 
    doskey mem=mem $* /p
 

 
                                  DOSSHELL
 
Starts MS-DOS Shell, a graphical interface to MS-DOS.
 
MS-DOS Shell is included with MS-DOS 6.0 and earlier; it is not included
with MS-DOS 6.2. MS-DOS Shell is available in the MS-DOS 6.2 Resource Kit.
To order the Resource Kit, use the coupon in the back of your MS-DOS 6
User's Guide.
 
Syntax
 
To start MS-DOS Shell in text mode, use the following syntax:
 
    DOSSHELL [/T[:res[n]]] [/B]
 
To start MS-DOS Shell in graphics mode, use the following syntax:
 
    DOSSHELL [/G[:res[n]]] [/B]
 
Parameters
 
res
    Specifies a screen-resolution category. Valid values are L, M, and H to
    specify low, medium, and high resolution, respectively. The default
    value of res depends on your hardware.
 
n
    Specifies a screen resolution when there is more than one choice within
    a category. For information about the valid values for this parameter,
    see the "Notes" screen. The default value of n depends on your
    hardware.
 
Switches
 
/T
    Starts MS-DOS Shell in text mode.
 
/B
    Starts MS-DOS Shell using a black-and-white color scheme.
 
/G
    Starts MS-DOS Shell in graphics mode.
 

 
                              DOSSHELLNotes
 
Running MS-DOS Shell with Microsoft Windows
 
Do not start Microsoft Windows from within MS-DOS Shell. If you want to use
both Microsoft Windows and MS-DOS Shell, start Windows, and then start
MS-DOS Shell from within Windows.
 
Memory requirement
 
To run MS-DOS Shell, you should ensure that your computer has at least 384K
of available conventional memory.
 
Adjusting screen resolution
 
Once you have started MS-DOS Shell, you can adjust the screen resolution by
using the Display command on the Options menu. A dialog box displays the
mode (text or graphics), the number of lines, the resolution category, and
the specific number within each category for all possible screen-resolution
modes available for your hardware.
 
The DOSSHELL.INI file
 
Your current MS-DOS Shell settings for program items and groups, options,
screen resolution, colors, and so on, are stored in a file called
DOSSHELL.INI. The DOSSHELL.INI file will be updated whenever you make a
change or start a program item, so it must be located on a drive that is not
write-protected. You can specify the location of the DOSSHELL.INI file by
setting a DOSSHELL environment variable in your AUTOEXEC.BAT file.
 
For example, if the DOSSHELL.INI file is located in the DOS directory on
drive C, type the following command in your AUTOEXEC.BAT file:
 
    dosshell=c:\dos
 
If you customize MS-DOS Shell to suit your own needs, you should back up
this file regularly. If the DOSSHELL.INI file is deleted or corrupted, a new
file will be created the next time you start MS-DOS Shell.
 
Setting the location to store temporary files
 
When you run a program from MS-DOS Shell, temporary files are created in the
directory where the DOSSHELL.EXE file is located. You can specify that
temporary files should be placed elsewhere by setting the TEMP environment
variable in your AUTOEXEC.BAT file.
 

 
                             DOSSHELLExample
 
To start MS-DOS Shell in graphics mode, type the following command:
 
    dosshell /g
 

 
                                 DRIVER.SYS
 
Creates a logical drive that you can use to refer to a physical floppy disk
drive. This device driver must be loaded by a <DEVICE> or <DEVICEHIGH>
command in your CONFIG.SYS file.
 
A logical drive is a pointer to a physical disk drive in your system. The
logical drive is associated with a drive letter (for example, A or B). You
can specify parameters to describe the disk drive to MS-DOS.
 
Syntax
 
    DEVICE=[drive:][path]DRIVER.SYS /D:number [/C] [/F:factor] [/H:heads]
    [/S:sectors] [/T:tracks]
 
Parameter
 
[drive:][path]
    Specifies the location of the DRIVER.SYS file.
 
Switches
 
/D:number
    Specifies the number of the physical floppy disk drive. Valid values for
    number are in the range 0 through 127. The first physical floppy disk
    drive (drive A) is drive 0; a second physical floppy disk drive is drive
    1; a third physical floppy disk drive, which must be external, is drive
    2. For a computer with one floppy disk drive, drives A and B are both
    numbered 0; for a computer with multiple floppy disk drives, drive B is
    numbered 1.
 
/C
    Specifies that the physical disk drive can detect whether the drive door
    is closed (change-line support).
 
/F:factor
    Specifies the type of disk drive. Valid values for factor are as
    follows:
 
        0    160K/180K or 320K/360K
        1    1.2 megabyte (MB)
        2    720K (3.5-inch disk) or other
        7    1.44 MB (3.5-inch disk)
        9    2.88 MB (3.5-inch disk)
 
    The default value for factor is 2.
 
    Generally, if you use the /F switch, you can omit the /H, /S, and /T
    switches. Check the default values for these switches to make sure they
    are correct for the type of disk drive you are using. To determine the
    appropriate values for the disk drive, see the disk-drive manufacturer's
    documentation.
 
    If you specify the /H, /S, and /T switches, you can omit the /F switch.
 
/H:heads
    Specifies the number of heads in the disk drive. Valid values for heads
    are in the range 1 through 99. The default value is 2. To determine the
    correct value for your disk drive, see the disk-drive manufacturer's
    documentation.
 
/S:sectors
    Specifies the number of sectors per track. Valid values for sectors are
    in the range 1 through 99. The default value depends on the value of
    /F:factor, as follows:
 
        /F:0    /S:9
 
        /F:1    /S:15
 
        /F:2    /S:9
 
        /F:7    /S:18
 
        /F:9    /S:36
 
    To determine the correct value for your disk drive, see the disk-drive
    manufacturer's documentation.
 
/T:tracks
    Specifies the number of tracks per side on the block device. Valid
    values for tracks are in the range 1 through 999. The default value is
    80, unless /F:factor is 0, in which case the default value is 40. To
    determine the correct value for your disk drive, see the disk-drive
    manufacturer's documentation.
 

 
                             DRIVER.SYSNotes
 
Disk-drive change-line support
 
The term "change-line support" means that a physical disk drive can detect
when the drive door is opened and closed. Change-line support allows faster
MS-DOS operation with floppy disks. The /C switch indicates to MS-DOS that
the physical disk drive can support change-line error detection. To
determine whether your disk drive has change-line support, see the
disk-drive manufacturer's documentation.
 
Modifying or redefining a supported physical disk drive
 
For information about modifying the parameters of a physical disk drive that
is supported by your hardware, see the <DRIVPARM> command. You can also use
DRIVER.SYS to redefine a physical floppy disk drive.
 
Limitations on DRIVER.SYS
 
You cannot use DRIVER.SYS with hard disk drives. For information about
substituting a logical drive letter for a hard disk drive, see the <SUBST>
command.
 
Creating a duplicate logical drive
 
Suppose you want to use one physical floppy disk drive to copy files from
one floppy disk to another. Because you cannot copy from and to the same
logical drive by using the COPY or XCOPY command, you must assign a second
drive letter to that physical drive.
 
If your system has just one physical floppy disk drive, you do not need to
install DRIVER.SYS for this purpose. MS-DOS already assigns both logical
drive A and logical drive B to that drive. Just copy files from drive A to
drive B and switch disks when MS-DOS prompts you.
 
If your system has more than one floppy disk drive, then you need to use
DRIVER.SYS to assign a second drive letter to the physical floppy disk
drive.
 
Creating a new logical drive with different parameters
 
If you use DRIVER.SYS to assign a logical drive that has parameters
different from those of the previously assigned logical drive, then the
parameters of the previous logical drive will be invalid. Therefore, you
should no longer use the drive letter corresponding to the previous logical
drive.
 

 
                            DRIVER.SYSExamples
 
To add an external 720K drive to your system, add the following line to your
CONFIG.SYS file:
 
    device=driver.sys /d:2
 
Since no location is specified, MS-DOS searches for DRIVER.SYS in the root
directory of your startup drive.
 
Suppose you want to use a single 1.44-megabyte external disk drive to copy
files from one floppy disk to another. To do this, you must add two
identical DEVICE commands for DRIVER.SYS in your CONFIG.SYS file. This
procedure assigns two logical drive letters to the same physical drive. You
can then swap disks in the same drive during the copying process. The
following example shows how to do this:
 
    device=driver.sys /d:2 /f:7
    device=driver.sys /d:2 /f:7
 

 
                                  DRIVPARM
 
Defines parameters for devices such as disk and tape drives when you start
MS-DOS. You can use this command only in your CONFIG.SYS file.
 
The DRIVPARM command modifies the parameters of an existing physical drive.
It does not create a new logical drive. The settings specified in the
DRIVPARM command override the driver definitions for any previous block
device.
 
Syntax
 
    DRIVPARM=/D:number [/C] [/F:factor] [/H:heads] [/I] [/N] [/S:sectors]
    [/T:tracks]
 
Switches
 
/D:number
    Specifies the physical drive number. Values for number must be in the
    range 0 through 255 (for example, drive number 0 = drive A, 1 = drive B,
    2 = drive C, and so on).
 
/C
    Specifies that the drive can detect whether the drive door is closed.
 
/F:factor
    Specifies the drive type. The following list shows the valid values for
    factor and a brief description of each. The default value is 2.
 
    0
        160K/180K or 320K/360K
 
    1
        1.2 megabyte (MB)
 
    2
        720K (3.5-inch disk)
 
    5
        Hard disk
 
    6
        Tape
 
    7
        1.44 MB (3.5-inch disk)
 
    8
        Read/write optical disk
 
    9
        2.88 MB (3.5-inch disk)
 
/H:heads
    Specifies the maximum number of heads. Values for heads must be in the
    range 1 through 99. The default value depends upon the value you specify
    for /F:factor.
 
/I
    Specifies an electronically compatible 3.5-inch floppy disk drive.
    (Electronically compatible drives are installed on your computer and use
    your existing floppy-disk-drive controller.) Use the /I switch if your
    computer's ROM BIOS does not support 3.5-inch floppy disk drives.
 
/N
    Specifies a non-removable block device.
 
/S:sectors
    Specifies the number of sectors per track that the block device
    supports. Values for sectors must be in the range 1 through 99. The
    default value depends upon the value you specify for /F:factor.
 
/T:tracks
    Specifies the number of tracks per side that the block device supports.
    The default value depends upon the value you specify for /F:factor.
 

 
                              DRIVPARMNotes
 
Using the /I switch
 
Use the /I switch if your system does not support 3.5-inch floppy disk
drives. (Some IBM PC/AT-compatible systems do not have a ROM BIOS that
supports 3.5-inch floppy disk drives.)
 
Disk drive change-line support
 
Change-line support means that a physical disk drive can detect whether the
drive door is opened and closed. Change-line support improves performance by
letting MS-DOS know when one floppy disk has been replaced by another. The
/C switch allows MS-DOS to make use of change-line support. To find out
whether your disk drive has change-line support, see your disk-drive
documentation.
 
Creating a logical drive
 
DRIVPARM modifies the parameters of an existing physical drive and does not
create a new logical drive.
 

 
                             DRIVPARMExample
 
Suppose your system has an internal tape drive with one head on drive D that
is configured at startup to write 20 tracks of 40 sectors per track. To
reconfigure this tape drive to write 10 tracks of 99 sectors each, add the
following command to your CONFIG.SYS file:
 
    drivparm=/d:3 /f:6 /h:1 /s:99 /t:10
 

 
                                    ECHO
 
Displays or hides the text in batch programs when the program is running.
Also indicates whether the command-echoing feature is on or off.
 
When you run a batch program, MS-DOS typically displays (echoes) the batch
program's commands on the screen. You can turn this feature on or off by
using the ECHO command.
 
Syntax
 
    ECHO [ON|OFF]
 
To use the echo command to display a message, use the following syntax:
 
    echo [message]
 
Parameters
 
ON|OFF
    Specifies whether to turn the command-echoing feature on or off. To
    display the current ECHO setting, use the ECHO command without a
    parameter.
 
message
    Specifies text you want MS-DOS to display on the screen.
 
Related Command
 
For information about suspending the execution of a batch program, see the
<PAUSE> command.
 

 
                                ECHONotes
 
Using a message with the ECHO command
 
The ECHO message command is useful when ECHO is off. To display a message
that is several lines long without displaying other commands, you can
include several ECHO message commands after the ECHO OFF command in your
batch program.
 
Hiding the command prompt
 
If you use the ECHO OFF command on the command line, the command prompt does
not appear on your screen. To redisplay the command prompt, type ECHO ON.
 
Preventing MS-DOS from echoing a line
 
You can insert an at sign (@) in front of a command in a batch program to
prevent MS-DOS from echoing that line.
 
Echoing a blank line
 
To echo a blank line on the screen, you can type ECHO and then a period
(ECHO.). There must be no intervening space.
 
Displaying pipes and redirection characters
 
You cannot display a pipe (|) or redirection character (< or >) by using the
ECHO command.



 
                               ECHOExamples
 
The following example shows a batch program that includes a three-line
message preceded and followed by a blank line:
 
    echo off
    echo.
    echo This batch program
    echo formats and checks
    echo new disks
    echo.
 
If you want to turn ECHO off and you do not want to echo the ECHO command
itself, include an at sign (@) before the command, as follows:
 
    @echo off
 
You can use the IF and ECHO commands on the same command line, as follows:
 
    if exist *.rpt echo The report has arrived.
 

 
                                    EDIT
 
Starts MS-DOS Editor, a text editor you can use to create and edit ASCII
text files.
 
MS-DOS Editor is a full-screen editor that allows you to create, edit, save,
and print ASCII text files. Using MS-DOS Editor, you can choose commands
from menus and specify information and preferences in dialog boxes. MS-DOS
Editor includes extensive online Help about MS-DOS Editor techniques and
commands.
 
Syntax
 
    EDIT [[drive:][path]filename] [/B] [/G] [/H] [/NOHI]
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of an ASCII text file. If the file does
    not exist, MS-DOS Editor creates it. If the file exists, MS-DOS Editor
    opens it and displays its contents on the screen.
 
Switches
 
/B
    Displays MS-DOS Editor in black and white. Use this option if MS-DOS
    Editor isn't displayed correctly on a monochrome monitor.
 
/G
    Uses the fastest screen updating for a CGA monitor.
 
/H
    Displays the maximum number of lines possible for the monitor you are
    using.
 
/NOHI
    Enables you to use 8-color monitors with MS-DOS Editor. Usually, MS-DOS
    uses 16 colors.
 
CAUTION:  MS-DOS Editor does not work if the file QBASIC.EXE is not in the
          current directory or in the search path or in the same directory
          as the file EDIT.COM. If you delete QBASIC.EXE to save space on
          your hard disk, you cannot use MS-DOS Editor.
 

 
                                 EDITNote
 
Some monitors may not support the display of shortcut keys by default. If
your monitor does not display shortcut keys, use the /B switch (for CGA
monitors) and the /NOHI switch (for systems that do not support bold
characters).
 

 
                                  EGA.SYS
 
Saves and restores the display when the MS-DOS Shell Task Swapper is used
with EGA monitors. If you have an EGA monitor, you must install the EGA.SYS
device driver before using Task Swapper. This device driver must be loaded
by a <DEVICE> or <DEVICEHIGH> command in your CONFIG.SYS file.
 
Syntax
 
    DEVICE=[drive:][path]EGA.SYS
 
Parameters
 
[drive:][path]
    Specifies the location of the EGA.SYS file.
 

 
                               EGA.SYSNote
 
If you are using a mouse on a system that has an EGA monitor, you can save
memory by installing EGA.SYS before you install your mouse driver.
 

 
                                   EMM386
 
Enables or disables EMM386 expanded-memory support on a computer with an
80386 or higher processor. The EMM386 command also enables or disables
Weitek coprocessor support. Do not use this command when Windows is
running.
 
The EMM386 device driver, EMM386.EXE, provides expanded-memory support and
also provides access to the upper memory area. For information about
EMM386.EXE, see <EMM386.EXE>.
 
Syntax
 
    EMM386 [ON|OFF|AUTO] [W=ON|W=OFF]
 
To display the current status of EMM386 expanded-memory support, use the
following syntax:
 
    EMM386
 
Parameters
 
ON|OFF|AUTO
    Activates the EMM386 device driver (if set to ON), or suspends the
    EMM386 device driver (if set to OFF), or places the EMM386 device driver
    in auto mode (if set to AUTO). Auto mode enables expanded-memory support
    only when a program calls for it. The default value is ON.
 
W=ON|W=OFF
    Enables (if set to W=ON) or disables (if set to W=OFF) Weitek
    coprocessor support. The default value is W=OFF.
 

 
                               EMM386Notes
 
Installing the EMM386.EXE device driver
 
To use the EMM386 command, you must have an 80386 or higher processor, and
you must also install the EMM386.EXE device driver by using the DEVICE
command in your CONFIG.SYS file. If you try to use the EMM386 command on a
computer that does not have an 80386 or higher processor, MS-DOS displays
the following message:
 
    EMM386 driver not installed
 
Reactivating EMM386 expanded-memory support
 
If EMM386 was loaded when MS-DOS started but is not currently in use, the ON
parameter reactivates expanded-memory support.
 
Suspending EMM386 expanded-memory support
 
If EMM386 expanded-memory support is currently active, handle 0 is the only
handle allocated, and EMM386 is not providing access to the upper memory
area. The OFF parameter suspends EMM386 expanded-memory support. When EMM386
expanded-memory support is off, the EMM386.EXE device-driver header is
changed so that programs cannot use expanded memory. This enables you to run
non-VCPI-compliant programs such as Windows 3.0 in Standard mode.
 
Enabling and disabling Weitek coprocessor support
 
If the W=ON parameter is specified and the OFF parameter (different from the
W=OFF parameter) is not, EMM386 enables Weitek coprocessor support. The high
memory area (HMA) must be available to enable Weitek coprocessor support. If
you load MS-DOS into the HMA by specifying DOS=HIGH, you may not be able to
enable Weitek coprocessor support.
 
If you specify the W=ON or W=OFF parameter and no Weitek coprocessor is
installed in your computer system, MS-DOS displays the following error
message:
 
    Weitek Coprocessor not installed
 

 
                                 EMM386.EXE
 
Provides access to the upper memory area and uses extended memory to
simulate expanded memory. This device driver must be loaded by a <DEVICE>
command in your CONFIG.SYS file and can be used only on computers with an
80386 or higher processor.
 
EMM386 uses extended memory to simulate expanded memory for programs that
can use expanded memory. EMM386 also makes it possible to load programs and
device drivers into upper memory blocks (UMBs).
 
Syntax
 
    DEVICE=[drive:][path]EMM386.EXE [ON|OFF|AUTO] [memory] [MIN=size]
    [W=ON|W=OFF] [Mx|FRAME=address|/Pmmmm] [Pn=address] [X=mmmm-nnnn]
    [I=mmmm-nnnn] [B=address] [L=minXMS] [A=altregs] [H=handles] [D=nnn]
    [RAM=mmmm-nnnn] [NOEMS] [NOVCPI] [HIGHSCAN] [VERBOSE] [WIN=mmmm-nnnn]
    [NOHI] [ROM=mmmm-nnnn] [NOMOVEXBDA] [ALTBOOT]
 
Parameters
 
[drive:][path]
    Specifies the location of the EMM386.EXE file.
 
[ON|OFF|AUTO]
    Activates the EMM386 device driver (if set to ON), or suspends the
    EMM386 device driver (if set to OFF), or places the EMM386 device driver
    in auto mode (if set to AUTO). Auto mode enables expanded-memory support
    and upper memory block support only when a program calls for it. The
    default value is ON. Use the EMM386 command to change this value after
    EMM386 has started.
 
memory
    Specifies the maximum amount of extended memory (in kilobytes) that you
    want EMM386 to provide as expanded/Virtual Control Program Interface
    (EMS/VCPI) memory. This amount is in addition to the memory used for
    UMBs and EMM386 itself. Values for memory are in the range 64 through
    the lesser of either 32768 or the amount of extended memory available
    when EMM386 is loaded. The default value is the amount of free extended
    memory. If you specify the NOEMS switch, the default value is 0. EMM386
    rounds the value down to the nearest multiple of 16.
 
Switches
 
MIN=size
    Specifies the minimum amount of EMS/VCPI memory (in kilobytes) that
    EMM386 will provide, if that amount of memory is available. EMM386
    reserves this amount of extended memory for use as EMS/VCPI memory when
    EMM386 is loaded by the DEVICE=EMM386.EXE command in your CONFIG.SYS
    file. EMM386 may be able to provide additional EMS/VCPI memory (up to
    the amount specified by the MEMORY parameter) if sufficient XMS memory
    is available when a program requests EMS/VCPI memory. Values are in the
    range 0 through the value specified by the MEMORY parameter. The default
    value is 256. If you specify the NOEMS switch, the default value is 0.
    If the value of MIN is greater than the value of MEMORY, EMM386 uses the
    value specified by MIN.
 
W=ON|W=OFF
    Enables or disables support for the Weitek coprocessor. The default
    setting is W=OFF.
 
Mx
    Specifies the address of the page frame. Valid values for x are in the
    range 1 through 14. The following list shows each value and its
    associated base address in hexadecimal format:
 
            1 => C000h    8 => DC00h
            2 => C400h    9 => E000h
            3 => C800h    10 => 8000h
            4 => CC00h    11 => 8400h
            5 => D000h    12 => 8800h
            6 => D400h    13 => 8C00h
            7 => D800h    14 => 9000h
 
    Values in the range 10 through 14 should be used only on computers that
    have 512K of memory.
 
FRAME=address
    Specifies the page-frame segment base directly. To specify a specific
    segment-base address for the page frame, use the FRAME switch and
    specify the address you want. Valid values for address are in the ranges
    8000h through 9000h and C000h through E000h, in increments of 400h. To
    provide expanded memory and disable the page frame, you can specify
    FRAME=NONE; however, this may cause some programs that require expanded
    memory to work improperly.
 
/Pmmmm
    Specifies the address of the page frame. Valid values for mmmm are in
    the ranges 8000h through 9000h and C000h through E000h, in increments of
    400h.
 
Pn=address
    Specifies the segment address of a specific page, where n is the number
    of the page you are specifying and address is the segment address you
    want. Valid values for n are in the range 0 through 255. Valid values
    for address are in the ranges 8000h through 9C00h and C000h through
    EC00h, in increments of 400h. The addresses for pages 0 through 3 must
    be contiguous in order to maintain compatibility with version 3.2 of the
    Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). If you
    use the Mx switch, the FRAME switch, or the /Pmmmm switch, you cannot
    specify the addresses for pages 0 through 3 for the /Pmmmm switch.
 
X=mmmm-nnnn
    Prevents EMM386 from using a particular range of segment addresses for
    an EMS page or for UMBs. Valid values for mmmm and nnnn are in the range
    A000h through FFFFh and are rounded down to the nearest 4-kilobyte
    boundary. The X switch takes precedence over the I switch if the two
    ranges overlap.
 
I=mmmm-nnnn
    Specifies a range of segment addresses to be used (included) for an EMS
    page or for UMBs. Valid values for mmmm and nnnn are in the range A000h
    through FFFFh and are rounded down to the nearest 4-kilobyte boundary.
    The X switch takes precedence over the I switch if the two ranges
    overlap.
 
B=address
    Specifies the lowest segment address available for EMS "banking"
    (swapping of 16-kilobyte pages). Valid values are in the range 1000h
    through 4000h. The default value is 4000h.
 
l=minXMS
    Ensures that the specified amount (in kilobytes) of extended memory will
    still be available after EMM386 is loaded. The default value is 0.
 
A=altregs
    Specifies how many fast alternate register sets (used for multitasking)
    you want to allocate to EMM386. Valid values are in the range 0 through
    254. The default value is 7. Every alternate register set adds about 200
    bytes to the size in memory of EMM386.
 
H=handles
    Specifies how many handles EMM386 can use. Valid values are in the range
    2 through 255. The default value is 64.
 
D=nnn
    Specifies how many kilobytes of memory should be reserved for buffered
    direct memory access (DMA). Discounting floppy-disk DMA, this value
    should reflect the largest DMA transfer that will occur while EMM386 is
    active. Valid values for nnn are in the range 16 through 256. The
    default value is 32.
 
RAM=mmmm-nnnn
    Specifies a range of segment addresses to be used for UMBs and also
    enables EMS support. If you do not specify a range, EMM386 uses all
    available adapter space to create UMBs and a page frame for EMS.
 
NOEMS
    Provides access to the upper memory area but prevents access to expanded
    memory.
 
NOVCPI
    Disables support for VCPI applications. This switch must be used with
    the NOEMS switch. If you specify the NOVCPI switch without specifying
    the NOEMS switch, EMM386 does not disable VCPI support. If you specify
    both switches, EMM386 disregards the MEMORY parameter and the MIN
    switch. Disabling support for VCPI applications reduces the amount of
    extended memory allocated.
 
HIGHSCAN
    Specifies that EMM386 use an additional check to determine the
    availablity of upper memory for use as UMBs or EMS windows. On some
    computers, specifying this switch may have no effect or cause EMM386 to
    identify upper memory areas as available when they are not. As a
    result, your computer might stop responding.
 
VERBOSE
    Directs EMM386 to display status and error messages while loading. By
    default, EMM386 displays messages only if it encounters an error
    condition. You can abbreviate VERBOSE as V. (To display status messages
    without adding the VERBOSE switch, press and hold the ALT key while
    EMM386 starts and loads.)
 
WIN=mmmm-nnnn
    Reserves a specified range of segment addresses for Windows instead of
    for EMM386. Valid values for mmmm and nnnn are in the range A000h
    through FFFFh and are rounded down to the nearest 4-kilobyte boundary.
    The X switch takes precedence over the WIN switch if the two ranges
    overlap. The WIN switch takes precedence over the RAM, ROM, and I
    switches if their ranges overlap.
 
[NOHI]
    Prevents EMM386 from loading into the upper memory area. Normally, a
    portion of EMM386 is loaded into upper memory. Specifying this switch
    decreases available conventional memory and increases the upper memory
    area available for UMBs.
 
[ROM=mmmm-nnnn]
    Specifies a range of segment addresses that EMM386 uses for shadow
    RAMrandom-access memory used for read-only memory (ROM). Valid values
    for mmmm and nnnn are in the range A000h through FFFFh and are rounded
    down to the nearest 4-kilobyte boundary. Specifying this switch may
    speed up your system if it does not already have shadow RAM.
 
[NOMOVEXBDA]
    Prevents EMM386 from moving the extended BIOS data from conventional
    memory to upper memory.
 
[ALTBOOT]
    Specifies that EMM386 use an alternate handler to restart your computer
    when you press CTRL+ALT+DEL. Use this switch only if your computer stops
    responding or exhibits other unusual behavior when EMM386 is loaded and
    you press CTRL+ALT+DEL.
 

 
                             EMM386.EXENotes
 
Sharing XMS and EMS memory
 
EMM386 provides EMS/VCPI memory for programs that require it by converting
XMS memory to EMS/VCPI memory. When it is loaded, EMM386 reserves the amount
of memory specified by the MIN switch for use as EMS/VCPI memory (the
default value is 256K). Once this amount of XMS memory is reserved, it is
always available as EMS/VCPI memory and no longer available as XMS memory.
EMM386 may be able to convert additional amounts of XMS memory to EMS/VCPI
memory, up to the amount specified by the MEMORY parameter. EMM386 returns
the additional amount back to XMS memory when it is no longer needed as
EMS/VCPI memory.
 
If you specify MIN=0, EMM386 does not reserve any XMS memory for use as
EMS/VCPI memory. Instead, it converts XMS memory to EMS/VCPI memory only
when a program requests it. This frees XMS memory when EMS/VCPI memory is
not needed. However, EMM386 will not be able to supply the requested amount
of EMS/VCPI memory if programs have allocated all the XMS memory at the time
of the request.
 
Must install HIMEM.SYS before EMM386.EXE
 
You must include a DEVICE command for the HIMEM.SYS device driver in your
CONFIG.SYS file before the DEVICE command for EMM386.EXE.
 
Using EMM386 memory switches
 
Unless you want to use EMM386 to provide access to the upper memory area,
you need not specify memory switches on the DEVICE command line. EMM386
usually runs properly with the default values. In some cases, however, you
might want to control how EMM386 uses memory. For example, you can control
where EMM386 puts the EMS page frame or which segments it uses for EMS
pages. You can use as many of these memory switches as you want, in any
order you want.
 
CAUTION:  Use EMM386.EXE parameters carefully. You can make your computer
          inoperable if you use them incorrectly.
 
Using EMM386 to provide access to the upper memory area
 
In addition to providing access to expanded memory, EMM386 provides access
to the upper memory area, which you can use to load certain programs and
device drivers. You must use either the RAM or NOEMS switch to provide
access to the upper memory area.
 
To give MS-DOS access to the upper memory area but not to expanded memory,
use the NOEMS switch. To give MS-DOS access to both the upper memory area
and expanded memory, use the RAM switch. The RAM switch provides access to
less of the upper memory area for running device drivers and programs than
does the NOEMS switch. In either case, you must include the DOS=UMB command
in your CONFIG.SYS file. The device command for EMM386.EXE must precede any
DEVICEHIGH commands.
 
Using EMM386 with Windows 3.1
 
When EMM386 is used with Windows 3.1, the I, X, NOEMS, Mx, Pnnnn, and FRAME
switches have precedence over the EMMINCLUDE, EMMEXCLUDE, and EMMPAGEFRAME
settings in the Windows SYSTEM.INI file. Changes to these settings in the
SYSTEM.INI file have no effect when EMM386 is loaded.
 
SMARTDRV double buffering may be required to use EMM386
 
If you have a small computer system interface (SCSI) or enhanced system
device interface (ESDI) hard disk or other device, you may have to add the
following line to your CONFIG.SYS file:
 
    device=smartdrv.exe /double_buffer
 
Add the line before any DEVICEHIGH statements and before any statements that
load installable device drivers that use expanded memory. The statement
enables an SCSI or EDSI controller to transfer information to programs that
use the upper memory area or expanded memory.
 

 
                            EMM386.EXEExamples
 
To start EMM386 as an expanded-memory emulator, using the default values,
add the following lines to your CONFIG.SYS file:
 
    device=himem.sys
    device=emm386.exe
 
Since no location is specified, MS-DOS searches for the EMM386.EXE file in
the root directory of your startup drive.
 
To specify that EMM386 allocate a maximum of 4096K of memory and a
guaranteed 256K of memory (the default value), and to specify that the
EMM386.EXE file is located in the DOS directory on drive C, add the
following line to your CONFIG.SYS file:
 
    device=c:\dos\emm386.exe 4096
 
To emulate expanded memory, specify the segment-base address D000h for the
EMS page frame, and allocate 512K of memory to EMM386, use one of the
following commands:
 
    device=emm386.exe 512 frame=d000
 
    device=emm386.exe 512 p0=d000 p1=d400 p2=d800 p3=dc00
 
Suppose that, in addition to specifying the conditions set in the preceding
commands, you want to prevent EMM386 from using the segment addresses E000h
through EC00h. To do this and to specify that EMM386 can use 127 handles,
add the following line to your CONFIG.SYS file:
 
    device=emm386.exe 512 frame=d000 x=e000-ec00 h=127
 
To provide access to the upper memory area but not provide EMS/VCPI memory,
add the following line to your CONFIG.SYS file:
 
    device=emm386.exe noems novcpi
 
To provide access to the upper memory area and provide EMS/VCPI memory, add
the following line to your CONFIG.SYS file:
 
    device=emm386.exe ram
 

 
                                    EXIT
 
Quits the MS-DOS command interpreter (COMMAND.COM) and returns to the
program that started the command interpreter, if one exists.
 
Syntax
 
    EXIT
 

 
                                EXITNotes
 
Using exit with the command interpreter
 
When you use the MS-DOS COMMAND command to start a new instance of the
command interpreter, you can use the EXIT command to return to the old
command interpreter. Also, while running some programs, you can run the
MS-DOS command interpreter and then use the EXIT command to return to your
program. For more information about command interpreters, see the <COMMAND>
command.
 
If you are not using the /P (permanent) switch with the inital copy of
COMMAND.COM, the EXIT command quits the command interpreter. You must then
specify at the command prompt the location of the COMMAND.COM file to start
the command interpreter again.
 
Using exit when the command program is loaded as permanent
 
If you start the COMMAND.COM program with the /P (permanent) switch, the
EXIT command has no effect.
 

 
                                   EXPAND
 
Expands a compressed file. You can use this command to retrieve one or more
files from the Setup disks that accompany MS-DOS 6. These files are not
usable unless you expand them.
 
Syntax
 
    EXPAND [drive:][path]filename [[drive:][path]filename[ ...]]
    destination
 
If you type the following, EXPAND will prompt you for the location and/or
name you want to give the expanded file:
 
    EXPAND [drive:][path]filename
 
If you type the following, EXPAND will prompt you for the location and name
of the compressed file you want to expand, then prompt you for the location
and/or name you want to give the expanded file:
 
    EXPAND
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of a compressed file or files to be
    expanded. You cannot use wildcards (* and ?).
 
destination
    Specifies the location and/or name of the expanded file or files.
    Destination can consist of a drive letter and colon, a directory name, a
    filename, or a combination. However, you cannot specify a filename for
    destination unless you also specify a single compressed file for
    filename.
 

 
                               EXPANDNotes
 
Retrieving files from the Setup disks
 
Most of the files on the Setup disks provided with MS-DOS 6 are compressed.
Each of these compressed files has a file extension that ends with an
underscore character (_). When you installed MS-DOS, you ran the Setup
program, which expanded these files before copying them to your system.
However, if you need to retrieve just one or a few files from the original
disks, you can use the EXPAND command.
 
Letting EXPAND prompt you
 
If you don't include the destination, or don't include the compressed file
and the destination, EXPAND prompts you for the information and provides
examples.
 

 
                              EXPANDExamples
 
Suppose you accidentally delete the SORT.EXE file from your DOS directory on
drive C. You can copy and expand the compressed file SORT.EX_ from the
MS-DOS 6 Setup disks to your hard disk. First, find out which disk contains
SORT.EX_ by opening the PACKING.LST file on Setup Disk 1. Then insert the
appropriate disk into drive A and use the following command to copy and
expand the file:
 
    expand a:\sort.ex_ c:\dos\sort.exe
 
To copy and expand the SORT.EX_ file to the hard disk by letting EXPAND
prompt you, type the following at the command prompt:
 
    expand
 
EXPAND prompts you with the following:
 
    Type the location and name of the compressed file you want to expand.
    (Example: A:\EGA.SY_)
 
    Compressed file:
 
To expand and copy the SORT.EX_ file from the Setup disk in drive A, type
the following:
 
    a:\sort.ex_
 
EXPAND prompts you with the following:
 
    Type the location and/or name you want to give the expanded file.
    (Example: C:\DOS\EGA.SYS)
 
    Expanded file:
 
If your MS-DOS files are in the C:\DOS directory, type the following:
 
    c:\dos\sort.exe



 
                                  FASTHELP
 
Displays a list of all MS-DOS 6 commands and gives a brief explanation of
each. The information that the FASTHELP command displays is similar to, but
less detailed than, the information found in MS-DOS Help.
 
Syntax
 
    FASTHELP [command]
 
    [command] /?
 
Parameter
 
command
    Specifies the name of the command about which you want information. If
    you do not specify a command name, the FASTHELP command lists and
    briefly describes every command provided with MS-DOS 6.
 
Related Command
 
For information about MS-DOS Help, see the <HELP> command.
 

 
                               FASTHELPNote
 
You can use FASTHELP to get online Help for a command in two ways. You can
specify the name of the command on the FASTHELP command line, or you can
type the name of the command and the /? switch at the command prompt. For
example, you can type either of the following commands to get information
about the XCOPY command:
 
    fasthelp xcopy
 
    xcopy /?
 
The second command is slightly faster.
 

 
                                  FASTOPEN
 
Starts the Fastopen program, which improves performance on computers with
large directories. Fastopen decreases the amount of time that MS-DOS takes
to open frequently used files. Do not use this command when Windows is
running.
 
Fastopen tracks the location of files on a hard disk and stores the
information in memory for fast access.
 
Syntax
 
    FASTOPEN drive:[[=]n] [drive:[[n][...]] [/X]
 
In your CONFIG.SYS file, use the following syntax:
 
    INSTALL=[[dos-drive:]dos-path]FASTOPEN.EXE drive:[[=]n]
    [drive:[[=]n][...]] [/X]
 
Warning:  To avoid losing data, do not run a defragmentation program such as
          Microsoft Defragmenter while FASTOPEN.EXE is loaded.
 
Parameters
 
[dos-drive:]dos-path
    Specifies the location of FASTOPEN.EXE.
 
drive:
    Specifies a hard disk drive for which you want Fastopen to track the
    opening of files.
 
n
    Specifies the number of files Fastopen can work with at the same time.
    Valid values for n are in the range 10 through 999. The default value is
    48.
 
Switch
 
/X
    Creates the name cache in expanded memory instead of in conventional
    memory. The name cache is an area of memory in which MS-DOS stores
    (caches) the locations and names of the files that you open. This cache
    conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory
    Specification (LIM EMS).
 

 
                              FASTOPENNotes
 
How Fastopen tracks information
 
Every time you open a file, Fastopen records its name and location in the
name cache. If you later reopen a file recorded by Fastopen, the access time
is greatly reduced.
 
Limits on using Fastopen
 
Fastopen works only on hard disks and does not work over a network. You can
use Fastopen with as many as 24 hard-disk partitions at one time. For each
partition, Fastopen can track the number of files specified by the n
parameter. The maximum number of files that Fastopen can track on all
partitions is 999.
 
You cannot run more than one copy of Fastopen at the same time. If you want
to change the Fastopen settings, you must restart MS-DOS.
 
You should not use the Fastopen command from MS-DOS Shell, because doing so
can lock up your machine.
 
Memory requirements for Fastopen
 
Fastopen requires approximately 48 bytes of memory for each file that it
tracks.
 
Adding the FASTOPEN command to your CONFIG.SYS file
 
You can add a Fastopen command to your CONFIG.SYS file by using the INSTALL
command. Use this technique when you do not want to start Fastopen from the
MS-DOS command line or from your AUTOEXEC.BAT file.
 

 
                             FASTOPENExample
 
If you want MS-DOS to track the location of as many as 100 files on drive C,
add the following line to your CONFIG.SYS file:
 
    install=c:\dos\fastopen.exe c:=100
 

 
                                     FC
 
Compares two files and displays the differences between them.
 
Syntax
 
To make an ASCII comparison, use the following syntax:
 
    FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn][drive1:][path1]filename1
    [drive2:][path2]filename2
 
To make a binary comparison, use the following syntax:
 
    FC /B [drive1:][path1]filename1 [drive2:][path2]filename2
 
Parameters
 
[drive1:][path1]filename1
    Specifies the location and name of the first file you want to compare.
 
[drive2:][path2]filename2
    Specifies the location and name of the second file you want to compare.
 
Switches
 
/A
    Abbreviates the output of an ASCII comparison. Instead of displaying all
    the lines that are different, FC displays only the first and last line
    for each set of differences.
 
/C
    Ignores the case of letters.
 
/L
    Compares the files in ASCII mode. FC compares the two files line by line
    and attempts to resynchronize the files after finding a mismatch. This
    is the default mode for comparing files that do not have extensions of
    .EXE, .COM, .SYS, .OBJ, .LIB, or .BIN.
 
/LBn
    Sets the number of lines for the internal line buffer. The default
    length of the line buffer is 100 lines. If the files being compared have
    more than this number of consecutive differing lines, FC cancels the
    comparison.
 
/N
    Displays the line numbers during an ASCII comparison.
 
/T
    Does not expand tabs to spaces. The default behavior is to treat tabs as
    spaces, with stops at each eighth character position.
 
/W
    Compresses white space (tabs and spaces) during the comparison. If a
    line contains many consecutive spaces or tabs, the /W switch treats
    these characters as a single space. When used with the /W switch, FC
    ignores (and does not compare) white space at the beginning and end of a
    line.
 
/nnnn
    Specifies the number of consecutive lines that must match before FC
    considers the files to be resynchronized. If the number of matching
    lines in the files is less than this number, FC displays the matching
    lines as differences. The default value is 2.
 
/B
    Compares the files in binary mode. FC compares the two files byte by
    byte and does not attempt to resynchronize the files after finding a
    mismatch. This is the default mode for comparing files that have
    extensions of .EXE, .COM, .SYS, .OBJ, .LIB, or .BIN.
 

 
                                 FCNotes
 
Reporting differences between files for an ASCII comparison
 
When you use FC for an ASCII comparison, MS-DOS reports differences between
two files by displaying the name of the first file, followed by the last
line to match in both files, followed by the lines from filename1 that
differ between the files, followed by the first line to match in both files.
MS-DOS then displays the name of the second file, followed by the last line
to match, followed by the lines from filename 2 that differ, followed by the
next line to match.
 
Using the /B switch for binary comparisons
 
MS-DOS uses the following format to report mismatches found during a binary
comparison:
 
    xxxxxxxx: yy zz
 
The value of xxxxxxxx specifies the relative hexadecimal address for the
pair of bytes, measured from the beginning of the file. Addresses start at
00000000; the hexadecimal values for yy and zz represent the mismatched
bytes from filename1 and filename2, respectively.
 
Using wildcards
 
You can use wildcards (* and ?) in either of the filenames you specify with
the FC command. If you use a wildcard in filename1, FC compares all the
specified files to the file specified by filename2. If you use a wildcard in
filename2, FC uses the corresponding value from filename1.
 
How FC uses memory
 
When comparing ASCII files, FC uses an internal buffer (large enough to hold
100 lines) as storage. If the files are larger than the buffer, FC compares
what it can load into the buffer. If FC does not find a match in the loaded
portions of the files, it stops and displays the following message:
 
    Resynch failed. Files are too different.
 
When comparing binary files that are larger than available memory, FC
compares both files completely, overlaying the portions in memory with the
next portions from the disk. The output is the same as that for files that
fit completely in memory.
 

 
                                FCExamples
 
Suppose you want to make an ASCII comparison of two text files that are
named MONTHLY.RPT and SALES.RPT, and you want to display the results in
abbreviated format. To make this comparison, type the following command:
 
    fc /a monthly.rpt sales.rpt
 
To make a binary comparison of two batch files named PROFITS.BAT and
EARNINGS.BAT, type the following command:
 
    fc /b profits.bat earnings.bat
 
The results of this command will be similar to the following:
 
    00000002: 72 43
    00000004: 65 3A
    0000000E: 56 92
    00000012: 6D 5C
    00000013: 0D 7C
    00000014: 0D 0A
    00000015: 0A 0D
    0000001E: 43 7A
    0000001F: 09 0A
    00000022: 72 44
         ...
         ...
         ...
    000005E0: 00 61
    000005E1: 00 73
    000005E2: 00 73
    000005E3: 00 69
    000005E4: 00 67
    000005E5: 00 6E
    000005E6: 00 6D
    000005E7: 00 65
    000005E8: 00 6E
    FC: EARNINGS.BAT longer than PROFITS.BAT
 
If the PROFITS.BAT and EARNINGS.BAT files were identical, FC would display
the following message:
 
    FC: no differences encountered
 
To compare every .BAT file in the current directory with the file NEW.BAT,
type the following command:
 
    fc *.bat new.bat
 
To compare the file NEW.BAT on drive C with the file NEW.BAT on drive D,
type the following command.
 
    fc c:new.bat d:*.bat
 
To compare each batch file in the root directory on drive C to the file with
the same name in the root directory on drive D, type the following command:
 
    fc c:\*.bat d:\*.bat
 

 
                                    FCBS
 
Specifies the number of file control blocks (FCBs) that MS-DOS can have open
at the same time. You can use this command only in your CONFIG.SYS file.
 
A file control block is a data structure that stores information about a
file.
 
Syntax
 
    FCBS=x
 
Parameter
 
x
    Specifies the number of file control blocks that MS-DOS can have open at
    one time. Valid values for x are in the range 1 through 255. The default
    value is 4.
 

 
                                FCBSNotes
 
Limitation on opening files
 
If a program tries to open more than x files by using file control blocks,
MS-DOS might close the files that were opened earlier.
 
Recommended use of the FCBS command
 
You should use the FCBS command only if a program requires you to do so.
Most newer programs do not require file control blocks. However, some older
programs might require you to use the FCBS command in your CONFIG.SYS file.
 
Many programs use file handles. You can specify the number of file handles
available using the <FILES> command.
 

 
                               FCBSExample
 
To specify that MS-DOS can have up to eight file control blocks open at the
same time, add the following line to your CONFIG.SYS file:
 
    fcbs=8
 

 
                                   FDISK
 
Starts the Fdisk program, which configures a hard disk for use with MS-DOS.
 
Fdisk displays a series of menus to help you partition your hard disk(s) for
MS-DOS.
 
Syntax
 
To start the Fdisk program, use the following syntax:
 
    FDISK
 
To display partition information without starting the Fdisk program, use the
following syntax:
 
    FDISK /STATUS
 
Switch
 
/STATUS
    Displays an overview of the partition information of your computer's
    hard disk(s), without starting the Fdisk program.
 

 
                                FDISKNotes
 
Using Fdisk to partition a hard disk
 
You can use Fdisk for the following tasks:
 
  Creating a primary MS-DOS partition
 
  Creating an extended MS-DOS partition
 
  Setting a partition to active
 
  Deleting a partition
 
  Displaying partition data
 
  Selecting the next hard disk for partitioning, if a system has multiple
   hard disks
 
CAUTION:  Do not experiment with Fdisk. If you accidently delete a drive or
          partition, you will lose data from your hard disk.
 
Viewing partition information quickly and easily
 
To display an overview of your computer's partition information without
having to start the Fdisk program, use the /STATUS switch. If the /STATUS
switch doesn't provide enough detail about your hard disk, then start the
Fdisk program without the /STATUS switch and choose option 4.
 
Changing the size of a partition
 
To change the size of a partition, you must actually delete the partition
and create a new one with a different size.
 
Maximum partition size
 
The maximum partition size is 2 gigabytes.
 
CAUTION:  Deleting a partition deletes all the data stored on that
          partition.
 
Using Fdisk with SUBST
 
Fdisk does not work on a drive formed by using the SUBST command.
 
Limits of Fdisk
 
Fdisk does not work on a network or an Interlnk drive. Fdisk works only on
hard disks physically installed on your computer.
 
Fdisk and Compressed Drives
 
If your computer includes compressed drives, Fdisk does not display
information about those drives. A compressed disk drive exists on your
physical disk as a hidden, read-only system file called a compressed volume
file (CVF). DoubleSpace associates the CVF with a drive letter; you can then
use the files stored in that CVF. However, to Fdisk, the compressed volume
file is not a separate drive; it is a file just like any other file. For
more information about compressed drives, see the chapter "Freeing Disk
Space" in the MS-DOS 6 User's Guide.
 

 
                                   FILES
 
Specifies the number of files that MS-DOS can access at one time. You can
use this command only in your CONFIG.SYS file.
 
Syntax
 
    FILES=x
 
Parameter
 
x
    Specifies the number of files that MS-DOS can access at one time. Valid
    values for x are in the range 8 through 255. The default value is 8.
 

 
                                FILESNote
 
Although the default setting for the x parameter is 8, some programs require
a larger value. A typical setting is 30.
 
The value you set for FILES may not be the only determining factor in how
many files a program can have open at a time. The design of the program may
limit how many files it can have open.
 

 
                               FILESExample
 
To specify that MS-DOS can access up to 20 files at one time, add the
following line to your CONFIG.SYS file:
 
    files=20
 

 
                                    FIND
 
Searches for a specific string of text in a file or files.
 
After searching the specified files, FIND displays any lines of text that
contain the specified string.
 
Syntax
 
    FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[...]]
 
Parameters
 
"string"
    Specifies the group of characters you want to search for. You must
    enclose the text for string in quotation marks.
 
[drive:][path]filename
    Specifies the location and name of the file in which to search for the
    specified string.
 
Switches
 
/V
    Displays all lines not containing the specified string.
 
/C
    Displays only a count of the lines that contain the specified string.
 
/N
    Precedes each line with the file's line number.
 
/I
    Specifies that the search is not to be case-sensitive.
 

 
                                FINDNotes
 
Specifying a string
 
Unless you specify the /I switch, FIND searches for exactly what you specify
for string. For example, to the FIND command the characters "a" and "A" are
different. If you were to use the /I switch, however, FIND would ignore case
and search for "a" and "A" as if they were the same character.
 
If the string you want to search for contains quotation marks, you must use
two quotation marks for each quotation mark contained within the string.
 
Using FIND as a filter
 
If you omit a filename, FIND acts as a filter, taking input from the MS-DOS
standard source (usually the keyboard, a pipe, or a redirected file) and
displaying any lines that contain the string.
 
Using wildcards with FIND
 
You cannot use wildcards (* and ?) in filenames or extensions that you
specify with the FIND command. To search for a string in a set of files you
specify with wildcards, you can use the FIND command in a FOR command.
 
Using the /V or /N switch with the /C switch
 
If you specify the /C and /V switches in the same command, FIND displays a
count of the lines that do not contain the specified string. If you specify
the /C and /N switches in the same command, FIND ignores the /N switch.
 
Using FIND in files with carriage returns
 
The FIND command does not recognize carriage returns. When you use FIND to
search for text in a file that includes carriage returns, you must limit the
search string to text that can be found between carriage returnsthat is, a
string that is not likely to be interrupted by a carriage return. For
example, FIND does not report a match for the string "tax file" wherever a
carriage return occurs between the word "tax" and the word "file".
 
FIND exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    The search was completed successfully and at least one match was found.
 
1
    The search was completed successfully, but no matches were found.
 
2
    The search was not completed successfully. In this case, an error
    occurred during the search, and FIND cannot report whether any matches
    were found.
 
You can use the ERRORLEVEL parameter on the <If> command line in a batch
program to process exit codes returned by FIND.
 

 
                               FINDExamples
 
To display all lines from the file PENCIL.AD that contain the string "Pencil
Sharpener", type the following command:
 
    find "Pencil Sharpener" pencil.ad
 
To find a string that contains text within quotation marks, you must enclose
the entire string in quotation marks and, in addition, use two quotation
marks for each quotation mark contained within the string, as shown in the
following example:
 
    find "The scientists labeled their paper ""for discussion only."" It is
    not a final report." report.doc
 
If you want to search for a set of files, you can use the FIND command with
the FOR command. The following command uses this method to search the
current directory for files that have the extension .BAT; in each file
found, the command searches for the string "PROMPT":
 
    for %f in (*.bat) do find "PROMPT" %f
 
Suppose you want FIND to search your hard disk to find and display the
filenames on drive C that contain the string "CPU". To do this, you can use
the pipe (|) to direct the results of a DIR command to FIND, as shown in the
following example:
 
    dir c:\ /s /b | find "CPU"
 
Before using a pipe for redirection, you should set the TEMP environment
variable in your AUTOEXEC.BAT file.
 
Since FIND searches are case-sensitive and since DIR produces uppercase
output, you must either type the string "CPU" in uppercase letters or use
the /I switch with FIND.
 

 
                                    FOR
 
Runs a specified command for each file in a set of files. You can use this
command in batch programs or at the command prompt.
 
Syntax
 
To use FOR in a batch program, use the following syntax:
 
    FOR %%variable IN (set) DO command [command-parameters]
 
To use FOR from the command prompt, use the following syntax:
 
    FOR %variable IN (set) DO command [command-parameters]
 
Parameters
 
%%variable or %variable
    Represents a replaceable variable. The FOR command replaces %%variable
    (or %variable) with each text string in the specified set until the
    command (specified in the command parameter) processes all the files.
    Use %%variable to carry out the FOR command within a batch program. Use
    %variable to carry out FOR from the command prompt.
 
(set)
    Specifies one or more files or text strings that you want to process
    with the specified command. The parentheses are required.
 
command
    Specifies the command that you want to carry out on each file included
    in the specified set.
 
command-parameters
    Specifies any parameters or switches that you want to use with the
    specified command (if the specified command uses any parameters or
    switches).
 

 
                                 FORNotes
 
Using the IN and DO keywords
 
IN and DO are not parameters, but they are required in the FOR command. If
you omit either of these keywords, MS-DOS displays an error message.
 
Using the replaceable variable
 
To avoid confusion with the batch parameters %0 through %9, you can use any
character for variable except the numerals 0 through 9. For simple batch
programs, a single character such as %%F may be all that is necessary.
 
You can use multiple values for variable in complex batch programs to
distinguish different replaceable variables. However, you cannot nest (add)
multiple FOR commands on the same command line.
 
Specifying a group of files
 
The set parameter can represent a single group of files or several groups of
files. You can use wildcards (* and ?) to specify a file set. The following
are valid file sets:
 
    (*.doc)
 
    (*.doc *.txt *.me)
 
    (jan*.doc jan*.rpt feb*.doc feb*.rpt)
 
    (ar??1991.* ap??1991.*)
 
When you use the FOR command, the first value in set replaces %%variable (or
%variable) and MS-DOS carries out the specified command in order to process
this value; this continues until MS-DOS has processed all the files (or
groups of files) that correspond to the value (or values) in set.
 

 
                               FORExamples
 
Suppose you want to use the TYPE command to display the contents of all the
files in the current directory that have the extension .DOC or .TXT. To do
this and to use the replaceable variable %F, type the following command at
the command prompt:
 
    for %f in (*.doc *.txt) do type %f
 
In this example, each file that has the .DOC or .TXT extension in the
current directory is substituted for the %F variable until the contents of
every file are displayed. To use this command in a batch file, you would
replace every occurrence of %F with %%F. Otherwise, MS-DOS ignores the
variable and displays an error message.
 
MS-DOS supports command switches, pipes, and redirection that you may want
to use with the specified command. For example, to redirect the output of
the previous example to PRN (the default printer port), you would type the
following command:
 
    for %f in (*.doc *.txt) do type %f > prn:
 

 
                                   FORMAT
 
Formats a disk for use with MS-DOS.
 
The FORMAT command creates a new root directory and file allocation table
for the disk. It can also check for bad areas on the disk, and it can delete
all data on the disk. In order for MS-DOS to be able to use a new disk, you
must first use this command to format the disk.
 
Syntax
 
    FORMAT drive: [/V[:label]] [/Q] [/U] [/F:size][/B|/S] [/C]
 
    FORMAT drive: [/V[:label]] [/Q] [/U] [/T:tracks /N:sectors] [/B|/S]
    [/C]
 
    FORMAT drive: [/V[:label]] [/Q] [/U] [/1] [/4] [/B|/S] [/C]
 
    FORMAT drive: [/Q] [/U] [/1] [/4] [/8] [/B|/S] [/C]
 
Warning:  Do not format a floppy disk at a size higher than it was designed
          for. For more information, see <FormatNotes>.
 
Parameter
 
drive:
    Specifies the drive containing the disk you want to format. You must
    specify a drive parameter. If you do not specify any of the following
    switches, FORMAT uses the drive type to determine the default format for
    the disk.
 
    If the disk was previously formatted and you do not use the /U switch,
    the old file allocation table and root directory are saved to allow
    unformatting of the disk if necessary. If you realize that you formatted
    the wrong disk, use the <UNFORMAT> command as soon as possible.
 
Switches
 
/V:label
    Specifies the volume label. A volume label identifies the disk and can
    be a maximum of 11 characters. If you omit the /V switch or use it
    without specifying a volume label, MS-DOS prompts you for the volume
    label after the formatting is completed. If you format more than one
    disk by using one FORMAT command, all of the disks will be given the
    same volume label. The /V switch is not compatible with the /8 switch.
    For more information about disk volume labels, see the DIR, LABEL, and
    VOL commands.
 
/Q
    Specifies a quick format of a disk. With this switch, FORMAT deletes the
    file allocation table (FAT) and the root directory of a previously
    formatted disk, but does not scan the disk for bad areas. Use the /Q
    switch to format only previously formatted disks that you know are in
    good condition.
 
/U
    Specifies an unconditional format of a disk. Unconditional formatting
    destroys all existing data on a disk and prevents you from later
    "unformatting" the disk. You should use /U if you have received read and
    write errors during use of a disk. For information about unformatting a
    disk, see the UNFORMAT command.
 
/F:size
    Specifies the size of the floppy disk to format. When possible, use this
    switch instead of the /T and /N switches. Use one of the following
    values for size:
 
    160 (or 160K or 160KB)
       160K, single-sided, double-density, 5.25-inch disk
 
    180 (or 180K or 180KB)
       180K, single-sided, double-density, 5.25-inch disk
 
    320 (or 320K or 320KB)
       320K, double-sided, double-density, 5.25-inch disk
 
    360 (or 360K or 360KB)
       360K, double-sided, double-density, 5.25-inch disk
 
    720 (or 720K or 720KB)
       720K, double-sided, double-density, 3.5-inch disk
 
    1200 (or 1200K or 1200KB or 1.2 or 1.2M or 1.2MB)
       1.2-MB, double-sided, quadruple-density, 5.25-inch disk
 
    1440 (or 1440K or 1440KB or 1.44 or 1.44M or 1.44MB)
       1.44-MB, double-sided, quadruple-density, 3.5-inch disk
 
    2880 (or 2880K or 2880KB or 2.88 or 2.88M or 2.88MB)
       2.88-MB, double-sided, extra-high-density, 3.5-inch disk
 
/B
    Reserves space for the system files IO.SYS and MSDOS.SYS (as hidden
    files) on a newly formatted disk. In previous versions of MS-DOS, it was
    necessary to reserve this space before using the SYS command to copy the
    system files to the disk. This switch is maintained in MS-DOS version
    6.0 for compatibility reasons only.
 
/S
    Copies the operating system files IO.SYS, MSDOS.SYS, and COMMAND.COM
    from your system's startup drive to a newly formatted disk that you can
    use as a system disk. If FORMAT cannot find the operating system files,
    it prompts you to insert a system disk.
 
/T:tracks
    Specifies the number of tracks on the disk. When possible, use the /F
    switch instead of this switch. If you use the /T switch, you must also
    use the /N switch. These two switches provide an alternative method of
    specifying the size of the disk being formatted. You cannot use the /F
    switch with the /T switch.
 
/N:sectors
    Specifies the number of sectors per track. When possible, use the /F
    switch instead of this switch. If you use the /N switch, you must * also
    use the /T switch. These two switches provide an alternative method of
    specifying the size of the disk being formatted. You cannot use the /F
    switch with the /N switch.
 
/1
    Formats a single side of a floppy disk.
 
/4
    Formats a 5.25-inch, 360K, double-sided, double-density floppy disk on a
    1.2-MB disk drive. Some 360K drives cannot reliably read disks formatted
    with this switch. When used with the /1 switch, this switch formats a
    5.25-inch, 180K, single-sided floppy disk.
 
/8
    Formats a 5.25-inch disk with 8 sectors per track. This switch formats a
    floppy disk to be compatible with MS-DOS versions earlier than 2.0.
 
/C
    Retests bad clusters. By default, if a drive contains clusters that have
    been marked as "bad", FORMAT does not retest the clusters; it simply
    leaves them marked "bad". Use the /C switch if you want FORMAT to retest
    all bad clusters on the drive. (In previous versions of MS-DOS, FORMAT
    always retested any bad clusters.)
 
Related Command
 
For information about restoring disks after using the FORMAT command, see
the <UNFORMAT> command.
 

 
                               FORMATNotes
 
Formatting a floppy disk
 
Do not format a floppy disk at a size higher than it was designed for. For
example, do not format a 360K floppy disk at 1.2MB.
 
Also, if you use the FORMAT command without specifying the size of the
floppy disk, MS-DOS will format the floppy disk at the disk capacity of the
disk drive. Thus, if you format a floppy disk without specifying the size,
be careful not to use a floppy disk smaller than the capacity of the disk
drive.
 
Typing a volume label
 
After formatting a floppy disk, FORMAT displays the following message:
 
    Volume label (11 characters, ENTER for none)?
 
The volume label can be a maximum of 11 characters (including spaces). If
you do not want your disk to have a volume label, press ENTER. For
information about volume labels, see the LABEL command.
 
Formatting a hard disk
 
When you use the FORMAT command to format a hard disk, MS-DOS displays a
message similar to the following before attempting to format the hard disk:
 
    WARNING, ALL DATA ON NON-REMOVABLE DISK
    DRIVE x: WILL BE LOST!
    Proceed with Format (Y/N)?_
 
To format the hard disk, press Y; if you do not want to format the disk,
press N.
 
FORMAT messages
 
When formatting is complete, MS-DOS displays messages showing the total disk
space, any space marked as defective, the total space used by the operating
system (if you used the /S or /B switch), and the space available for your
files.
 
Safe formatting
 
If you do not specify the /U switch or a switch that reformats the disk to a
different size, FORMAT performs a "safe" format. It clears the file
allocation table and root directory of the disk but does not delete any
data. You can then use the UNFORMAT command to recover the disk if you did
not intend to format the disk. FORMAT also checks each sector on the disk to
ensure that the sector can properly store data. If it locates a sector that
cannot store data, FORMAT marks that sector to prevent MS-DOS from using
it.
 
If you specify the /U switch or any switch that changes the size of the
disk, FORMAT performs an unconditional format by deleting all data on the
disk.
 
Quick formatting
 
You can speed up the formatting process by using the /Q switch. Use this
switch only if you have not received read or write errors on your disk. You
can speed up the process even more by using both the /Q and /U switches. If
you use the /U switch, FORMAT does not save the information necessary to
later unformat the disk.
 
Formatting a new disk
 
When you use FORMAT to format a disk that has never been formatted, specify
the /U switch to minimize formatting time.
 
Using format with a SUBST drive or a network drive
 
You should not use the FORMAT command on a drive prepared by using the SUBST
command. You cannot format disks over a network or an Interlnk drive.
 
FORMAT exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    The format operation was successful.
 
3
    The user pressed CTRL+C or CTRL+BREAK to stop the process.
 
4
    A fatal error occurred (any error other than 0, 3, or 5).
 
5
    The user pressed N in response to the prompt "Proceed with Format
    (Y/N)?" to stop the process.
 
You can check these exit codes by using the ERRORLEVEL condition with the IF
batch command. For an example of a batch program that supports ERRORLEVEL
conditions, see the <CHOICE> command.
 

 
                              FORMATExamples
 
To format a new floppy disk in drive A using the default size, type the
following command:
 
    format a:
 
To perform a quick format on a previously formatted disk in drive A, type
the following command:
 
    format a: /q
 
To format a floppy disk in drive A, completely deleting all data on the
disk, type the following command:
 
    format a: /u
 
To format a 360K floppy disk in drive A and copy the operating system files
to the disk to make it a system disk, type the following command:
 
    format a: /f:360 /s
 
To format a floppy disk in drive A and assign to it the volume label "DATA",
type the following command:
 
    format a: /v:DATA



 
                                    GOTO
 
Directs MS-DOS to a line in a batch program that is marked by a label you
specify. You can use this command only in batch programs.
 
The GOTO command directs MS-DOS within a batch program to a line identified
by a label. When MS-DOS finds the label, it processes the commands beginning
on the next line.
 
Syntax
 
    GOTO label
 
Parameters
 
label
    Specifies the line in a batch program to which MS-DOS should go.
 

 
                                GOTONotes
 
Valid values for label
 
The label parameter cannot include separators such as spaces, semicolons or
equal signs.
 
GOTO uses the first eight characters of each label
 
The GOTO command uses only the first eight characters of a label. Therefore,
the labels "hithere01" and "hithere02" are both equivalent to "hithere0".
 
Matching the label parameter with the label in the batch program
 
The label value you specify on the GOTO command line must match a label in
the batch program. The label within the batch program must be preceded by a
colon.
 
If your batch program does not contain the label that you specify, the batch
program stops and MS-DOS displays the following message:
 
    Label not found
 
MS-DOS recognizes a batch-program line beginning with a colon (:) as a label
and does not process it as a command. If a line begins with a colon, MS-DOS
ignores any commands on that line.
 
Using GOTO for conditional operations
 
GOTO is often used on the same command line with other commands to perform
conditional operations. For more information about using GOTO for
conditional operations, see the <IF> command.
 

 
                               GOTOExample
 
The following batch program formats a disk in drive A as a system disk. If
the operation is successful, the GOTO command directs MS-DOS to a label
named "end".
 
    echo off
    format a: /s
    if not errorlevel 1 goto end
    echo An error occurred during formatting.
    :end
    echo Successfully formatted the disk in drive A.
 

 
                                  GRAPHICS
 
Loads a program into memory that allows MS-DOS to print the information
displayed on your screen. Use the GRAPHICS command only if you are using a
color or graphics adapter.
 
The GRAPHICS command supports the CGA, EGA, and VGA graphics display modes.
 
Syntax
 
    GRAPHICS [type] [[drive:][path]filename] [/R] [/B] [/LCD]
    [/PRINTBOX:STD|/PRINTBOX:LCD]
 
Parameters
 
type
    Specifies the type of printer. The following list shows each valid value
    for this parameter and gives a brief description of its meaning:
 
    COLOR1
        An IBM Personal Computer Color Printer with black ribbon
 
    COLOR4
        An IBM Personal Computer Color Printer with RGB (red, green, blue,
        and black) ribbon
 
    COLOR8
        An IBM Personal Computer Color Printer with CMY (cyan, magenta,
        yellow, and black) ribbon
 
    HPDEFAULT
        Any Hewlett-Packard PCL printer
 
    DESKJET
        A Hewlett-Packard DeskJet printer
 
    GRAPHICS
        An IBM Personal Graphics Printer, IBM Proprinter, or IBM Quietwriter
        printer
 
    GRAPHICSWIDE
        An IBM Personal Graphics Printer with an 11-inch-wide carriage
 
    LASERJET
        A Hewlett-Packard LaserJet printer
 
    LASERJETII
        A Hewlett-Packard LaserJet II printer
 
    PAINTJET
        A Hewlett-Packard PaintJet printer
 
    QUIETJET
        A Hewlett-Packard QuietJet printer
 
    QUIETJETPLUS
        A Hewlett-Packard QuietJet Plus printer
 
    RUGGEDWRITER
        A Hewlett-Packard RuggedWriter printer
 
    RUGGEDWRITERWIDE
        A Hewlett-Packard RuggedWriterwide printer
 
    THERMAL
        An IBM PC-convertible Thermal Printer
 
    THINKJET
        A Hewlett-Packard ThinkJet printer
 
[drive:][path]filename
    Specifies the location and name of the printer profile that contains
    information about all supported printers. If this parameter is omitted,
    MS-DOS looks for a file called GRAPHICS.PRO in the current directory and
    in the directory that contains the GRAPHICS.COM file.
 
Switches
 
/R
    Prints the image as it appears on the screen (white characters on a
    black background) rather than reversed (black characters on a white
    background). The latter occurs by default.
 
/B
    Prints the background in color. This switch is valid for COLOR4 and
    COLOR8 printers.
 
/LCD
    Prints an image by using the liquid crystal display (LCD) aspect ratio
    instead of the CGA aspect ratio. The effect of this switch is the same
    as that of /PRINTBOX:LCD.
 
/PRINTBOX:STD or /PRINTBOX:LCD
    Selects the print-box size. Check the first operand of the PRINTBOX
    statement in your GRAPHICS.PRO file. If that operand is STD, specify the
    /PRINTBOX:STD switch. If that operand is LCD, specify the /PRINTBOX:LCD
    switch. You can abbreviate PRINTBOX as PB.
 
Related Command
 
For information about printing text files, see the <PRINT> command.
 

 
                              GRAPHICSNotes
 
Printing the contents of the screen
 
To print the contents of the screen, press the SHIFT+PRINT SCREEN key
combination. If the computer is in 320 x 148 x 200 color graphics mode and
if the printer type is color1 or graphics, the GRAPHICS command prints the
screen contents with as many as four shades of gray. If the computer is in
640 x 148 x 200 color graphics mode, GRAPHICS prints the screen contents
sideways on the paper (landscape orientation). You cannot use the
SHIFT+PRINT SCREEN key combination to print the contents of a screen to a
PostScript printer.
 
Effect on memory
 
The GRAPHICS command decreases the amount of available conventional memory.
 
Loading a new profile
 
If you have already loaded a printer profile and you want to load another
one by using the GRAPHICS command, the new profile must be smaller than the
one already loaded.
 
To load a new profile that is larger than the one currently loaded, you must
restart your system and then use the GRAPHICS command to load the new
profile.
 
If you try to use only the GRAPHICS command to load a new profile that is
larger than the currently loaded profile, MS-DOS displays the following
message:
 
    Unable to reload with profile supplied
 

 
                             GRAPHICSExample
 
To prepare to print a graphics screen on your printer, type the following
command:
 
    graphics
 
After you display the information you want to print, press SHIFT+PRINT
SCREEN. MS-DOS scans the information displayed on the screen and sends it to
the printer.
 

 
                                    HELP
 
Starts MS-DOS Help.
 
Syntax
 
    HELP [/B] [/G] [/H] [/NOHI] [topic]
 
Switches
 
/B
    Allows use of a monochrome monitor with a color graphics card.
 
/G
    Provides the fastest update of a CGA screen.
 
/H
    Displays the maximum number of lines possible for your hardware.
 
/NOHI
    Allows the use of a monitor without high-intensity support.
 
Parameter
 
topic
    Specifies the command whose help topic you want to display.
 
Related Command
 
For information about other online Help information, see the <FASTHELP>
command.
 

 
                               HELPExample
 
To display information about the COPY command, type the following at the
command prompt:
 
    help copy
 
To display the MS-DOS Help table of contents, type HELP. From the table of
contents, you can choose the command topic you want to view.
 

 
                                 HIMEM.SYS
 
HIMEM is an extended-memory managera program that coordinates the use of
your computer's extended memory, including the high memory area (HMA), so
that no two applications or device drivers use the same memory at the same
time.
 
You install HIMEM by adding a <DEVICE> command for HIMEM.SYS to your
CONFIG.SYS file. The HIMEM.SYS command line must come before any commands
that start applications or device drivers that use extended memory; for
example, the HIMEM.SYS command line must come before the EMM386.EXE command
line.
 
Syntax
 
    DEVICE=[drive:][path]HIMEM.SYS [/A20CONTROL:ON|OFF] [/CPUCLOCK:ON|OFF]
    [/EISA] [/HMAMIN=m] [/INT15=xxxx] [/NUMHANDLES=n] [/MACHINE:xxxx]
    [/SHADOWRAM:ON|OFF] [/TESTMEM:ON|OFF] [/VERBOSE]
 
In most cases, you won't need to specify command-line options. The default
values for HIMEM.SYS are designed to work with most hardware.
 
Parameter
 
[drive:][path]
    Specifies the location of the HIMEM.SYS file. HIMEM.SYS should always be
    located on the same drive that contains your MS-DOS files. If the
    HIMEM.SYS file is in the root directory of your startup drive, you don't
    need to include a path. However, you must always include the complete
    filename (HIMEM.SYS).
 
Switches
 
/A20CONTROL:ON|OFF
    Specifies whether HIMEM is to take control of the A20 line even if A20
    was on when HIMEM was loaded. The A20 handler gives your computer access
    to the HMA. If you specify /A20CONTROL:OFF, HIMEM takes control of the
    A20 line only if A20 was off when HIMEM was loaded. The default setting
    is /A20CONTROL:ON.
 
/CPUCLOCK:ON|OFF
    Specifies whether HIMEM is to affect the clock speed of your computer.
    If your computer's clock speed changes when you install HIMEM,
    specifying /CPUCLOCK:ON may correct the problem; however, enabling this
    option slows down HIMEM. The default setting is /CPUCLOCK:OFF.
 
/EISA
    Specifies that HIMEM should allocate all available extended memory. This
    switch is necessary only on an EISA (Extended Industry Standard
    Architecture) computer with more than 16 MB of memory; on other
    computers, HIMEM automatically allocates all available extended memory.
 
/HMAMIN=m
    Specifies how many kilobytes of memory an application must require for
    HIMEM to give that application use of the HMA. Only one application can
    use the HMA at a time; HIMEM allocates the HMA to the first application
    that meets the memory-use requirements set by this option. You can
    specify a value from 0 to 63.
 
    Set /HMAMIN to the amount of memory required by the application that
    uses the most HMA memory.
 
    The /HMAMIN option is not required; the default value is zero. Omitting
    this option (or setting it to zero) specifies that HIMEM allocate the
    HMA to the first application that requests it, regardless of how much of
    the HMA the application is going to use.
 
    The /HMAMIN option has no effect when Windows is running in 386 enhanced
    mode.
 
/INT15=xxxx
    Allocates the amount of extended memory (in kilobytes) to be reserved
    for the Interrupt 15h interface. Some older applications use the
    Interrupt 15h interface to allocate extended memory rather than using
    the XMS (eXtended-Memory Specification) method provided by HIMEM. If you
    use these applications, you can ensure enough memory is available to
    them by setting xxxx to 64 KB larger than the amount required by the
    application.
 
    You can specify a value from 64 to 65535; however, you cannot specify
    more memory than your system has available. If you specify a value less
    than 64, the value becomes 0. The default value is 0.
 
/NUMHANDLES=n
    Specifies the maximum number of extended-memory block (EMB) handles that
    can be used simultaneously. You can specify a value from 1 to 128; the
    default value is 32. Each additional handle requires an additional 6
    bytes of memory.
 
    The /NUMHANDLES option has no effect when Windows is running in 386
    enhanced mode.
 
/MACHINE:xxxx
    Specifies what type of computer you are using. Usually, HIMEM can detect
    your computer type successfully; however, there are a few computers that
    HIMEM cannot detect. On such systems, HIMEM uses the default system type
    (IBM AT or compatible). You might need to include the /MACHINE option if
    your computer is a type that HIMEM cannot detect and if HIMEM does not
    work properly on your system by using the default system type.
 
    Currently, systems that require this option include Acer 1100, Wyse, and
    IBM 7552.
 
    The value for xxxx can be any of the codes or their equivalent numbers
    listed in the following table.
 
Code         Number  Computer type

 
at           1       IBM AT or 100% compatible
 
ps2          2       IBM PS/2
 
ptlcascade   3       Phoenix Cascade BIOS
 
hpvectra     4       HP Vectra (A & A+)
 
att6300plus  5       AT&T 6300 Plus
 
acer1100     6       Acer 1100
 
toshiba      7       Toshiba 1600 & 1200XE
 
wyse         8       Wyse 12.5 Mhz 286
 
tulip        9       Tulip SX
 
zenith       10      Zenith ZBIOS
 
at1          11      IBM PC/AT (alternative delay)
 
at2          12      IBM PC/AT (alternative delay)
 
css          12      CSS Labs
 
at3          13      IBM PC/AT (alternative delay)
 
philips      13      Philips
 
fasthp       14      HP Vectra
 
ibm7552      15      IBM 7552 Industrial Computer
 
bullmicral   16      Bull Micral 60
 
dell         17      Dell XBIOS
 
/SHADOWRAM:ON|OFF
    Specifies whether to disable shadow RAM (SHADOWRAM:OFF) or to leave the
    ROM code running from RAM (SHADOWRAM:ON).
 
    Some computers make ROM code run faster by "shadowing" it in RAMthat
    is, by copying the ROM code into faster RAM memory at startup, which
    uses some extended memory. On computers that use shadow RAM and have
    less than 2 MB of RAM, HIMEM usually attempts to disable shadow RAM to
    recover additional extended memory for Windows to use. (HIMEM can
    disable shadow RAM only on certain types of systems.) When HIMEM
    disables shadow RAM, the ROM code runs in the slower ROM instead of RAM;
    therefore, your computer might run slightly slower than it did before.
 
/TESTMEM:ON|OFF
    Determines whether HIMEM performs a memory test when your computer
    starts. By default, HIMEM tests the reliability of your computer's
    extended memory each time your computer starts. This test can identify
    memory that is no  longer reliable; unreliable memory can cause system
    instability or loss of data. HIMEM's memory test is more thorough than
    the standard power-up memory test performed by most computers. To
    prevent HIMEM from performing the memory test, specify /TESTMEM:OFF.
    Disabling the memory test will shorten the startup process. (The default
    setting is /TESTMEM:ON.)
 
/VERBOSE
    Directs HIMEM to display status and error messages while loading. By
    default, HIMEM does not display any messages unless it encounters an
    error. You can abbreviate /VERBOSE as /V. (To display status messages
    without adding the /VERBOSE switch, press and hold the ALT key while
    HIMEM starts and loads.)
 

 
                              HIMEM.SYSNotes
 
HIMEM tests the reliability of your extended memory
 
The MS-DOS 6.2 version of HIMEM.SYS includes a new safety feature: it tests
your computer's extended memory each time your computer starts. HIMEM tests
the memory by writing and reading data to each memory address and checking
for differences in the data. If the data HIMEM reads from an address differs
from the data it just wrote to that address, then the memory at that address
is unreliable. Unreliable memory can cause system instability or loss of
data. HIMEM's memory test is more thorough than the standard power-up memory
test performed by most computers.
 
If HIMEM detects unreliable memory, it displays the following message and
does not load:
 
    ERROR: HIMEM.SYS has detected unreliable extended memory at address
    XXXXXXXXh.
 
If you receive this message, you should have your computer's memory checked
by a qualified computer hardware technician. Although you can disable the
memory test and load HIMEM by using the /TESTMEM:OFF switch, it's not
advisable to do so until you have had the memory checked by a technician.
 
Default memory allocation
 
Only one program at a time can use the high memory area (HMA). If you omit
the /HMAMIN=m switch (or set it to 0), HIMEM reserves the HMA for the first
program that requests it and that meets the memory requirements set by the
/HMAMIN=m switch. To ensure the most efficient use of your system's high
memory area, set /HMAMIN=m to the amount of memory required by the program
that uses the most HMA memory.
 
Loading MS-DOS into the high memory area
 
HIMEM or another XMS driver must be loaded in order to load MS-DOS into the
high memory area (HMA). You load MS-DOS into the HMA by using the DOS=HIGH
command in your CONFIG.SYS file. (The DOS=HIGH command can appear anywhere
in the CONFIG.SYS file.)
 

 
                            HIMEM.SYSExamples
 
To run HIMEM using the default values, add the following command line to
your CONFIG.SYS file:
 
    device=himem.sys
 
The command line shown above does not specify a path for the HIMEM.SYS file;
therefore, MS-DOS searches for the HIMEM.SYS file only in the root directory
of your startup drive. Because this command line does not include additional
options, HIMEM uses the default values for those options. HIMEM allocates
the HMA to the first program that requests it and allows the simultaneous
use of up to 32 extended-memory handles.
 
Increasing the number of memory handles that HIMEM provides
 
To specify that a maximum of 128 extended-memory handles can be used
simultaneously, add the following command line to your CONFIG.SYS file:
 
    device=c:\dos\himem.sys /numhandles=128
 

 
                                     IF
 
Performs conditional processing in batch programs. If the condition
specified by an IF command is true, MS-DOS carries out the command that
follows the condition. If the condition is false, MS-DOS ignores the
command. You can use this command only in batch programs.
 
Syntax
 
    IF [NOT] ERRORLEVEL number command
 
    IF [NOT] string1==string2 command
 
    IF [NOT] EXIST filename command
 
Parameters
 
NOT
    Specifies that MS-DOS should carry out the command only if the condition
    is false.
 
ERRORLEVEL number
    Specifies a true condition only if the previous program run by
    COMMAND.COM returned an exit code equal to or greater than number.
 
command
    Specifies the command that MS-DOS should carry out if the preceding
    condition is met.
 
string1==string2
    Specifies a true condition only if string1 and string2 are the same.
    These values can be literal strings or batch variables (%1, for
    example). Literal strings do not need quotation marks.
 
EXIST filename
    Specifies a true condition if filename exists.
 

 
                                IFExamples
 
The following example tests for the existence of a directory. The IF command
cannot be used to test directly for a directory, but the null (NUL) device
does exist in every directory on the hard drive. Therefore, you can test for
the null device to determine whether a directory exists on the hard drive.
 
    if exist c:\mydir\nul goto process
 
The following example displays the message "Can't find data file" if MS-DOS
cannot find the file PRODUCT.DAT:
 
    if not exist product.dat echo Can't find data file
 
When a program stops, it returns an exit code to MS-DOS. For example, a
value of 0 is typically used to indicate that a program was successfully
executed. The ERRORLEVEL parameter lets you use exit codes as conditions.
 
The following example displays an error message if an error occurs during
formatting of the disk in drive A. If no error occurs, the error message is
skipped.
 
    :begin
    echo off
    format a: /s
    if not errorlevel 1 goto end
    echo An error occurred during formatting.
    :end
    echo End of batch program.
 
For another example of how the ERRORLEVEL parameter is used, see the
<CHOICE> command.
 

 
                                  INCLUDE
 
Includes the contents of one configuration block within another. You can use
this command only in your CONFIG.SYS file.
 
The INCLUDE command is one of six special CONFIG.SYS commands used for
defining multiple configurations within a single CONFIG.SYS file. With
multiple configurations, you define a menu that appears when your computer
starts. Each menu item corresponds to a block of commands, or "configuration
block," in your CONFIG.SYS file. For more information about multiple
configurations and configuration blocks, see the chapter "Configuring Your
System" in the MS-DOS 6 User's Guide.
 
Syntax
 
    INCLUDE=blockname
 
Parameter
 
blockname
    Specifies the name of the configuration block to include.
 
Related Commands
 
The INCLUDE command is one of six special CONFIG.SYS commands for defining
multiple configurations. The other commands are for defining the startup
menu, and are as follows:
 
  The <MENUITEM> command, which defines an item on the menu.
 
  The <MENUDEFAULT> command, which specifies the default menu item.
 
  The <MENUCOLOR> command, which defines the color of the menu's text and
   screen background.
 
  The <SUBMENU> command, which defines a submenu.
 
  The <NUMLOCK> command, which specifies the state of the NUM LOCK key when
   the startup menu appears. (Although NUMLOCK can be used anywhere in the
   CONFIG.SYS file, it is especially useful when defining a startup menu.)
 
For an overview of the procedure for defining multiple configurations, see
the topic <Commands for Defining Multiple Configurations>
 

 
                             INCLUDEExamples
 
The following CONFIG.SYS file defines three configurations:
 
    [menu]
    menuitem=base_config, Base configuration only
    menuitem=full_config, Normal configuration
    menuitem=net_config, Normal configuration with network
 
    [base_config]
    dos=high
    device=c:\dos\himem.sys
 
    [full_config]
    include=base_config
    dos=umb
    device=c:\dos\emm386.exe ram
    devicehigh=c:\dos\ramdrive.sys 512
 
    [net_config]
    include=full_config
    devicehigh=c:\net\network.sys
 
    [common]
 
This CONFIG.SYS file contains four configuration blocks. The [base_config]
block contains two typical CONFIG.SYS commands. The [full_config] block
includes the commands in [base_config] plus the DOS=UMB command, a DEVICE
command, and a DEVICEHIGH command. The third configuration, [net_config],
includes all the commands in [full_config], which in turn includes those in
[base_config]. The [common] block appears at the end of the CONFIG.SYS file.
It is a good idea to end your CONFIG.SYS file with a [common] block so that
installation programs can successfully append commands to your CONFIG.SYS
file.
 

 
                                  INSTALL
 
Loads a memory-resident program into memory when you start MS-DOS. You can
use this command only in your CONFIG.SYS file.
 
Memory-resident programs stay in memory as long as your computer is on. They
can be used even when other programs are active. You can use the INSTALL
command to load MS-DOS memory-resident programsfor example, Fastopen,
Keyb, Nlsfunc, and Share.
 
Syntax
 
    INSTALL=[drive:][path]filename [command-parameters]
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the memory-resident program you want
    to run.
 
command-parameters
    Specifies parameters for the program you specify for filename.
 

 
                               INSTALLNotes
 
INSTALL does not create an environment for a program it loads. Therefore,
slightly less memory is used if you load a program with INSTALL rather than
from your AUTOEXEC.BAT file. Some programs might not run correctly if they
are loaded with INSTALL. Do not use INSTALL to load programs that use
environment variables or shortcut keys or that require COMMAND.COM to be
present to handle critical errors.
 
Order of CONFIG.SYS processing
 
All INSTALL commands are processed after any of the DEVICE commands and
before the command interpreter is loaded. You cannot load a memory-resident
program before a device driver loaded with the DEVICE command.
 

 
                              INSTALLExample
 
Suppose you want to install FASTOPEN.EXE, located in the DOS directory on
drive C, from your CONFIG.SYS file instead of from your AUTOEXEC.BAT file or
the command line. In addition, you want to specify that Fastopen is to track
the opening of up to 100 files and directories on drive C. To do this,
include the following command in your CONFIG.SYS file:
 
    install=c:\dos\fastopen.exe c:=100
 

 
                                  INTERLNK
 
Connects two computers via parallel or serial ports and enables the
computers to share disks and printer ports. For example, you could connect a
laptop computer to a desktop computer and share files. You must install the
<INTERLNK.EXE> device driver before you can use this command.
 
Syntax
 
    INTERLNK [client[:]=[server][:]]
 
To display the current status of the Interlnk program, use the following
syntax:
 
    INTERLNK
 
Parameters
 
client
    Specifies the letter of the client drive that is redirected to a drive
    on the Interlnk server. The drive must be one that was redirected when
    you started Interlnk.
 
server
    Specifies the letter of the drive on the Interlnk server that will be
    redirected. The drive must be one listed in the This Computer (Server)
    column of the Interlnk server screen. If no drive letter is specified,
    the client drive will no longer be redirected.
 
Related Commands
 
For more information about the Interlnk device driver, see <INTERLNK.EXE>.
 
For more information about Intersvr, see the <INTERSVR> command.
 
For more information about setting the number of available drive letters,
see the <LASTDRIVE> command.
 

 
                              INTERLNKNotes
 
Installing the INTERLNK.EXE device driver
 
You must use the DEVICE command to install the <INTERLNK.EXE> device driver
before you can use the INTERLNK command.
 
Canceling redirection on a drive
 
To cancel redirection of a client drive to a server drive, specify only the
client drive and the equal sign (=).
 
Starting INTERLNK without a server
 
If you use INTERLNK to connect to a computer that is not running
<INTERSVR>, INTERLNK will show the connection as three additional floppy
disk drives. However, if you try to show the contents of these drives, they
will appear empty. To show the contents of the redirected drives, the server
must be running INTERSVR.
 
Assigning drive letters
 
When you connect two computers using INTERLNK, each additional drive will be
assigned the next available drive letter. Because the <LASTDRIVE> setting in
your CONFIG.SYS file determines how many drive letters are available, make
sure LASTDRIVE is set high enough to accomodate the redirected drives.
 
Pin Connections for a Serial Cable
 
This section describes the wiring specifications for serial Interlnk
cables.
 
Make a serial cable with either a 9-pin or a 25-pin female connector on both
ends. Three wires are required for data transmission: Ground-Ground,
Transmit-Receive, and Receive- Transmit. Seven wires are required if you
want to use the remote copy feature. Wire the cable as follows:
 
9 pin           25 pin              25 pin          9 pin
=====           ======              ======          =====
pin 5           pin 7   <>    pin 7           pin 5
(Ground-Ground)
pin 3           pin 2   <>    pin 3           pin 2
(Transmit-Receive)
pin 7           pin 4   <>    pin 5           pin 8
(RTS - CTS)
pin 6           pin 6   <>    pin 20          pin 4
(DSR - DTR)
pin 2           pin 3   <>    pin 2           pin 3
(Receive-Transmit)
pin 8           pin 5   <>    pin 4           pin 7
(CTS - RTS)
pin 4           pin 20  <>    pin 6           pin 6
(DTR - DSR)
 
Pin Connections for a Parallel Cable
 
This section describes the wiring specifications for parallel Interlnk
cables.
 
Make a parallel cable with male DB-25 connectors at both ends. Eleven wires
are required for data transmission.
 
25 pin          25 pin
======          ======
pin 2   <>  pin 15
pin 3   <>  pin 13
pin 4   <>  pin 12
pin 5   <>  pin 10
pin 6   <>  pin 11
pin 15  <>  pin 2
pin 13  <>  pin 3
pin 12  <>  pin 4
pin 10  <>  pin 5
pin 11  <>  pin 6
pin 25  <>  pin 25 (Ground-Ground)
 

 
                             INTERLNKExamples
 
Examples
 
Suppose drive E exists on a server, and INTERSVR is running. To redirect
drive G on the client to drive E on the server, type the following command:
 
    interlnk g=e
 
To cancel the redirection of client drive F, type the following command:
 
    interlnk f=
 

 
                                INTERLNK.EXE
 
Redirects requests for operations on one or more Interlnk client drives or
printer ports to one or more drives or printer ports on the Interlnk server.
This device driver must be loaded by a <DEVICE> or <DEVICEHIGH> command in
your CONFIG.SYS file.
 
You must install the INTERLNK.EXE device driver before you can use the
<INTERLNK> and <INTERSVR> commands.
 
Syntax
 
    DEVICE=[drive:][path]INTERLNK.EXE [/DRIVES:n] [/NOPRINTER]
    [/COM[:][n|address]] [/LPT[:][n|address]] [/AUTO] [/NOSCAN] [/LOW]
    [/BAUD:rate] [/V]
 
Parameters
 
[drive:][path]
    Specifies the location of the INTERLNK.EXE file.
 
Switches
 
/DRIVES:n
    Specifies the number of redirected drives. By default, the number is 3.
    If you specify 0 as a value for n, Interlnk redirects only printers.
 
/NOPRINTER
    Specifies that printers not be redirected when you install INTERLNK.EXE.
    By default, Interlnk redirects all available printer ports.
 
/COM[:][n|address]
    Specifies a serial port to use for data transfer. The n parameter
    specifies the number of the serial port. The address parameter specifies
    the address of the serial port. If you omit n or address, the Interlnk
    client searches all serial ports and uses the first port that it finds
    connected to the server. If you specify the /COM switch and omit the
    /LPT switch, the client searches only for serial ports. By default,
    Interlnk scans all serial and parallel ports.
 
/LPT[:][n|address]
    Specifies a parallel port to use for data transfer. The n parameter
    specifies the number of the parallel port. The address parameter
    specifies the address of the parallel port. If you omit n or address,
    the Interlnk client uses the first parallel port that it finds connected
    to the server. If you specify the /LPT switch and omit the /COM switch,
    the client searches only for parallel ports. By default, Interlnk scans
    all serial and parallel ports.
 
/AUTO
    Installs the INTERLNK.EXE device driver in memory only if the client can
    establish a connection with the server when the client starts up. By
    default, Interlnk is installed in memory even if the client cannot
    establish a connection with the server.
 
/NOSCAN
    Installs the INTERLNK.EXE device driver in memory, but prevents
    establishing a connection between client and server during setup. By
    default, the client tries to establish a connection with the server as
    soon as you install INTERLNK.EXE.
 
/LOW
    Loads the INTERLNK.EXE device driver into conventional memory, even if
    the upper memory area is available. By default, INTERLNK.EXE is loaded
    into the upper memory area if the upper memory area is available.
 
/BAUD:rate
    Sets a maximum baud rate for serial communication. Valid values for rate
    are 9600, 19200, 38400, 57600, and 115200. The default is 115200.
 
/V
    Prevents conflicts with a computer's timer. Specify this switch if you
    have a serial connection between computers and one of them stops running
    when you use Interlnk to access a drive or printer port.
 

 
                            INTERLNK.EXENotes
 
Specifying the number of drives
 
When specifying the number of redirected drives in the /DRIVES switch, make
sure the <LASTDRIVE> command in your CONFIG.SYS file is set high enough to
accomodate that number of redirected drives.
 
Loading into the upper memory area
 
By default, the Interlnk device driver is loaded into the upper memory area,
if MS-DOS 6 UMB support is enabled and memory is available. To load the
device driver in conventional memory, use the /LOW switch.
 
Position of the Interlnk command in the CONFIG.SYS file
 
The position of the DEVICE command that loads INTERLNK.EXE can affect
pre-existing drive assignments. For example, suppose your computer includes
a floppy disk drive (A), two hard disk drives (C and D), and two RAM drives
(E and F). If you load the INTERLNK.EXE device driver before installing the
RAM drives, and you choose to redirect three drives, Interlnk will assign
letters E, F, and G to the redirected drives and letters H and I to the RAM
drives. To prevent this from happening, load INTERLNK.EXE last in your
CONFIG.SYS file.
 
Saving memory
 
By default, the Interlnk device driver loads all its code into memory. You
can save memory by specifying the /NOPRINTER, /LPT, or /COM switch. If you
specify the /NOPRINTER switch, the Interlnk program does not load code that
redirects printers. If you specify the /LPT switch without the /COM switch,
the program does not load code that supports serial ports. If you specify
the /COM switch without the /LPT switch, the program does not load code that
supports parallel ports.
 
Using a serial mouse with Microsoft Windows
 
If you are using a serial mouse with Microsoft Windows, specify either the
/LPT switch or a /COM switch that designates a COM port other than the one
the mouse is using. For example, if the serial mouse uses COM1, and you are
using a parallel connection, specify the /LPT switch to prevent Interlnk
from scanning all COM ports.
 
Redirecting LPT1 or LPT2 and printing from Microsoft Windows
 
If you redirect LPT1 or LPT2 and print from Microsoft Windows, use Control
Panel to assign the printer to either LPT1.DOS or LPT2.DOS.
 
Version of MS-DOS
 
Some features of MS-DOS may not be available to the client computer if you
are running a different DOS version on your Interlnk server. For example, if
you have large partitions on your Interlnk server and are running MS-DOS 3.0
on your client, the partitions will not be available to the client because
MS-DOS 3.0 does not support them.
 
Running an application located on the server
 
If you use the Interlnk program to run an application located on the server,
make sure the application is configured for the computer you have designated
as the Interlnk client.
 
Limitations on using INTERLNK with other commands
 
The following commands do not work with the INTERLNK.EXE device driver:
 
    CHKDSK         FORMAT
 
    DEFRAG         MIRROR
 
    DISKCOMP       SYS
 
    DISKCOPY       UNDELETE
 
    FDISK          UNFORMAT
 

 
                           INTERLNK.EXEExamples
 
Suppose your Interlnk files are located in the DOS directory on drive C, and
you use the serial port to connect to another computer. To start Interlnk
and specify that printers not be redirected, add the following command line
to your CONFIG.SYS file:
 
    device=c:\dos\interlnk.exe /com /noprinter
 
To specify that Interlnk use a non-standard COM port whose address is 3F8,
add the following line to your CONFIG.SYS file:
 
    device=c:\dos\interlnk.exe /com:3f8
 

 
                                  INTERSVR
 
Starts the Interlnk server.
 
Syntax
 
    INTERSVR [drive:[...]] [/X=drive:[...]] [/LPT:[n|address]]
    [/COM:[n|address]] [/BAUD:rate] [/B] [/V]
 
To copy Interlnk files from one computer to another, use the following
syntax:
 
    INTERSVR /RCOPY
 
Parameter
 
drive:
    Specifies the letter(s) of the drive(s) that will be redirected. By
    default, all drives are redirected.
 
Switches
 
/X=drive:
    Specifies the letter(s) of drive(s) that will not be redirected. By
    default, all drives are redirected.
 
/LPT:[n|address]
    Specifies a parallel port to use. The n parameter specifies the number
    of the parallel port. The address parameter specifies the address of the
    parallel port. If you omit n or address, the Interlnk server uses the
    first parallel port that it finds connected to the client. If you
    specify the /LPT switch and omit the /COM switch, the server searches
    only for parallel ports. By default, all parallel and serial ports are
    scanned.
 
/COM:[n|address]
    Specifies a serial port to use. The n parameter specifies the number of
    the serial port. The address parameter specifies the address of the
    serial port. If you omit n or address, the Interlnk server searches all
    serial ports and uses the first port that it finds connected to the
    client. If you specify the /COM switch and omit the /LPT switch, the
    server searches only for serial ports. By default, all parallel and
    serial ports are scanned.
 
/BAUD:rate
    Sets a maximum serial baud rate. Valid values for rate are 9600, 19200,
    38400, 57600, and 115200. The default value is 115200.
 
/B
    Displays the Interlnk server screen in black and white. Use this switch
    if you have problems reading your monochrome monitor.
 
/V
    Prevents conflicts with a computer's timer. Use this switch if you have
    a serial connection between computers and one of them stops running when
    you use Interlnk to access a drive or printer port.
 
/RCOPY
    Copies Interlnk files from one computer to another, provided that the
    computers are connected with a 7-wire, null-modem serial cable and that
    the <MODE> command is available on the computer where you are installing
    Interlnk.
 
Related Commands
 
For more information about Interlnk, see <INTERLNK> and <INTERLNK.EXE>.
 

 
                              INTERSVRNotes
 
Specifying the order of drives
 
Interlnk redirects drives in the order you specify. The first server drive
specified is redirected to the first available client drive, the second
server drive specified is redirected to the second available client drive,
and so forth.
 
Redirected devices
 
Interlnk does not redirect network drives, CD-ROM drives, or any other
device that uses a redirection interface.
 
Remote copy procedure
 
To copy Interlnk files from one computer to another by using the /RCOPY
switch, you must connect the 7-wire, null-modem serial cable to the
computers' serial ports.
 
Using a serial mouse with Microsoft Windows
 
If you are using a serial mouse with Microsoft Windows and you start the
Interlnk server while Windows is running, you need to specify either the
/LPT switch or a /COM switch that designates a COM port other than the one
the mouse is using. For example, if the serial mouse uses COM1 and you are
using a parallel connection, specify the /LPT switch to prevent Interlnk
from scanning all COM ports.
 
Using Interlnk in a task-switching or multitasking environment
 
If you start the Interlnk server in a task-switching or multitasking
environment, task switching and key combinations that switch you out of your
current task are disabled. To restore these functions, quit the server.
 
Limitations on using INTERSVR with other commands
 
The following commands do not work with the Interlnk server:
 
    CHKDSK         FORMAT
 
    DEFRAG         MIRROR
 
    DISKCOMP       SYS
 
    DISKCOPY       UNDELETE
 
    FDISK          UNFORMAT
 

 
                             INTERSVRExamples
 
Suppose you have two computers that each include drives A, B, and C. To
start the Interlnk server and specify that server drive C be redirected to
client drive D, server drive A be redirected to client drive E, and server
drive B be redirected to client drive F, type the following command:
 
    intersvr c: a: b:
 
To specify that all server drives except drive A be redirected and that LPT2
be used to connect to the client, type the following command:
 
    intersvr /x=a: /lpt2
 

 
                                    KEYB
 
Starts the Keyb program, which configures a keyboard for a specific
language.
 
Use Keyb to configure a keyboard for a language other than United States
English. For an introduction to the Keyb program, see the chapter
"Customizing for International Use" in the MS-DOS 6 User's Guide.
 
Syntax
 
At the command prompt, use the following syntax:
 
    KEYB [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn]
 
In your CONFIG.SYS file, use the following syntax:
 
    INSTALL=[[dos-drive:]dos-path]KEYB.COM
    [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn]
 
Parameters
 
xx
    Specifies the code for a keyboard layout. See the table at the end of
    this topic for a list of valid values for this parameter.
 
yyy
    Specifies the character set (code page). See the table at the end of
    this topic for a list of valid values for this parameter. If this value
    is not specified, KEYB uses the current character set.
 
[drive:][path]filename
    Specifies the location and name of the keyboard definition file. The
    default filename is KEYBOARD.SYS. If KEYBOARD.SYS is in a directory
    included in the path, you do not have to specify these parameters.
    (MS-DOS 6.2 includes two keyboard definition files: KEYBOARD.SYS, the
    default file, and KEYBRD2.SYS, which provides support for keyboards not
    included in KEYBOARD.SYS. For information about using KEYBRD2.SYS, see
    the README.TXT file.)
 
[dos-drive:]dos-path
    Specifies the location of the KEYB.COM file.
 
Switches
 
/E
    Specifies that an enhanced keyboard is installed. Use this switch if you
    are using an enhanced keyboard with an 8086 computer.
 
/ID:nnn
    Specifies the keyboard in use. This switch is valid only for countries
    that have more than one keyboard layout for the same language (France,
    Italy, and the United Kingdom). See the following table for a list of
    valid values for nnn.
 
Values for xx, yyy, and nnn
 
The following table shows the valid values for xx, yyy, and nnn for each
country or language supported by KEYBOARD.SYS:
 
Country or         Keyboard layout    Character set      Keyboard
language           (xx value)         (yyy value)        identification
                                                         (ID:nnn value)

 
Belgium            be                 850, 437
 
Brazil             br                 850, 437
 
Canadian-French    cf                 850, 863
 
Czechoslovakia     cz                 852, 850
(Czech)
 
Czechoslovakia     sl                 852, 850
(Slovak)
 
Denmark            dk                 850, 865
 
Finland            su                 850, 437
 
France             fr                 850, 437           120, 189
 
Germany            gr                 850, 437
 
Hungary            hu                 852, 850
 
Italy              it                 850, 437           141, 142
 
Latin America      la                 850, 437
 
Netherlands        nl                 850, 437
 
Norway             no                 850, 865
 
Poland             pl                 852, 850
 
Portugal           po                 850, 860
 
Spain              sp                 850, 437
 
Sweden             sv                 850, 437
 
Switzerland        sf                 850, 437
(French)
 
Switzerland        sg                 850, 437
(German)
 
United Kingdom     uk                 850, 437           166, 168
 
United States      us                 850, 437
 
Yugoslavia         yu                 852, 850
 
This list includes only keyboards supported by the KEYBOARD.SYS file. For a
list of keyboards supported by the KEYBRD2.SYS file, see the README.TXT
file.
 
Related Command
 
For information about using active and prepared character sets, see the
<CHCP> command.
 

 
                                KEYBNotes
 
Installing character sets
 
The character set you specify for yyy must be installed on your system. If
it isn't, any characters not in the current character set will not be
usable.
 
For information about installing a character set, see the chapter
"Customizing for International Use" in the MS-DOS 6 User's Guide.
 
Displaying the current keyboard layout and character set
 
If you use the KEYB command with no parameters or switches, MS-DOS lists the
current keyboard layout (keyboard code), the current keyboard's related
character set (code page), and the current character set (code page) used by
your keyboard and monitor. The information is displayed in the following
format:
 
    Current keyboard code: FR code page: 437
    Current CON code page: 437
 
Switching between Keyb settings
 
To switch from the current Keyb keyboard configuration to the default
keyboard configuration, press CTRL+ALT+F1. To return to the memory-resident
keyboard configuration, press CTRL+ALT+F2. To switch to "typewriter mode,"
the standard for some countries, press CTRL+ALT+F7.
 
Implementing Keyb
 
The following list shows the three different ways that you can start the
Keyb program:
 
  Type KEYB at the command prompt.
 
  Include an INSTALL command for KEYB.COM in your CONFIG.SYS file.
 
  Include the appropriate KEYB command in your AUTOEXEC.BAT file.
 
Keyb exit codes
 
The following list shows each exit code and gives a brief description of its
meaning:
 
0    Keyboard definition file was loaded successfully.
 
1    Invalid keyboard code, character set, or syntax was used.
 
2    Keyboard definition file is bad or missing.
 
4    An error occurred while communicating with the keyboard or monitor.
 
5    The requested character set has not been prepared.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by Keyb. For an example of a batch
program that processes exit codes, see the <CHOICE> command.



 
                               KEYBExample
 
To use a German keyboard if your KEYBOARD.SYS file is in the DOS directory
on drive C, you would type the following command:
 
    keyb gr,,c:\dos\keyboard.sys
 

 
                                   LABEL
 
Creates, changes, or deletes the volume label (name) of a disk.
 
MS-DOS displays the volume label as part of the directory listing. If a
volume serial number exists, MS-DOS displays this number as well.
 
Syntax
 
    LABEL [drive:][label]
 
To specify that MS-DOS is to display the current volume label and serial
number, if they exist, and that MS-DOS is to prompt you to enter a label or
delete the existing one, use the following syntax:
 
    LABEL
 
Parameters
 
drive:
    Specifies the location of the disk you want to name.
 
label
    Specifies the new volume label. You must include a colon (:) between
    drive and label.
 
Related Commands
 
For information about displaying the current disk label, see the <DIR> or
<VOL> command.
 
For information about the volume serial number of a disk, see the <VOL>
command.
 

 
                                LABELNotes
 
LABEL command messages
 
If you do not specify a label when you use the LABEL command, MS-DOS
displays a message in the following format:
 
    Volume in drive A is xxxxxxxxxxx
    Volume Serial Number is xxxx-xxxx
    Volume label (11 characters, ENTER for none)?
 
The "Volume Serial Number" part of the message is not displayed if the disk
has no serial number.
 
You can type the volume label you want or press ENTER to delete the current
label. If a disk has a label and you press ENTER for none, MS-DOS prompts
you with the following message:
 
    Delete current volume label (Y/N)?
 
Press Y to delete the label; press N to keep the label.
 
Limitations on volume label names
 
A volume label can contain as many as 11 characters and can include spaces
but no tabs. Consecutive spaces may be interpreted as a single space.
 
Do not use any of the following characters in a volume label:
 
    * ? / \ | . , ; : + =   [ ] ( ) & ^ < > "
 
MS-DOS displays volume labels in uppercase letters. If you enter a volume
label in lower-case letters, the LABEL command converts the letters to
uppercase.
 
Using LABEL with a redirected drive
 
LABEL does not work on a drive created with the SUBST command.
 

 
                               LABELExample
 
To label a disk in drive A that contains sales information for 1991, you
might type the following:
 
    label a:sales1991
 

 
                                 LASTDRIVE
 
Specifies the maximum number of drives you can access. You can use this
command only in your CONFIG.SYS file.
 
The value you specify represents the last valid drive MS-DOS is to
recognize.
 
Syntax
 
    LASTDRIVE=x
 
Parameter
 
x
    Specifies a drive letter in the range A through Z.
 

 
                              LASTDRIVENotes
 
Default setting
 
If you do not use the LASTDRIVE command, the default value is the letter
following the last one in use. For example, if you are using drives A and C,
the default value is D.
 
Effect on memory
 
MS-DOS allocates a data structure in memory for each drive specified by
LASTDRIVE, so you should not specify more drives than are necessary.
 

 
                             LASTDRIVEExample
 
To set the last drive to M, giving your computer access to 13 drives, you
would include the following command in your CONFIG.SYS file:
 
    lastdrive=m
 

 
                                  LOADFIX
 
Ensures that a program is loaded above the first 64K of conventional memory,
and runs the program.
 
Syntax
 
    LOADFIX [drive:][path]filename [program-parameters]
 
Parameters
 
[drive:][path]
    Specifies the drive and directory of the program.
 
filename
    Specifies the name of the program.
 
program-parameters
    Specifies any of the program's parameters that you want to use.
 

 
                               LOADFIXNote
 
Some programs will display the "Packed file corrupt" message when all or a
portion of the program has been loaded in the first 64K of conventional
memory and cannot run successfully. This error is most likely to occur when
you load device drivers into the upper memory area, thereby freeing more of
the first 64K of conventional memory. If MS-DOS displays this message, use
the LOADFIX command to ensure that a program is loaded above the first 64K
of conventional memory.
 
To use the LOADFIX command, include it at the beginning of the command that
starts the program.
 

 
                              LOADFIXExample
 
To load a program named MYAPP.EXE (in the APPS directory of drive C) and use
the /C parameter (for example, to load the program in character mode), type
the following at the command prompt or include the command in your
AUTOEXEC.BAT file:
 
    loadfix c:\apps\myapp.exe /c
 

 
                               LOADHIGH (LH)
 
Loads a program into the upper memory area. Loading a program into the upper
memory area leaves more room in conventional memory for other programs. (For
more information about optimizing memory, see the chapter "Making More
Memory Available" in the MS-DOS 6 User's Guide.)
 
Syntax
 
    LOADHIGH [drive:][path]filename [parameters]
 
To specify the region(s) of memory into which to load the program, use the
following syntax:
 
    LOADHIGH [/L:region1[,minsize1][;region2[,minsize2]...] [/S]]
    [drive:][path]filename [parameters]
 
You can abbreviate LOADHIGH as LH.
 
Switches
 
/L:region1[,minsize1][;region2[,minsize2]...]
    Specifies one or more regions of memory into which to load the program.
    If /L is not used, MS-DOS loads the program into the largest free
    upper-memory block (UMB) and makes all other UMBs available for the
    program's use. You can use the /L switch to load the program into a
    specific region of memory or to specify which region(s) the program can
    use.
 
    To load the program into the largest block in a specific region of upper
    memory, specify the region number after the /L switch. For example, to
    load the program into the largest free block in region 4, you would type
    /L:4. (To list the free areas of memory, type MEM /F at the command
    prompt.)
 
    When loaded with the /L switch, a program can use only the specified
    memory region. Some programs use more than one area of memory; for those
    programs, you can specify more than one region. (To find out how a
    particular program uses memory, use the MEM /M command and specify the
    program name as an argument.) To specify two or more regions, separate
    the block numbers with a semicolon (;). For example, to use blocks 2 and
    3, you would type /L:2;3.
 
    Normally, MS-DOS loads the program into a UMB in the specified region
    only if that region contains a UMB larger than the program's load size
    (usually equal to the size of the executable program file). If the
    program requires more memory while running than it does when loaded, you
    can use the minsize parameter to ensure that the program will not be
    loaded into a UMB that is too small for it. If you specify a value for
    minsize, MS-DOS loads the program into that region only if it contains a
    UMB that is larger than both the program's load size and the minsize
    value.
 
/S
    Shrinks the UMB to its minimum size while the program is loading. Using
    this switch makes the most efficient use of memory. This switch is
    typically used only by the MemMaker program, which can analyze a
    program's memory use to determine whether the /S switch can safely be
    used when loading that program. This switch can be used only in
    conjunction with the /L switch and affects only UMBs for which a minimum
    size was specified.
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the program you want to load.
 
parameters
    Specifies any command-line information required by the program.
 
Related Commands
 
For information about loading device drivers into upper memory, see the
<DEVICEHIGH> command.
 
For information about using the MemMaker program to move programs to the
upper memory area, see the <MEMMAKER> command.
 

 
                            LOADHIGH (LH)Notes
 
DOS=UMB command required
 
To use the LOADHIGH command, you must include the DOS=UMB command in your
CONFIG.SYS file. For more information about the DOS=UMB command, see the
<DOS> command.
 
Using MemMaker to optimize the upper memory area automatically
 
The MemMaker program, included with MS-DOS 6, automatically optimizes your
system's memory. MemMaker surveys the upper memory area, analyzes the memory
use of your drivers and programs, and determines which drivers and programs
fit best into the available UMBs. MemMaker then adds the LOADHIGH command to
selected lines in your AUTOEXEC.BAT file and adds /L and /S switches as
necessary. For more information about using MemMaker to optimize your
computer's memory, see the chapter "Making More Memory Available" in the
MS-DOS 6 User's Guide.
 
Upper-memory-area manager must be installed
 
Before you can load a program into the upper memory area, you must install
an upper-memory-area manager. MS-DOS provides EMM386.EXE, which manages the
upper memory area for computers with an 80386 or higher processor. To
install EMM386, you add a DEVICE command to your CONFIG.SYS file. (The
DEVICE command for the HIMEM.SYS extended-memory manager must precede the
DEVICE command for EMM386.)
 
How LOADHIGH works
 
When you use the LOADHIGH command to load a program, MS-DOS attempts to load
it into the upper memory area. If there is insufficient space in the upper
memory area, MS-DOS loads the program into conventional memory. To determine
which UMB(s) the program is using, use the MEM /M command and specify the
program name as an argument.
 
Using LOADHIGH in your AUTOEXEC.BAT file
 
The most convenient way to use the LOADHIGH command is to include it in your
AUTOEXEC.BAT file. (If you use the MemMaker program, it automatically adds
any necessary LOADHIGH commands to the AUTOEXEC.BAT file.)
 

 
                          LOADHIGH (LH)Examples
 
The following command loads the DOSKEY program into the upper memory area
and specifies that MS-DOS should load the driver into region 1:
 
    loadhigh /l:1 c:\dos\doskey
 
The following command loads the MYPROG.EXE program into region 1, and also
gives it access to upper memory regions 3 and 4:
 
    lh /L:1;3;4 c:\programs\myprog.exe
 
The following command loads the MYPROG program into conventional memory
(region 0) and also gives it access to upper memory region 1:
 
    loadhigh /l:0;1 c:\programs\myprog.exe
 

 
                                    MEM
 
Displays the amount of used and free memory on your computer.
 
You can use the MEM command to display information about allocated memory
areas, free memory areas, and programs that are currently loaded into
memory.
 
Syntax
 
    MEM [/CLASSIFY|/DEBUG|/FREE|/MODULE modulename] [/PAGE]
 
To display the status of your computer's used and free memory, use the
following syntax:
 
    MEM
 
Switches
 
/CLASSIFY
    Lists the programs that are currently loaded into memory and shows how
    much conventional and upper memory each program is using. MEM /CLASSIFY
    also summarizes overall memory use and lists the largest free memory
    blocks. You can use the /CLASSIFY switch with /PAGE but not with other
    MEM switches. You can abbreviate /CLASSIFY as /C.
 
/DEBUG
    Lists the programs and internal drivers that are currently loaded into
    memory. MEM /DEBUG shows each module's size, segment address, and module
    type, summarizes overall memory use, and displays other information
    useful for programming. You can use the /DEBUG switch with /PAGE but not
    with other MEM switches. You can abbreviate /DEBUG as /D.
 
/FREE
    Lists the free areas of conventional and upper memory. MEM /FREE shows
    the segment address and size of each free area of conventional memory,
    and shows the largest free upper memory block in each region of upper
    memory. You can use the /FREE switch with /PAGE but not with other MEM
    switches. You can abbreviate /FREE as /F.
 
/MODULE programname
    Shows how a program module is currently using memory. You must specify
    the program name after the /MODULE switch. MEM /MODULE lists the areas
    of memory the specified program module has allocated and shows the
    address and size of each area. You can use the /MODULE switch with
    /PAGE, but not with other MEM switches. You can abbreviate /MODULE as
    /M.
 
/PAGE
    Pauses after each screen of output. This switch can be used with any of
    the other MEM switches.
 
Related Command
 
For information about checking the amount of space available on a disk, see
the <CHKDSK> command.
 

 
                                 MEMNotes
 
Specifying the /PAGE switch automatically
 
You can use the DOSKEY program to automatically add the /PAGE switch to the
MEM command. Then, each time you use MEM, it will pause after each screenful
of information even if you don't type the /P switch on the MEM command line.
To do this, add the following commands to your AUTOEXEC.BAT file:
 
    c:\dos\doskey
    doskey mem=mem.exe $* /p
 
Displaying memory status
 
MS-DOS displays the status of extended memory only if you have installed
memory above the 1-megabyte (MB) boundary in your system. MS-DOS displays
the status of expanded memory only if you use expanded memory that conforms
to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification
(LIM EMS). MS-DOS displays the status of the upper memory area only if a UMB
provider such as EMM386 is installed and the command DOS=UMB is included in
the CONFIG.SYS file. MS-DOS does not display the status of the upper memory
area if you issue the MEM command while you are running Windows version
3.0.
 
Allocating extended memory
 
To allocate Interrupt 15h memory and XMS memory at the same time, use the
/INT15 switch when you load the HIMEM.SYS device driver.
 
For more information, see <HIMEM.SYS>.
 

 
                               MEMExamples
 
Getting general program and memory information
 
Suppose your system has both expanded memory and extended memory. To display
a summary of your system's total memoryconventional, expanded, extended,
and upperand to display a list of programs currently loaded into memory,
type the following command:
 
    mem /classify
 
The results might look similar to the following:
 
Modules using memory below 1 MB:
 
  Name           Total       =   Conventional   +   Upper Memory
          
  SYSTEM      16,477   (16K)     16,461   (16K)         16    (0K)
  SETVER         784    (1K)        784    (1K)          0    (0K)
  HIMEM        1,168    (1K)      1,168    (1K)          0    (0K)
  EMM386       3,120    (3K)      3,120    (3K)          0    (0K)
  USPI14       9,120    (9K)      9,120    (9K)          0    (0K)
  COMMAND      3,680    (4K)      3,680    (4K)          0    (0K)
  SMARTDRV    37,680   (37K)     21,280   (21K)     16,400   (16K)
  MOUSE       17,088   (17K)     17,088   (17K)          0    (0K)
  NETBEUI     42,432   (41K)     41,760   (41K)        672    (1K)
  REDIR       86,064   (84K)     76,128   (74K)      9,936   (10K)
  ANARKEY     14,384   (14K)          0    (0K)     14,384   (14K)
  ZPOWER       4,368    (4K)          0    (0K)      4,368    (4K)
  ANSI         4,208    (4K)          0    (0K)      4,208    (4K)
  DBLSPACE    36,848   (36K)          0    (0K)     36,848   (36K)
  PROTMAN        128    (0K)          0    (0K)        128    (0K)
  EXP16        9,056    (9K)          0    (0K)      9,056    (9K)
  WORKGRP      4,368    (4K)          0    (0K)      4,368    (4K)
  RAMDRIVE     1,312    (1K)          0    (0K)      1,312    (1K)
  Free       472,464  (461K)    464,448  (454K)      8,016    (8K)
 
Memory Summary:
 
  Type of Memory       Total   =    Used    +    Free
          
  Conventional         655,360      190,912      464,448
  Upper                109,712      101,696        8,016
  Reserved             393,216      393,216            0
  Extended (XMS)    15,618,928   12,424,048    3,194,880
          
  Total memory      16,777,216   13,109,872    3,667,344
 
  Total under 1 MB     765,072      292,608      472,464
 
  Largest executable program size        464,352   (453K)
  Largest free upper memory block          7,888     (8K)
  MS-DOS is resident in the high memory area.
 
"Reserved" is the memory located on add-on boards such as video adapter
boards. "Largest executable program size" is the largest contiguous block of
conventional memory available for a program. "Largest free upper memory
block" is the largest area of upper memory available for a program. "MS-DOS
is resident in the high memory area" indicates that MS-DOS is running in the
first 64K of extended memory rather than in conventional memory.
 
Getting information about a specific program
 
To find out what memory a specific program module has allocated, use the MEM
/MODULE command. For example, to find out what memory the WIN386 module has
allocated, you would type the following command:
 
    mem /module win386
 
If you were running WIN386, the results might look similar to the
following:
 
WIN386 is using the following memory:
 
  Segment  Region       Total        Type
  -      
   0081D                 80    (0K)  Data
   02EF8                384    (0K)  Environment
   02F10             89,856   (88K)  Program
   0D4D0       1         96    (0K)  Data
   0D611       1      7,888    (8K)  Data
   0EFFE       2         32    (0K)  Data
                   
  Total Size: 98,336   (96K)
 
Some program modules, such as WIN386, allocate more than one area of memory.
The MEM /MODULE command displays all the areas of memory allocated by the
specified program, and shows the segment address and size of each
allocation. For upper memory blocks, MEM /MODULE also shows the region
number. The Type column shows how the program is using that particular area
of memory. The "total size," in this case 98,336 bytes (96K), shows the
total amount of memory allocated by MS-DOS for the specified program.
 

 
                                  MEMMAKER
 
Starts the MemMaker program, which optimizes your computer's memory by
moving device drivers and memory-resident programs to upper memory. To use
MemMaker, your computer must have an 80386 or 80486 processor and extended
memory. For more information about running MemMaker, see the chapter "Making
More Memory Available" in the MS-DOS 6 User's Guide.
 
Do not use this command while Windows is running.
 
Syntax
 
    MEMMAKER [/B] [/BATCH] [/SESSION] [/SWAP:drive] [/T] [/UNDO] [/W:n,m]
 
Switches
 
/B
    Displays MemMaker in black and white. Use this option if MemMaker isn't
    displayed correctly on a monochrome monitor.
 
/BATCH
    Runs MemMaker in batch (unattended) mode. In batch mode, MemMaker takes
    the default action at all prompts. If an error occurs, MemMaker restores
    your previous CONFIG.SYS, AUTOEXEC.BAT and (if necessary) Windows
    SYSTEM.INI files. After MemMaker has completed, you can review status
    messages by viewing the contents of the MEMMAKER.STS file. (To view this
    file, use a text editor such as MS-DOS Editor, or use the TYPE
    command.)
 
/SESSION
    Used exclusively by MemMaker during the optimization process.
 
/SWAP:drive
    Specifies the letter of the drive that was originally your startup disk
    drive. Specify the current drive letter after the colon. This switch is
    necessary only if the drive letter of your startup disk drive has
    changed since your computer started. (The drive letter sometimes changes
    because of disk swapping performed by some disk-compression programs.)
    If the drive letter of your startup drive has changed and you do not
    specify this switch, MemMaker will be unable to find your system startup
    files.
 
    You do not need to use this switch if you are using Stacker 2.0,
    SuperStor, or Microsoft DoubleSpace.
 
/T
    Disables the detection of IBM Token-Ring networks. Use this switch if
    your computer includes such a network and you are having problems
    running MemMaker.
 
/UNDO
    Instructs MemMaker to undo its most recent changes. When MemMaker
    optimizes your system's memory, it makes changes to your CONFIG.SYS and
    AUTOEXEC.BAT files (and, if necessary, your Windows SYSTEM.INI file). If
    your system doesn't work properly after MemMaker completes, or if you
    are not satisfied with your new memory configuration, you can return to
    your previous configuration by starting MemMaker with the /UNDO switch.
 
/W:size1,size2
    Specifies how much upper-memory space to reserve for Windows translation
    buffers. Windows needs two areas of upper memory for its translation
    buffers. The size1 value specifies the size of the first region; size2
    specifies the size of the second region. By default, MemMaker does not
    reserve upper memory for Windows; this is equivalent to specifying
    /W:0,0.
 
Related Commands
 
For information about loading device drivers into upper memory, see the
<DEVICEHIGH> command.
 
For information about loading programs into upper memory, see the
<LOADHIGH (LH)> command.
 

 
                             MEMMAKERExamples
 
To run MemMaker in batch mode and to direct it not to reserve any upper
memory for Windows translation buffers, use the following command:
 
    memmaker /batch /w:0,0
 
To have MemMaker restore your previous system configuration, use the
following command:
 
    memmaker /undo
 
Suppose you use a disk-compression program. Your startup disk is drive C,
but after the compression driver starts, drive C becomes your main
compressed drive. Your startup files are now on drive D. Because of this
drive-letter swapping, you would start MemMaker by using the following
command:
 
    memmaker /swap:d
 
This command specifies that the current drive D was originally the startup
drive and contains your CONFIG.SYS and AUTOEXEC.BAT files.
 
Note:  You do not need to use the /SWAP switch if you are using Microsoft
       DoubleSpace disk compression or the Stacker 2.0 disk-compression
       program.
 

 
                                 MENUCOLOR
 
Sets the text and background colors for the startup menu. You can use this
command only within a menu block in your CONFIG.SYS file.
 
The startup menu is a list of choices that appears when you start your
computer. You define a startup menu by using special CONFIG.SYS commands.
Each item on the menu corresponds to a set of CONFIG.SYS commands called a
"configuration block." A startup menu makes it possible to start your
computer with a variety of configurations. For more information about
defining multiple configurations, see the chapter "Configuring Your System"
in the MS-DOS 6 User's Guide.
 
Syntax
 
    MENUCOLOR=x[,y]
 
Parameters
 
x
    Specifies the color of the menu text. You can specify a value from 0 to
    15; For a list of values and colors, see "Color Values" later in this
    topic.
 
y
    Specifies the color of the screen background. You can specify a value
    from 0 to 15; For a list of values and colors, see "Color Values" later
    in this topic. The y value is optional; if you do not specify a value,
    MS-DOS displays the specified text color on a black background.
 
Be sure to specify different values for x and y, or the text will not be
readable.
 
Color Values
 
Valid color values are from 0 to 15, as follows:
 
    0  Black             8  Gray
    1  Blue              9  Bright blue
    2  Green            10  Bright green
    3  Cyan             11  Bright cyan
    4  Red              12  Bright red
    5  Magenta          13  Bright magenta
    6  Brown            14  Yellow
    7  White            15  Bright white
 
Note: On some displays, colors 8 through 15 blink.
 
Related Commands
 
The MENUCOLOR command is one of six special CONFIG.SYS commands for defining
startup menus and multiple configurations. The other commands are as
follows:
 
  The <INCLUDE> command, which includes the contents of one configuration
   block in another. This command cannot be included in a menu block.
 
  The <MENUITEM> command, which defines an item on the menu.
 
  The <MENUDEFAULT> command, which specifies the default menu item.
 
  The <NUMLOCK> command, which specifies the state of the NUM LOCK key when
   the startup menu appears. (Although NUMLOCK can be used anywhere in the
   CONFIG.SYS file, it is especially useful when defining a startup menu.)
 
  The <SUBMENU> command, which defines a submenu.
 
For an overview of the procedure for defining multiple configurations, see
the topic <Commands for Defining Multiple Configurations>
 

 
                             MENUCOLORExample
 
The following MENUCOLOR command sets the menu text to bright white and the
screen background to blue:
 
    menucolor=15, 1
 

 
                                MENUDEFAULT
 
Specifies the default menu item on the startup menu and sets a timeout value
if desired. You can use this command only within a menu block in your
CONFIG.SYS file. If you do not use this command, MS-DOS sets the default to
item 1.
 
The startup menu is a list of choices that appears when you start your
computer. You define a startup menu by using special CONFIG.SYS commands.
Each item on the menu corresponds to a set of CONFIG.SYS commands called a
"configuration block." A startup menu makes it possible to start your
computer with a variety of configurations. For more information about
defining multiple configurations, see the chapter "Configuring Your System"
in the MS-DOS 6 User's Guide.
 
Syntax
 
    MENUDEFAULT=blockname[,timeout]
 
Parameters
 
blockname
    Specifies the default menu item by its associated configuration block.
    The block must be defined elsewhere in the CONFIG.SYS file. When MS-DOS
    displays the startup menu, the default menu item is highlighted and its
    number appears after the "Enter a choice" prompt.
 
timeout
    Determines how many seconds MS-DOS waits before starting the computer
    with the default configuration. If you don't specify a timeout value,
    MS-DOS does not continue until the ENTER key is pressed. You can specify
    a timeout value from 0 to 90 seconds. A timeout of 0 forces automatic
    selection of the default, effectively bypassing the menu display.
 
Related Commands
 
The MENUDEFAULT command is one of six special CONFIG.SYS commands for
defining startup menus and multiple configurations. The other commands are
as follows:
 
  The <MENUITEM> command, which defines an item on the menu.
 
  The <MENUCOLOR> command, which defines the color of the menu's text and
   screen background.
 
  The <SUBMENU> command, which defines a submenu.
 
  The <NUMLOCK> command, which specifies the state of the NUM LOCK key when
   the startup menu appears. (Although NUMLOCK can be used anywhere in the
   CONFIG.SYS file, it is especially useful when defining a startup menu.)
 
  The <INCLUDE> command, which includes the contents of one configuration
   block in another. This command cannot be included in a menu block.
 
For an overview of the procedure for defining multiple configurations, see
the topic <Commands for Defining Multiple Configurations>



 
                            MENUDEFAULTExample
 
The following menu block defines three menu items, sets the default item to
"full_config," and sets the timeout to 30 seconds:
 
    [menu]
    menuitem=base_config,Base configuration only
    menuitem=full_config,Normal configuration
    menuitem=network,Normal configuration with network
    menudefault=full_config,30
 
When MS-DOS starts and reads this menu block, it displays the following
menu:
 
    MS-DOS 6 Startup Menu
    =====================
 
       1. Base configuration only
       2. Normal configuration
       3. Normal configuration with network
 
    Enter a choice: 2                       Time remaining: 30
 
After displaying this menu, MS-DOS waits 30 seconds; if no other item is
selected, MS-DOS then starts the computer using the commands in the
[full_config] configuration block.
 

 
                                  MENUITEM
 
Defines an item on the startup menu. You can use this command only within a
menu block in your CONFIG.SYS file. You can have up to nine menu items per
menu.
 
The startup menu is a list of choices that appears when you start your
computer. You define a startup menu by using special CONFIG.SYS commands.
Each item on the menu corresponds to a set of CONFIG.SYS commands called a
"configuration block." A startup menu makes it possible to start your
computer with a variety of configurations. For more information about
defining multiple configurations, see the chapter "Configuring Your System"
in the MS-DOS 6 User's Guide.
 
Syntax
 
    MENUITEM=blockname[,menu_text]
 
Parameters
 
blockname
    Specifies the name of the associated configuration block. The block must
    be defined elsewhere in the CONFIG.SYS file. If the menu item is
    selected from the startup menu, MS-DOS carries out the commands in the
    associated configuration block, as well as any commands at the beginning
    of the CONFIG.SYS file and any commands in configuration blocks with the
    [common] header.
 
    If MS-DOS cannot find a block with the specified name, the item does not
    appear on the startup menu. The block name can be up to 70 characters
    long and can contain most printable characters. It cannot include
    spaces, backslashes (\), forward slashes (/), commas, semicolons (;),
    equal signs (=), or square brackets ([ and ]).
 
menu_text
    Specifies the text you want MS-DOS to display for this menu item. If you
    don't specify any menu text, MS-DOS displays the block name as the menu
    item. The menu text can be up to 70 characters long and can contain any
    characters you want.
 
Related Commands
 
The MENUITEM command is one of six special CONFIG.SYS commands for defining
startup menus and multiple configurations. The other menu-definition
commands are:
 
  The <MENUDEFAULT> command, which specifies the default menu item.
 
  The <MENUCOLOR> command, which defines the color of the menu's text and
   screen background.
 
  The <SUBMENU> command, which defines a submenu.
 
  The <NUMLOCK> command, which specifies the state of the NUM LOCK key when
   the startup menu appears. (Although NUMLOCK can be used anywhere in the
   CONFIG.SYS file, it is especially useful when defining a startup menu.)
 
  The <INCLUDE> command, which includes the contents of one configuration
   block in another. This command cannot be included in a menu block.
 
For an overview of the procedure for defining multiple configurations, see
the topic <Commands for Defining Multiple Configurations>
 

 
                              MENUITEMNotes
 
Defining menu blocks
 
A menu block is a set of menu-definition commands that begins with a block
headerthe name of the block enclosed in square brackets. To have a startup
menu, your CONFIG.SYS file must contain a menu block that has the [menu]
block header.
 
You can use the <SUBMENU> command to define submenus. Each submenu has its
own menu block, which can be named anything you want.
 
A menu block must contain at least one MENUITEM or SUBMENU command.
 
Number of items on the startup menu
 
MS-DOS displays the menu items in the order they appear in the menu block
and numbers them automatically. The first menu item is always number 1 on
the menu; there can be up to nine items. If you need to define more than
nine menu items, use the SUBMENU command.
 

 
                             MENUITEMExamples
 
The following [menu] block defines a startup menu with two items, Apples and
Oranges:
 
    [menu]
    menuitem=Apples
    menuitem=Oranges
 
When MS-DOS starts, the menu will appear as follows:
 
    MS-DOS 6 Startup Menu
    =====================
 
       1. Apples
       2. Oranges
 
    Enter a choice: 1
 
The following [MENU] block defines a startup menu with three items and
specifies menu text for each item:
 
    [menu]
    menuitem=base_config,Base configuration only
    menuitem=full_config,Normal configuration
    menuitem=net_config,Normal configuration with network
 
In this example, the first item corresponds to the [base_config]
configuration block, the second to the [full_config] block, and the third to
the [net_config] block. When MS-DOS starts, it displays the following menu:
 
    MS-DOS 6 Startup Menu
    =====================
 
       1. Base configuration only
       2. Normal configuration
       3. Normal configuration with network
 
    Enter a choice: 1
 

 
                                 MKDIR (MD)
 
Creates a directory.
 
You can use the MKDIR or MD command to create a multilevel directory
structure.
 
Syntax
 
    MKDIR [drive:]path
 
    MD [drive:]path
 
Parameters
 
drive:
    Specifies the drive on which you want to create the new directory.
 
path
    Specifies the name and location of the new directory. The maximum length
    of any single path from the root directory to the new directory is 63
    characters, including backslashes (\).
 
Related Commands
 
For information about deleting a directory, see the <RMDIR> command. For
information about changing directories, see the <CHDIR> command.
 

 
                            MKDIR (MD)Examples
 
Suppose you want to create a directory on the disk in the current drive and
use the directory to store all your tax information. To create a directory
named TAXES, type the following command:
 
    mkdir \taxes
 
You could also type this command with the same results:
 
    md \taxes
 
Now suppose that the TAXES directory is the current directory and that you
want to create a subdirectory of TAXES named PROPERTY. To create the
PROPERTY directory, type the following command:
 
    mkdir property
 
 

 
                                    MODE
 
Configures system devices. The MODE command performs many different tasks,
such as displaying system status, changing system settings, or reconfiguring
ports or devices.
 
Using the MODE command
 
Because the MODE command can perform many different tasks, the syntax
necessary to carry out each task is different. The following is a list of
tasks for which you can use the MODE command.
 
  Reconfiguring a printer attached to a parallel port (LPT1, LPT2, or LPT3)
   for printing at 80 or 132 characters per line, 6 or 8 lines per inch, or
   both (if the printer supports these features). For more information, see
   <MODE (configure printer)>.
 
  Configuring the baud rate, parity, and number of data bits and stop bits
   of a serial port (COM1, COM2, COM3, and COM4) for use with a specific
   printer, modem, or other serial device. For more information, see
   <MODE (configure serial port)>.
 
  Displaying the status of all devices or of a single device. For more
   information, see <MODE (display device status)>.
 
  Redirecting printer output from a parallel port to a serial port so that
   the serial port becomes the system's default printer port. For more
   information, see <MODE (redirect printing)>.
 
  Preparing devices for character set (code page) switching. For more
   information, see <MODE (set device code pages)>.
 
  Selecting another display adapter or changing the configuration of the
   current display adapter. For more information, see
   <MODE (set display mode)>.
 
  Setting the keyboard's typematic rate. For more information, see
   <MODE (set typematic rate)>.
 
Requirement for ANSI.SYS and DISPLAY.SYS
 
MODE can perform some tasks, such as setting the display mode, only if you
have included a DEVICE command for the ANSI.SYS device driver in your
CONFIG.SYS file. You must install DISPLAY.SYS to use MODE (set device code
pages) for character-set switching.
 
Adding mode commands to AUTOEXEC.BAT
 
Although you can type each form of the MODE command at the command prompt,
you can also use MODE commands within your AUTOEXEC.BAT file to reconfigure
your system automatically each time you turn on or restart your computer.
 

 
                          MODE (Configure Printer)
 
Configures a printer connected to a parallel printer port.
 
This version of the MODE command sets the characteristics for an
IBM-compatible or Epson-compatible printer connected to a parallel printer
port (LPT1, LPT2, or LPT3).
 
Syntax
 
    MODE LPTn[:] [c][,[l][,r]]
 
    MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r]
 
Parameters
 
LPTn
    Specifies the parallel port to which the device is attached. Valid
    values for n are in the range 1 through 3.
 
    If you omit any of the following three parameters, MODE uses the most
    recent setting for the omitted parameter. If you are using the shorter
    form of the syntax (without the words COLS=, LINES=, and RETRY=), the
    MODE command "recognizes" the parameters by their positions. Thus, if
    you do not specify a value for a parameter, you must still type the
    comma that precedes the next parameter.
 
COLS=c
    Specifies the number of characters (columns) per line: 80 or 132. The
    default value is 80. You can abbreviate this parameter by omitting COLS=
    and specifying a value for c.
 
LINES=l
    Specifies the vertical spacing and the number of lines per inch: 6 or 8.
    The default value is 6. You can abbreviate this parameter by omitting
    LINES= and specifying a value for l.
 
RETRY=r
    Specifies the retry action to take if a time-out error occurs when MODE
    attempts to send output to a parallel printer. This parameter causes
    part of MODE to remain resident in memory. The following list shows each
    valid value for r and a brief description of its meaning:
 
    B    Return "busy" from a status check of a busy port.
 
    E    Return an error from a status check of a busy port.
 
    P    Continue retrying until printer accepts output.
 
    R    Return "ready" from a status check of a busy port.
 
    N    Take no retry action (default value). You can also specify NONE
         for this value.
 
If you are using the MODE command over a network, do not use any of the r
values.
 
You can abbreviate this parameter by omitting RETRY= and specifying a value
for r.
 

 
                      MODE (Configure Printer)Notes
 
Update to MODE parameter
 
The RETRY=R setting provides the same support as the P parameter did in
previous versions of MS-DOS.
 
Breaking out of a time-out loop
 
To break out of a time-out loop, press CTRL+BREAK.
 
Setting parallel-printer modes
 
For parallel-printer modes, you can use PRN and LPT1 interchangeably.
 

 
                     MODE (Configure Printer)Examples
 
Suppose you want to be able to print 80 characters per line and 8 lines per
inch on a parallel printer that is connected to the second parallel printer
port (LPT2). To do this, type the following command:
 
    mode lpt2:80,8
 
Because 80 characters per line is the default setting, you could achieve the
same result by typing the following command:
 
    mode lpt2:,8
 
Suppose that, when printing a file, you want your system to keep trying to
print the file until it is successful. To do this, type the following
command:
 
    mode lpt2:,8,b
 
To stop your system from continually retrying to print, press CTRL+BREAK or
type the MODE command without specifying a value for r.
 

 
                        MODE (Configure Serial Port)
 
Configures a serial communications port.
 
This version of the MODE command sets the parameters for a serial port
(COM1, COM2, COM3, or COM4).
 
Syntax
 
    MODE COMm[:] [b[,p[,d[,s[,r]]]]]
 
    MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]
 
Parameters
 
COMm
    Specifies the number of the serial (COM) port. Valid values for m are in
    the range 1 through 4.
 
    If you omit any of the following five parameters, MODE uses the most
    recent setting for the omitted parameter. If you are using the shorter
    form of the syntax (without the words BAUD=, PARITY=, DATA=, and so on),
    the MODE command "recognizes" the parameters by their positions. Thus,
    if you do not specify a value for a parameter, you must still type the
    comma that precedes the next parameter.
 
BAUD=b
    Specifies the first two digits of the transmission rate in bits per
    second. The following list shows each valid value for b and its related
    rate:
 
    11    110 baud
 
    15    150 baud
 
    30    300 baud
 
    60    600 baud
 
    12    1200 baud
 
    24    2400 baud
 
    48    4800 baud
 
    96    9600 baud
 
    19    19,200 baud
 
    The b value of 19 is not supported on all computers (check your hardware
    manual). You can abbreviate this parameter by omitting BAUD= and
    specifying a value for b.
 
PARITY=p
    Specifies how the system uses the parity bit to check for transmission
    errors. The p value can be one of the following: N (none), E (even), O
    (odd), M (mark), or S (space). The default value is E. Not all computers
    support the values M and S. You can abbreviate this parameter by
    omitting PARITY= and specifying a value for p.
 
DATA=d
    Specifies the number of data bits in a character. Valid values for d are
    in the range 5 through 8. The default value is 7. Not all computers
    support the values 5 and 6. You can abbreviate this parameter by
    omitting DATA= and specifying a value for d.
 
STOP=s
    Specifies the number of stop bits that define the end of a character: 1,
    1.5, or 2. If the baud rate is 110, the default value is 2; otherwise,
    the default value is 1. Not all computers support the value 1.5. You can
    abbreviate this parameter by omitting STOP= and specifying a value for
    s.
 
RETRY=r
    Specifies the retry action to take if a time-out error occurs when MODE
    attempts to send output to a serial printer. This parameter causes part
    of MODE to remain resident in memory. The following list shows each
    valid value for r and a brief description of its meaning:
 
    E    Return an error from a status check of a busy port.
 
    B    Return "busy" from a status check of a busy port.
 
    P    Continue retrying until printer accepts output.
 
    R    Return "ready" from a status check of a busy port.
 
    N    Take no retry action (default value). You can also specify none for
    this value.
 
    If you are using the MODE command over a network, do not use any of the
    r values. You can abbreviate this parameter by simply omitting RETRY=
    and specifying a value for r.
 

 
                     MODE (Configure Serial Port)Note
 
The RETRY=B setting provides the same support as the P parameter did in
previous versions of MS-DOS.
 

 
                        MODE (Display Device Status)
 
Displays the status of one or all of the devices installed on your system.
 
Syntax
 
    MODE [device] [/STATUS]
 
To display the status of all devices installed on your system, use the
following syntax:
 
    MODE
 
Parameter
 
device
    Specifies the name of the device for which you want to display the
    status.
 
Switch
 
/STATUS
    Requests the status of any redirected parallel printers. The MODE
    command, when used without this switch, displays the status of all
    installed devices except redirected parallel printers. You can
    abbreviate the /STATUS switch as /STA.
 

 
                   MODE (Display Device Status)Example
 
To display the status of the monitor and keyboard, type the following
command:
 
    mode con /status
 

 
                          MODE (Redirect Printing)
 
Redirects output from a parallel port to a serial communications port.
 
Syntax
 
    MODE LPTn[:]=COMm[:]
 
Parameters
 
LPTn
    Specifies the parallel port. Valid values for n are in the range 1
    through 3.
 
COMm
    Specifies the serial port. Valid values for m are in the range 1 through
    4.
 

 
                     MODE (Redirect Printing)Examples
 
Suppose you want to set up your system so that it sends parallel-printer
output to a serial printer. To do this, you must use the MODE command twice.
The first time, you use MODE to configure the serial port; the second time,
you use MODE to redirect parallel-printer output to the serial port you
specified in the first MODE command.
 
For example, if your serial printer operates at 4800 baud with even parity
and is connected to the COM1 port (the first serial connection on your
computer), you would type the following two commands:
 
    mode com1 48,e,,,b
 
    mode lpt1=com1
 
If you redirect parallel-printer output from LPT1 to COM1 but then decide
that you want to print a file by using LPT1, use the following command
before you print the file. This command prevents MS-DOS from redirecting the
file from LPT1 to COM1.
 
    mode lpt1
 

 
                        MODE (Set Device Code Pages)
 
Prepares, selects, refreshes, or displays the numbers of the character sets
(code pages) for parallel printers or the keyboard and monitor. For an
introduction to using character sets, see "Customizing for International
Use" in the MS-DOS 6 User's Guide.
 
Syntax
 
    MODE device CODEPAGE PREPARE=((yyy [...]) [drive:][path]filename)
 
    MODE device CODEPAGE SELECT=yyy
 
    MODE device CODEPAGE REFRESH
 
    MODE device CODEPAGE [/STATUS]
 
Parameters
 
device
    Specifies the device for which you want to prepare or select a character
    set. Valid names for device are CON, LPT1, LPT2, LPT3, and PRN.
 
CODEPAGE PREPARE
    Prepares character sets for the specified device. You must prepare a
    character set for a device before you can use the character set with
    that device. After you use the CODEPAGE PREPARE form of the MODE
    command, use the CODEPAGE SELECT form of MODE to specify the character
    set you want to use. You can abbreviate CODEPAGE as CP and PREPARE as
    PREP.
 
yyy
    Specifies the number of the character set to prepare or select. The
    following list shows each character set supported by the EGA.CPI file
    and its country or language:
 
    437    United States
 
    850    Multilingual (Latin I)
 
    852    Slavic (Latin II)
 
    860    Portuguese
 
    863    Canadian-French
 
    865    Nordic
 
    Additional character sets are supported by the EGA2.CPI file. For more
    information about EGA2.CPI, see the README.TXT file.
 
[drive:][path]filename
    Specifies the location and name of the code-page-information (.CPI) file
    that MS-DOS uses to prepare a character set for the specified device.
 
CODEPAGE SELECT
    Specifies (selects) which character set to use with the specified
    device. Before selecting a character set, you must use the CODEPAGE
    PREPARE form of the MODE command to prepare a character set. You can
    abbreviate CODEPAGE as CP and SELECT as SEL.
 
CODEPAGE REFRESH
    Reinstates the prepared character sets if they are lost as the result of
    a hardware problem or other error. You can abbreviate CODEPAGE as CP and
    REFRESH as REF.
 
CODEPAGE
    Displays the numbers of the character sets, if any, that are prepared or
    selected for the specified device.
 
Switch
 
/STATUS
    Displays the numbers of the current character sets prepared or selected
    for the specified device. You can abbreviate this switch as /STA.
    Whether or not you specify the /STATUS switch, typing the MODE command
    with a device name and the CODEPAGE parameter displays the numbers of
    the character sets that are prepared or selected for the specified
    device.
 
Related Commands
 
For information about other character-set commands, see the <NLSFUNC> and
<CHCP> commands.
 

 
                     MODE (Set Device Code Pages)Note
 
MS-DOS includes two .CPI files, which correspond to specific devices, as
follows:
 
EGA.CPI
    Enhanced graphics adapter (EGA) or IBM Personal System/2
 
EGA2.CPI
    Similar to EGA.CPI, but provides additional codepages not
    supported by EGA.CPI. (For more information, see the README.TXT file.)
 
 

 
                          MODE (Set Display Mode)
 
Selects the active display adapter and its display mode, or reconfigures the
active display adapter.
 
Syntax
 
    MODE [display-adapter][,shift[,T]]
 
    MODE [display-adapter][,n]
 
    MODE CON[:] [COLS=c] [LINES=n]
 
Parameters
 
display-adapter
    Specifies a setting category. The following list shows the value(s)
    associated with each setting category for display-adapter:
 
    40 or 80
        Indicates the number of characters per line.
 
    BW40 or BW80
        Specifies a color graphics adapter (CGA) with color turned off, and
        specifies the number of characters per line.
 
    CO40 or CO80
        Specifies a color monitor with color enabled, and specifies the
        number of characters per line.
 
    MONO
        Specifies a monochrome display adapter with a constant width of 80
        characters per line.
 
    shift
        Specifies whether to shift the CGA screen to the left or to the
        right. Valid values for shift are L (for left) and R (for right).
 
T
    Enables you to align the screen by using a test pattern. MS-DOS prompts
    you to indicate whether the screen is aligned correctly.
 
CON[:]
    Refers to the monitor.
 
COLS=c
    Specifies the number of characters (columns) per line. Valid values are
    40 and 80.
 
LINES=n
    Specifies the number of lines that can be displayed on the screen. Valid
    values for n are 25, 43, and 50. Not all display adapters support all
    three settings. To set the number of lines, you must have installed the
    ANSI.SYS device driver by using a device command in your CONFIG.SYS
    file.
 

 
                         MODE (Set Typematic Rate)
 
Sets the keyboard typematic rate, the rate at which MS-DOS repeats a
character when you hold down the key for that character.
 
The typematic rate has two components, the rate and the delay. Some
keyboards do not recognize this command.
 
Syntax
 
    MODE CON[:] [RATE=r DELAY=d]
 
Parameters
 
CON[:]
    Refers to the keyboard.
 
RATE=r
    Specifies the rate at which a character is repeated on the screen when
    you hold down a key. Valid values are in the range 1 through 32. These
    values are equal to approximately 2 to 30 characters per second,
    respectively. The default value is 20 for IBM AT-compatible keyboards
    and 21 for IBM PS/2-compatible keyboards. If you set the rate, you must
    also set the delay. for IBM PS/2-compatible keyboards. If you set the
    rate, you must also set the delay.
 
DELAY=d
    Specifies the amount of time that must elapseafter you press and hold
    down a keybefore MS-DOS starts to repeat the character. Valid values
    for d are 1, 2, 3, and 4 (representing 0.25, 0.50, 0.75, and 1 second,
    respectively). The default value is 2. If you set the delay, you must
    also set the rate.
 

 
                                    MORE
 
Displays one screen of output at a time.
 
The MORE command reads standard input from a pipe or redirected file and
displays one screen of information at a time. This command is commonly used
to view long files.
 
Syntax
 
    MORE < [drive:][path]filename
 
    command-name | MORE
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of a file that supplies data you want to
    display.
 
command-name
    Specifies the command that supplies data you want to display.
 
Related Commands
 
For information about displaying the contents of a directory, see the <DIR>
command.
 
For information about displaying the contents of a file, see the <TYPE>
command.
 

 
                                 MORENote
 
Sources of data
 
When using the redirection character (<), you must specify a filename as the
source. When using the pipe (|), you can use such commands as DIR, SORT, and
TYPE. Before using a pipe for redirection, you should set the TEMP
environment variable in your AUTOEXEC.BAT file.
 

 
                               MOREExamples
 
Suppose you have a long file named CLIENTS.NEW that you want to view on your
screen. Either of the following two commands redirects the file through the
MORE command to begin displaying the contents of the file:
 
    more < clients.new
 
    type clients.new | more
 
The MORE command displays the first screen of information from CLIENTS.NEW
and then prompts you with the following message:
 
     More 
 
You can then press any key to see the next screen of information.
 

 
                                    MOVE
 
Moves one or more files to the location you specify. The MOVE command can
also be used to rename directories.
 
Syntax
 
    MOVE [/Y|/-Y] [drive:][path]filename[,[drive:][path]filename[...]]
    destination
 
Parameters
 
[drive:][path]filename
    Specifies the location and name of the file or files you want to move.
    Also specifies the name of a directory you want to rename.
 
destination
    Specifies the new location of the file, or the new name of the
    directory. Destination can consist of a drive letter and colon, a
    directory name, or a combination. If you are moving only one file, you
    can also specify a filename if you want to rename the file when you move
    it. If you are moving more than one file, the destination must be a
    directory name. Moving a file to an existing file overwrites the
    existing file.
 
Switches
 
/Y
    Indicates that you want MOVE to replace existing file(s) without
    prompting you for confirmation. By default, if you specify an existing
    file as the destination file, MOVE will ask you if you want to overwrite
    the existing file. (Previous versions of MS-DOS would simply replace the
    existing file.) If the MOVE command is part of a batch file, MOVE will
    replace the file without prompting you. Specifying this switch overrides
    all defaults and the current setting of the COPYCMD environment
    variable.
 
/-Y
    Indicates that you want MOVE to prompt you for confirmation when
    replacing an existing file. Specifying this switch overrides all
    defaults and the current setting of the COPYCMD environment variable.
 

 
                                MOVENotes
 
Renaming a file while moving it
 
If you move only one file to a new directory, you can rename the file as you
move it by specifying the new filename in the destination. However, if you
move more than one file to a new directory in the same command line, you
cannot specify a filename as a destination. If you specify a destination
filename and the file already exists, MOVE will overwrite the existing file
without prompting you.
 
If you specify a filename when moving more than one file, you will see the
following message:
 
    Cannot move multiple files to a single file
 
Renaming a directory using the MOVE command
 
You can rename a directory using the MOVE command. Specify the old directory
name as the file you want to move, and then specify the new directory name
as the destination. You can change the directory name, but you cannot move
the directory to another location in the directory tree.
 
For example, to rename a directory called NEW on drive C to OLD, type the
following command:
 
    move c:\new c:\old
 
The following command is invalid because the new directory name is not in
the same location as the old directory name:
 
    move c:\new c:\dos\new
 
When you issue this command, MS-DOS displays the following error message:
 
    c:\new => c:\dos\new [Unable to open source]
 
Setting the COPYCMD environment variable
 
You can set the COPYCMD environment variable to specify whether you want the
COPY, MOVE, and XCOPY commands to prompt you for confirmation before
overwriting a file in all cases, whether issued from the command prompt or a
batch file.
 
To force the COPY, MOVE, and XCOPY commands to prompt you before overwriting
in all cases, set the COPYCMD environment variable /-Y. To force these
commands to overwrite in all cases without prompting you, set the COPYCMD
environment variable to /Y.
 
Typing any of these commands with the /Y or /-Y switch overrides all
defaults and the current setting of the COPYCMD environment variable.
 
Errorlevel parameters
 
If the MOVE command successfully moved the file or files you specified, it
returns an ERRORLEVEL value of 0. If there was an error in moving one or
more of the files you specified, the MOVE command returns an ERRORLEVEL
value of 1.
 

 
                               MOVEExamples
 
Suppose C:\LETTERS is a directory. To move the files ED.TXT and SIGRID.TXT
from the current directory to the LETTERS directory on drive C, type the
following at the command prompt:
 
    move ed.txt,sigrid.txt c:\letters
 
To move the BILL.TXT file from the current directory to the LETTERS
directory on drive C and rename it ANN.TXT, type the following at the
command prompt:
 
    move bill.txt c:\letters\ann.txt
 
To rename the THISYEAR directory on drive C to LASTYEAR, type the following
at the command prompt:
 
    move c:\thisyear c:\lastyear
 

 
                                    MSAV
 
Scans your computer for known viruses.
 
Syntax
    MSAV [drive:] [/S | /C] [/R] [/A | /L]
    [/N] [/P] [/F] [/VIDEO]
 
Parameter
 
drive:
    Specifies the drive that MSAV scans for viruses. If you do not specify a
    drive, MSAV scans the current drive.
 
Switches
 
/S
    Scans the specified drive, but does not remove viruses that MSAV finds.
 
/C
    Scans the specified drive, and removes viruses that MSAV finds.
 
/R
    Creates an MSAV.RPT file that lists the number of files MSAV checked for
    viruses, the number of viruses it found, and the number of viruses it
    removed. By default, MSAV does not create a report. When it does create
    MSAV.RPT, the file is placed in the root directory.
 
/A
    Scans all drives except drive A and drive B.
 
/L
    Scans all local drives except network drives.
 
/N
    Displays the contents of an MSAV.TXT file, if it exists and it is
    located in the directory that contains the MSAV.EXE file. MSAV then
    scans the current drive or the drive you specify. MSAV does not use the
    graphical interface. If MSAV detects a virus, it returns exit code 86
    instead of displaying a message on your screen.
 
/P
    Displays a command-line interface instead of the graphical interface.
 
/F
    Turns off the display of filenames that have been scanned. Use this
    switch only with the /N or /P switch.
 
/VIDEO
    Displays a list of the switches that affect how MSAV is displayed. This
    list contains all of the following switches.
 
/25
    Sets screen display to 25 lines. This is the default setting.
 
/28
    Sets screen display to 28 lines. Use this switch with VGA display
    adapters only.
 
/43
    Sets screen display to 43 lines. Use this switch with EGA and VGA
    display adapters.
 
/50
    Sets screen display to 50 lines. Use this switch with VGA display
    adapters only.
 
/60
    Sets screen display to 60 lines. Use this switch with Video 7 display
    adapters only.
 
/IN
    Runs MSAV using a color scheme, even if a color display adapter is not
    detected.
 
/BW
    Runs MSAV using a black-and-white color scheme.
 
/MONO
    Runs MSAV using a monochromatic color scheme.
 
/LCD
    Runs MSAV using an LCD color scheme.
 
/FF
    Uses the fastest screen updating on computers with CGA display adapters.
    Using this switch may decrease video quality.
 
/BF
    Uses the computer's BIOS to display video.
 
/NF
    Disables the use of alternate fonts.
 
/BT
    Allows use of a graphics mouse in Windows.
 
/NGM
    Runs MSAV using the default mouse character instead of the graphics
    character.
 
/LE
    Exchanges left and right mouse buttons.
 
/PS2
    Resets the mouse if the mouse cursor disappears or locks up.
 

 
                                MSAVNotes
 
CHKLIST.MS files
 
Microsoft Anti-Virus creates a CHKLIST.MS file in each directory you scan
for viruses. The first time you scan a directory, Microsoft Anti-Virus
records in the CHKLIST.MS file checksums for each program. During subsequent
scans, it compares new checksums with the originals to determine if program
files have changed. A difference in checksum values indicates a possible
virus infection.
 
Real symptoms versus false alarms
 
Damaged programs, some memory-resident programs, and conflicts among device
drivers can cause your computer to act as if it were infected by a virus
when it is not. If you suspect your computer is infected, consider the
possible causes for the symptoms you observe. Instead of a computer virus, a
hardware or software problem is likely to be producing errors.
 
Check All Files option
 
When the Check All Files option is selected, AnitVirus for MS-DOS checks
only files with the following extensions: .386, .APP, .BIN, .CMD, .DOM,
.DLL, .DRV, .EXE, .FON, .ICO, .OV*, .PGM, .PIF, .PRG, .SYS.
 
MSAV.INI and the MSDOSDATA environment variable
 
When you start Anti-Virus for MS-DOS, it uses an initialization file named
MSAV.INI to configure the program. To determine the location of the MSAV.INI
file, Anti-Virus for MS-DOS first searches for the MSDOSDATA environment
variable, which specifies the path to the initialization file. If this
environment variable is not defined, the program searches for the MSAV.INI
file in the directory from which you started Anti-Virus for MS-DOS. If the
program does not find the file, the program creates it using default values
and places it in the directory.
 
The MSDOSDATA environment variable is useful if you share the MSAV.EXE file
with others, but use your own configuration for Anti-Virus for MS-DOS. For
example, suppose the MSAV.EXE file is located in the root directory on drive
P, a read-execute-only network server, and you want Anti-Virus for MS-DOS to
use your own configuration when it starts. To specify that it use the
MSAV.INI file located in the DOS directory on your drive C instead of the
initialization file located on network drive P, add the following line to
your AUTOEXEC.BAT file:
 
        set msdosdata=c:\dos
 
To start Anti-Virus for MS-DOS, type the following at the command prompt:
 
        p:\msav
 
Changes you make to the configuration of Anti-Virus for MS-DOS are saved in
the MSAV.INI file located in the DOS directory on drive C.
 
Using the /N switch
 
If you specify the /N switch, MSAV displays the contents of an MSAV.TXT
file, if it exists and it is located in the directory that contains the
MSAV.EXE file. MSAV then scans the current drive or the drive you specify.
MSAV does not use the graphical interface. If MSAV detects a virus, it
returns exit code 86 instead of displaying a message on your screen.
 

 
                               MSAVExamples
 
To start MSAV using a black and white color scheme, and to specify that MSAV
check all drives except drives A and B, type the following command:
 
    msav /bw /a
 
To write a simple batch program named VIRUS that supports the MSAV exit code
and the /S switch to scan the current drive, you can type the following
commands by using MS-DOS Editor:
 
    echo off
    rem Smith's msav command
    msav /s /n
    if errorlevel 86 goto virus
    if not errorlevel 86 goto none
    :virus
    echo MSAV has detected a virus on your current drive!
    goto exit
    :none
    echo MSAV found no viruses on your current drive.
    goto exit
    :exit
 

 
                                  MSBACKUP
 
Runs Microsoft Backup for MS-DOS, which backs up or restores one or more
files from one disk onto another.
 
Note:  MS-DOS also includes Microsoft Backup for Windows. Depending on the
       choices you made during MS-DOS Setup, you might have Backup for
       MS-DOS, Backup for Windows, both, or neither. This topic explains
       only Backup for MS-DOS; for information about Backup for Windows, see
       the MS-DOS 6 User's Guide.
 
You can back up all files on a disk or files that have changed since your
last backup, schedule backups so they are done automatically on a regular
basis, and restore files that you have backed up.
 
Syntax
 
MSBACKUP [setup_file] [/BW | /LCD | /MDA]
 
Parameter
 
setup_file
    Specifies the setup file that defines files to back up and the type of
    backup you want to perform. MSBACKUP creates a setup file when you save
    program settings and file selections. Setup files must have an SET
    extension. If you do not specify a setup file, MSBACKUP uses
    DEFAULT.SET.
 
Switches
 
/BW
    Starts MSBACKUP using a black-and-white color scheme.
 
/LCD
    Starts MSBACKUP using a video mode compatible with laptop displays.
 
/MDA
    Starts MSBACKUP using a monochrome display adapter.
 

 
                              MSBACKUPNotes
 
Must start MSBACKUP from a hard disk
 
MSBACKUP program files must be located on your hard disk. You cannot start
MSBACKUP from a floppy disk.
 
Backup catalogs
 
As part of the backup process, MSBACKUP creates a backup catalog that
contains information about the files you backed up. When you need to restore
one or more files, you can load the backup catalog and easily select files
from a backup set. The backup catalog includes information about the:
 
  Backed-up disk's directory structure.
 
  Names, sizes, and attributes of the directories and files that were
   selected.
 
  Total number of files.
 
  Total size of the backup.
 
  Name of the setup file that was used.
 
  Date the backup was made.
 
MSBACKUP gives each catalog file a unique name that helps you identify a
backup set. Each character in the catalog name contains information about a
particular backup set. For example, consider a typical catalog name such as
CD20823A.FUL. Reading left to right, the character(s) in the filename mean
the following:
 
Character(s)  Meaning

 
C             The first drive backed up in this set.
 
D             The last drive backed up in this set. (If only one drive was
              backed up, this letter will be the same as the first drive
              that was backed up.)
 
2             The last digit of the year, as determined by the system date.
              In the example, the year is 1992.
 
08            The month the backup set was created.
 
23            The day of the month the backup set was created.
 
A             The position in the sequence of this backup. If more than one
              backup of the same drive(s) is performed on the same day and
              the Keep Old Backup Catalogs option is set to On, MSBACKUP
              assigns a letter from A to Z to indicate the order in which
              the backups were performed (A is the first backup you created
              that day, B is the second, C the third, and so on). If the
              Keep Old Backup Catalogs option is set to Off, this alternates
              between A and B.
 
FUL           The backup typeFUL indicates a full backup, INC indicates an
              incremental backup, and DIF indicates a differential backup.
 
You can easily locate the catalog for a backup set by using the information
contained in the catalog filenames, even if you have many catalog files in
your directory.
 
Each time you perform a full backup using a specific setup file, MSBACKUP
creates a master catalog. The master catalog keeps track of all the backup
catalogs made during the backup cycle. When the next full backup is
performed and a new backup cycle begins, a new master catalog is created.
 
The master catalog is used if you need to restore a complete backup cycle.
When you load the master catalog, the catalogs of all the backups that were
created during the backup cycle are automatically merged. Then the latest
version of each backed-up file can be automatically restored (or you can
choose to restore an earlier version).
 
You can choose whether you want to keep all of the old catalogs or only the
current catalogs on your hard disk. The catalogs will remain part of your
backup sets.
 
When you back up files, MSBACKUP places one copy of the backup catalog on
your hard disk, and a second copy on the disk or network drive that contains
your backup set.
 
Insufficient memory
 
If you receive a message stating that you have insufficient memory, do the
following:
 
1  Make sure you have at lease 512K of memory on your computer.
 
2  Quit MSBACKUP, remove all memory-resident programs from memory, and try
   using MSBACKUP again.
 
3  Choose the Options button on the Backup screen to display the Disk Backup
   Options dialog box. Turn off the Compress Backup Data option and then
   choose OK.
 
The MSDOSDATA environment variable
 
Backup for MS-DOS uses the MSDOSDATA environment variable to determine the
location of configuration information, backup sets, and catalogs. Backup for
MS-DOS first searches for the MSDOSDATA environment variable. If this
environment variable is not defined, the program searches the directory from
which you started the program. If the program does not find the file, the
program creates it using default values and places it in the directory.
 
The MSDOSDATA environment variable is useful if you share the Backup for
MS-DOS program files with others, but use your own configuration. For
example, suppose the program files are located on drive P, a
read-and-execute-only network server, and you want to use your own
configuration, backup sets, and catalogs. To specify that Backup for MS-DOS
use the configuration information, backup sets, and catalogs located in the
BACKUP directory on your drive C, add the following line to your
AUTOEXEC.BAT file:
 
        set msdosdata=c:\backup
 
To start Backup for MS-DOS, type the following at the command line:
 
        p:\msbackup
 
Changes you make to the configuration of Backup for MS-DOS are saved in the
BACKUP directory on drive C.
 

 
                             MSBACKUPExample
 
Suppose you created a setup file named WEEKLY.SET that defines a weekly full
backup procedure on specified files. To use this setup file, type the
following at the command line:
 
    msbackup weekly
 

 
                                   MSCDEX
 
Provides access to CD-ROM drives. MSCDEX can be loaded from your
AUTOEXEC.BAT file or from the command prompt. (The device driver that came
with your CD-ROM drive must be loaded from your CONFIG.SYS file. For more
information, see Notes.)
 
The MSCDEX command should not be used after Windows has started.
 
Syntax
 
    MSCDEX /D:driver [/D:driver2... ] [/E] [/K] [/S] [/V] [/L:letter]
    [/M:number]
 
Parameters
 
/D:driver1 [/D:driver2... ]
    Specifies the driver signature of the first CD-ROM device driver. The
    driver1 parameter must match the parameter specified by the /D switch on
    the CONFIG.SYS command that starts the corresponding CD-ROM device
    driver
 
    The MSCDEX command must include at least one /D switch. To install
    additional CD-ROM device drivers, specify an additional /D switch for
    each device driver.
 
/E
    Specifies that the CD-ROM driver be allowed to use expanded memory, if
    available, to store sector buffers.
 
/K
    Specifies that MS-DOS should recognize CD-ROM volumes encoded in Kanji.
    By default, MS-DOS does not recognize Kanji CD-ROM volumes.
 
/S
    Enables sharing of CD-ROM drives on MS-NET or Windows for Workgroups
    servers.
 
/V
    Directs MSCDEX to display memory statistics when it starts.
 
/L:letter
    Specifies the drive letter to assign to the first CD-ROM drive. If you
    have more than one CD-ROM drive, MS-DOS assigns additional CD-ROM drives
    subsequent available drive letters.
 
/M:number
    Specifies the number of sector buffers.
 

 
                               MSCDEXNotes
 
The CD-ROM device driver must be loaded
 
Your CONFIG.SYS file must include a DEVICE or DEVICEHIGH command that loads
the CD-ROM device driver that came with your CD-ROM drive. The CD-ROM
driver's command line should include a /D:drivername parameter. This
parameter assigns a driver name (also called a driver signature) to the
CD-ROM device driver.
 
The MSCDEX command must include a /D:drivername parameter that matches the
/D:drivername parameter on the CD-ROM device driver's command line. MSCDEX
uses the /D:drivername parameter to identify the correct CD-ROM device
driver. The driver name is usually a name similar to MSCD000. Each CD-ROM
device driver currently in use must have a unique driver name.
 
Limit on number of logical drives
 
The number of logical drive letters available on your computer can limit the
number of CD-ROM drives you can have. The number of logical drives is
determined by the LASTDRIVE command in your CONFIG.SYS file. By the time
MSCDEX loads, some of the available drive letters might be used by other
programs, such as a network or DoubleSpace.
 
SMARTDrive and MSCDEX
 
If you use SMARTDrive, make sure the MSCDEX command appears before the
SMARTDRV command in your AUTOEXEC.BAT file. SMARTDrive can significantly
speed up your CD-ROM drive by read-caching it. By default, when SMARTDrive
loads, it checks for the presence of MSCDEX; if MSCDEX is present, CD-ROM
caching is enabled. For more information, see the <SMARTDRV> command.
 

 
                              MSCDEXExamples
 
Loading and enabling a single CD-ROM device driver
 
This example shows the relevant CONFIG.SYS and AUTOEXEC.BAT commands for a
computer with one CD-ROM drive.
 
The CONFIG.SYS file contains the following DEVICE command:
 
    device=c:\devices\cdromdrv.sys /d:mscd000
 
This command loads the device driver CDROMDRV.SYS, which came with the
CD-ROM drive. The AUTOEXEC.BAT file contains the following MSCDEX command:
 
    c:\dos\mscdex /d:mscd000 /l:g
 
This command enables the device driver that has the driver signature
MSCD000. The /E switch specifies that the driver be allowed to use expanded
memory, if available. The /L:G switch assigns the drive letter G to the
CD-ROM drive.
 
Loading and enabling more than one CD-ROM device driver
 
This example shows the relevant CONFIG.SYS and AUTOEXEC.BAT commands for a
computer that has two CD-ROM drives from two different manufacturers.
 
The CONFIG.SYS file contains the following DEVICE commands:
 
    device = c:\aspi\aspicd.sys /d:mscd000
    device = c:\cdrom\tslcdr.sys /d:mscd001
 
Each command loads the device driver that came with that CD-ROM drive. The
AUTOEXEC.BAT file contains the following MSCDEX command:
 
    c:\dos\mscdex /d:mscd000 /d:mscd001 /l:j
 
This command enables both device drivers. The first driver has the driver
signature MSCD000; the second has the driver signature MSCD001. The /L:J
switch specifies that the first CD-ROM drive, MSCD000, will be drive J and
the second CD-ROM drive will be drive K.
 

 
                                    MSD
 
Provides detailed technical information about your computer.
 
Syntax
 
To use MSD to create a report, use the following syntax:
 
    MSD [/I] [/F[drive:][path]filename] [/P[drive:][path]filename]
    [/S[drive:][path][filename]]
 
To run the MSD program and examine technical information through its
interface, use the following syntax:
 
    MSD [/B] [/I]
 
Parameters
 
[drive:][path]filename
    Specifies the drive, directory, and filename to which you want to write
    the report.
 
Switches
 
/I
    Specifies that MSD not initially detect hardware. Use the /I switch if
    you are having problems starting MSD or if MSD is not running properly.
 
/F[drive:][path]filename
    Prompts you for name, company, address, country, phone number, and
    comments, then writes a complete MSD report to the file you specify.
 
/P[drive:][path]filename
    Writes a complete MSD report to the file you specify, without prompting
    you for information.
 
/S[drive:][path][filename]
    Writes a summary MSD report to the file you specify, without prompting
    you for information. If you do not specify any of the parameters, MSD
    writes the report to the screen.
 
/B
    Runs MSD in black and white instead of color. Use the /B switch when you
    have a monitor that does not correctly display MSD in color.
 

 
                                 MSDNotes
 
Information provided by MSD
 
Whether you examine the information through MSD's interface or through a
report, the MSD program can provide detailed technical information about
your computer's:
 
  Model and processor
 
  Memory
 
  Video adapter
 
  Version of MS-DOS
 
  Mouse
 
  Other adapters
 
  Disk drives
 
  LPT ports
 
  COM ports
 
  IRQ status
 
  Terminate-and-stay-resident (TSR) programs
 
  Device drivers
 
MSD Button Options
 
The following is a brief description of the buttons that appear on MSD's
main screen:
 
Computer
    Displays computer manufacturer, processor type, and bus type; ROM BIOS
    manufacturer, version and date; keyboard type; DMA controller
    configuration; and math coprocessor status.
 
Memory
    Displays a map of the upper memory area (UMA)  the memory region from
    640K to 1024K.
 
Video
    Shows your video card manufacturer, model, and type; video BIOS version
    and date; and current video mode.
 
Network
    Displays network-specific configuration information.
 
Operating System
    Displays the operating system version, location of MS-DOS in memory, the
    drive the computer was started from, the current environment settings,
    and the path from which MSD was run.
 
Mouse
    Shows the MS-DOS mouse driver version, mouse type, mouse interrupt
    request line (IRQ) number, and other information specific to the
    configuration of the mouse.
 
Other Adapters
    Displays the game card status for up to two game devices or joysticks.
 
Disk Drives
    Displays the size and number of bytes free on local and remote drives.
 
LPT Ports
    Displays the port addresses of all installed parallel ports, and
    dynamically displays the status of each port.
 
COM Ports
    Displays the port addresses and current communications parameters of all
    installed serial ports, and displays the status of each port.
 
IRQ Status
    Displays the configuration of the hardware IRQs.
 
TSR Programs
    Displays the name, location in memory, and size of each program loaded
    in memory at the time MSD was run.
 
Device Drivers
    Displays the names of all device drivers installed at the time MSD was
    run.
 

 
                               MSDExamples
 
Starting the MSD program
 
If you wanted to examine some of the technical information about your
computer before calling Microsoft Product Support Services, you would start
the MSD program by typing the following at the command prompt:
 
    msd
 
The MSD program has an interface that makes it easy for you to access
detailed technical information about your computer.
 
Creating a report
 
Before calling Microsoft Product Support Services, you could create a file
called COMPUTER.TXT that contains a detailed technical report about your
computer. To do this, you could type the following at the command prompt:
 
    msd /p computer.txt
 
The COMPUTER.TXT file would contain the information about your computer.
 
If you want MSD to create a detailed report about your computer and you
wanted the report to include such information as your name, company,
address, and phone number, you would type the following at the command
prompt:
 
    msd /f computer.txt
 
The MSD program will prompt you for the information.
 

 
                                  NLSFUNC
 
Starts the Nlsfunc program, which loads country-specific information for
national language support (NLS).
 
You can use the NLSFUNC command either from the command line or within your
CONFIG.SYS file to support the use of country-specific information and
character set (code page) switching.
 
Do not use the NLSFUNC command while Windows is running. If you do, your
computer might stop responding.
 
Syntax
 
    NLSFUNC [[drive:][path]filename]
 
In your CONFIG.SYS file, use the following syntax:
 
    INSTALL=[[dos-drive:]dos-path]NLSFUNC.EXE [country-filename]
 
Parameters
 
[drive:][path]filename or country-filename
    Specifies the location and name of the file containing country-specific
    information. If you use this parameter in the INSTALL command, you must
    include the drive and directory.
 
[dos-drive:]dos-path
    Specifies the location of NLSFUNC.EXE.
 
Related Commands
 
For information about displaying the current character set (code page), see
the <CHCP> command.
 
For information about preparing a character set (code page), see the
<MODE (set device code pages)> command.
 

 
                               NLSFUNCNote
 
The default value for [drive:][path]filename is defined by the COUNTRY
command in your CONFIG.SYS file. If no COUNTRY command exists in CONFIG.SYS,
Nlsfunc looks for COUNTRY.SYS in the root directory of the startup drive.
Nlsfunc does not access the COUNTRY.SYS file until MS-DOS requests
information from it. If MS-DOS cannot find the COUNTRY.SYS file when you
install Nlsfunc, no error message is given. However, you will get an error
message if you subsequently run a CHCP command.
 

 
                             NLSFUNCExamples
 
To use the default country-specific information found in the COUNTRY.SYS
file, type the following command:
 
    nlsfunc
 
Suppose you have a file called NEWCDPG.SYS that contains country-specific
information. If you want to use the information from that file rather than
from the COUNTRY.SYS file, type the following command:
 
    nslfunc newcdpg.sys
 

 
                                  NUMLOCK
 
Specifies whether the NUM LOCK key is set to ON or OFF when your computer
starts. You can use this command only in your CONFIG.SYS file.
 
Syntax
 
    NUMLOCK=[ON|OFF]
 
Parameters
 
ON|OFF
    If set to ON, turns on the NUM LOCK key when MS-DOS displays the startup
    menu. If set to OFF, turns NUM LOCK off.
 
Related Commands
 
The NUMLOCK command is one of six special CONFIG.SYS commands for defining
startup menus and multiple configurations. The other commands are:
 
  The <MENUCOLOR> command, which defines the color of the menu's text and
   screen background.
 
  The <MENUITEM> command, which defines an item on the menu.
 
  The <MENUDEFAULT> command, which specifies the default menu item.
 
  The <SUBMENU> command, which defines a submenu.
 
  The <INCLUDE> command, which includes the contents of one configuration
   block in another. This command cannot be included in a menu block.
 
For an overview of the procedure for defining multiple configurations, see
the topic <Commands for Defining Multiple Configurations>
 

 
                             NUMLOCK  Example
 
To ensure that NUM LOCK is always ON when the startup menu appears, include
the following command in the [MENU] block.
 
For example, the following menu block defines three menu items, sets the
default item to "full_config," and sets NUM LOCK to ON:
 
    [menu]
    menuitem=base_config,Base configuration only
    menuitem=full_config,Normal configuration
    menuitem=network,Normal configuration with network
    menudefault=full_config
    numlock=on
 

 
                                    PATH
 
Indicates which directories MS-DOS should search for executable files.
 
MS-DOS uses the PATH command to search for executable files in the
directories you specify. By default, the search path is the current
directory only.
 
Syntax
 
    PATH [[drive:]path[;...]]
 
To display the current search path, use the following syntax:
 
    PATH
 
To clear all search-path settings other than the default setting (the
current directory), use the following syntax:
 
    PATH ;
 
Parameters
 
[drive:]path
    Specifies a drive, directory, and any subdirectories to search.
 
;
    When used as the only parameter, clears all search-path settings and
    specifies that MS-DOS is to search only the current directory.
 
Related Command
 
For information about setting a search path for data files, see the
<APPEND> command.
 

 
                                PATHNotes
 
Current directory searched first
 
MS-DOS always searches in the current directory first, before it searches
directories in the search path.
 
Length limit for the PATH command
 
The maximum length of the PATH command is 127 characters. To fit more
directories in the search path, you can shorten directory names, use the
SUBST command to redirect directories to logical drives (which shortens the
entries on the PATH command line), or use the APPEND /X:ON command.
 
:m540
Files with the same name, different extensions
 
You might have some files in the same directory that share the same filename
but have different extensions. For example, you might have a file named
ACCNT.COM that starts an accounting program and another file named ACCNT.BAT
that connects your system to the accounting system network.
 
MS-DOS searches for a file by using default filename extensions in the
following order of precedence: .COM, .EXE, and .BAT. To run ACCNT.BAT when
ACCNT.COM exists in the same directory, you must include the .BAT extension
on the command line.
 
Two or more identical filenames in the PATH
 
You might have two or more files in the search path that have the same
filename and extension. MS-DOS searches for the specified filename first in
the current directory. Then it searches directories in the order in which
they are listed in the PATH command.
 
:m540a
Specifying multiple directories in PATH command
 
To specify more than one path for MS-DOS to search, separate entries with a
semicolon (;).
 
Using PATH in your AUTOEXEC.BAT file
 
If you place the PATH command in your AUTOEXEC.BAT file, MS-DOS
automatically initiates the specified search path every time you start your
computer.
 

 
                               PATHExample
 
The following command specifies that MS-DOS is to search three directories
to find commands (the three paths for these directories are C:\USER\TAXES,
B:\USER\INVEST, and B:\BIN):
 
    path c:\user\taxes;b:\user\invest;b:\bin
 

 
                                   PAUSE
 
Suspends processing of a batch program and displays a message that prompts
the user to press any key to continue. You can use this command only within
batch programs.
 
Syntax
 
    PAUSE
 

 
                                PAUSENotes
 
Prompting the user to continue the program
 
MS-DOS displays the following message in response to the PAUSE command:
 
    Press any key to continue . . .
 
:m541
Dividing a batch file into sections
 
If you press CTRL+C to stop a batch program, MS-DOS displays the following
message:
 
    Terminate batch job (Y/N)?
 
If you press Y (for yes) in response to this message, the batch program ends
and control returns to the operating system. Therefore, you can insert the
PAUSE command before a section of the batch file you may not want to
process. While PAUSE suspends processing of the batch program, you can press
CTRL+C and then Y to stop the batch program.
 

 
                               PAUSEExample
 
Suppose you want a batch program to prompt the user to change disks in one
of the drives. To do this, you might create the following file:
 
    @echo off
    :begin
    copy a:*.*
    echo Please put a new disk into drive A
    pause
    goto begin
 
In this example, all the files on the disk in drive A are copied to the
current directory. After the displayed comment prompts you to place another
disk in drive A, the PAUSE command suspends processing so that you can
change disks and then press any key to resume processing. This particular
batch program runs in an endless loop. The GOTO BEGIN command sends the
command interpreter to the begin label of the batch file. To stop this batch
program, press CTRL+C and then Y.
 

 
                                   POWER
 
Turns power management on and off, reports the status of power management,
and sets levels of power conservation.
 
Syntax
 
    POWER [ADV[:MAX|REG|MIN]|STD|OFF]
 
To display the current power setting, use the following syntax:
 
    POWER
 
Parameters
 
ADV[:MAX|REG|MIN]|STD|OFF
 
    ADV[:MAX|REG|MIN]
        Conserves power when applications and hardware devices are idle. In
        some cases, performance may be affected if an application is active
        instead of idle. Use MAX for maximum power conservation. Use REG,
        the default setting, to balance power conservation with application
        and device performance. Use MIN if the performance of an application
        or device is not satisfactory when you specify MAX or REG.
 
    STD
        If your computer supports the Advanced Power Management (APM)
        specification, STD conserves power by using only the
        power-management features of your computer's hardware. If your
        computer does not support the APM specification, STD turns off power
        management.
 
    OFF
        Turns off power management.
 
Related Command
 
For information about the Power device driver, see <POWER.EXE>.
 

 
                                POWERNote
 
You must use the DEVICE command in your CONFIG.SYS file to install the
<POWER.EXE> device driver before you can use the POWER command.
 

 
                                 POWER.EXE
 
Reduces power consumption when applications and devices are idle. The power
manager device driver conforms to the Advanced Power Management (APM)
specification. This device driver must be loaded by a <DEVICE> command in
your CONFIG.SYS file.
 
Syntax
 
    DEVICE=[drive:][path]POWER.EXE [ADV[:MAX|REG|MIN]|STD|OFF] [/LOW]
 
Parameters
 
drive:path
    Specifies the location of the POWER.EXE file.
 
ADV[:MAX|REG|MIN]|STD|OFF
 
    ADV[:MAX|REG|MIN
        Conserves power when applications and hardware devices are idle. In
        some cases, performance may be affected if an application is active
        instead of idle. Use MAX for maximum power conservation. Use REG,
        the default setting, to balance power conservation with application
        and device performance. Use MIN if the performance of an application
        or device is not satisfactory when you specify MAX or REG.
 
    STD
        If your computer supports the Advanced Power Management (APM)
        specification, STD conserves power by using only the
        power-management features of your computer's hardware. If your
        computer does not support the APM specification, STD turns off power
        management.
 
    OFF
        Turns off power management.
 
Switch
 
/LOW
    Loads the POWER.EXE device driver into conventional memory, even if the
    upper memory area is available. By default, POWER.EXE is loaded into the
    upper memory area if the upper memory area is available.
 
Related Command
 
For information about reducing power consumption, see <POWER>.
 

 
                             POWER.EXEExample
 
To specify that POWER.EXE is located in the DOS directory of drive C and
that the default setting be used, add the following command line to your
CONFIG.SYS file:
 
    device=c:\dos\power.exe
 
The POWER.EXE device driver will be loaded into the upper memory area, if it
is available.
 

 
                                   PRINT
 
Prints a text file while you are using other MS-DOS commands.
 
This command can print in the background if you have an output device
connected to one of your system's serial or parallel ports.
 
Syntax
 
    PRINT [/D:device] [/B:size] [/U:ticks1] [/M:ticks2] [/S:ticks3]
    [/Q:qsize] [/T] [[drive:][path]filename[ ...]] [/C] [/P]
 
To install PRINT with the default parameters or to display the contents of
the print queue on your screen without affecting the queue, use the
following syntax:
 
    PRINT
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of a file or set of files you want to
    print. You can include multiple files (usually as many as 10) on one
    command line.
 
Switches
 
:m543
/D:device
    Specifies the name of the print device. Valid values for parallel ports
    are LPT1, LPT2, and LPT3. Valid values for serial ports are COM1, COM2,
    COM3, and COM4. The default value is LPT1, which is also called PRN. The
    /D switch must precede any filename used on the command line.
 
:m543b
/B:size
    Sets the size (in bytes) of the internal buffer, which is used to store
    data before it is sent to the printer. The minimum and default value for
    size is 512; the maximum value is 16384. Increasing this value decreases
    the amount of memory available for other purposes but may speed up the
    PRINT command.
 
/U:ticks1
    Specifies the maximum number of clock ticks PRINT is to wait for a
    printer to be available (clock ticks occur about 18 times per second).
    If the printer is not available within the time specified, the job does
    not print. Values for ticks1 must be in the range 1 through 255. The
    default value is 1.
 
/M:ticks2
    Specifies the maximum number of clock ticks PRINT can take to print a
    character on the printer. Values for ticks2 must be in the range 1
    through 255. The default value is 2. If a character is printed too
    slowly, MS-DOS displays an error message.
 
:m543c
/S:ticks3
    Specifies the number of clock ticks the MS-DOS scheduler allocates for
    background printing. Values for ticks3 must be in the range 1 through
    255. The default value is 8. Increasing this value can speed up printing
    while slowing down other programs.
 
/Q:qsize
    Specifies the maximum number of files allowed in the print queue. Values
    for qsize must be in the range 4 through 32. The default value is 10.
 
/T
    Removes all files from the print queue.
 
:m543a
/C
    Removes files from the print queue. You can use the /C and /P switches
    on the same command line.
 
    When the /C switch precedes the list of filenames on the command line,
    it applies to all files whose names follow the /C switch, until PRINT
    encounters a /P switch, in which case the /P switch applies to the file
    whose name precedes the /P switch.
 
    When the /C switch follows a filename, it applies to the file whose name
    precedes the /C switch and all files whose names follow the /C switch,
    until PRINT encounters a /P switch, in which case the /P switch applies
    to the file whose name precedes the /P switch.
 
:m544
/P
    Adds files to the print queue. You can use the /C and /P switches on the
    same command line.
 
    When the /P switch precedes the list of filenames on the command line,
    it applies to all files whose names follow the /P switch, until PRINT
    encounters a /C switch, in which case the /C switch applies to the file
    whose name precedes the /C switch.
 
    When the /P switch follows a filename, it applies to the file whose name
    precedes the /P switch and all files whose names follow the /P switch,
    until PRINT encounters a /C switch, in which case the /C switch applies
    to the file whose name precedes the /C switch.
 
Related Commands
 
For information about configuring a printer connected to a parallel port,
see the <MODE (configure printer)> command.
 
For information about displaying the status of a printer, see the
<MODE (display device status)> command.
 
For information about configuring a printer connected to a serial port, see
the <MODE (redirect printing)> command.
 
For information about preparing printers for character-set switching,
see the <MODE (set device code pages)> command.
 

 
                                PRINTNotes
 
Length of a PRINT queue entry
 
Each print queue entry can contain a maximum of 64 characters. Each queue
entry includes the drive letter, directory, and any subdirectories.
 
Limitations on switches
 
You can only use the /D, /B, /U, /M, /S, and /Q switches the first time you
use the PRINT command after starting MS-DOS. To use one of these switches
after using PRINT, you need to restart MS-DOS.
 
:m544a
Use an application's print command when possible
 
Many applications have their own print commands. You should use an
application's print command to print files that you create with the
application.
 

 
                              PRINTExamples
 
To view the status of the print queue, type the following at the command
prompt:
 
    print
 
MS-DOS displays the name of the file being printed (if any), the names of
files in the queue, and an error message, if an error condition exists.
 
The following command removes the PENCIL.TST file from the print queue:
 
    print a:pencil.tst /c
 
The next command shows how to remove the file PENCIL.TST from the queue and
add the file PEN.TST to the queue:
 
    print pencil.tst /c pen.tst /p
 
The remaining examples use switches that work only with the first PRINT
command you use after starting MS-DOS.
 
The following command sets up the print queue for printing on LPT1:
 
    print /d:lpt1
 
To specify that the PRINT command is to wait 60 clock ticks for a printer to
be available and that the MS-DOS scheduler is to allocate 25 clock ticks to
the PRINT command for background printing rather than the default value of 8
clock ticks, type the following command:
 
    print /u:60 /s:25
 
The following example specifies that PRINT has 4 clock ticks available to
print each character rather than the default value of 2 clock ticks:
 
    print /m:4
 
To change the default maximum number of files for the print queue, use the
PRINT command with the /Q switch, as the following example shows:
 
    print /q:32
 

 
                                   PROMPT
 
Changes the appearance of the command prompt.
 
You can customize the command prompt to display any text you want, including
such information as the name of the current directory, the time and date,
and the MS-DOS version number.
 
Syntax
 
    PROMPT [text]
 
Parameter
 
text
    Specifies any text and information you want included in your system
    prompt.
 
    The following list shows the character combinations you can include
    instead of, or in addition to, any character string(s) in the text
    parameter. The list includes a brief description of the text or
    information that each character combination adds to your command
    prompt.
:m545
 
    $Q    = (equal sign)
    $$    $ (dollar sign)
    $T    Current time
    $D    Current date
    $P    Current drive and path
    $V    MS-DOS version number
    $N    Current drive
    $G    > (greater-than sign)
    $L    < (less-than sign)
    $B    | (pipe)
    $_    ENTER-LINEFEED
    $E    ASCII escape code (code 27)
    $H    Backspace (to delete a character that has been written to the
          prompt command line)
 
Related Commands
 
For information about setting the current date and time, see the <DATE> and
<TIME> commands.
 
For information about ANSI escape sequences, see the <ANSI.SYS> topic.
 

 
                               PROMPTNotes
 
Using the PROMPT command without the text parameter
 
When you use the PROMPT command without specifying a value for text, PROMPT
resets the command prompt to the default settingthe current drive letter
followed by a greater-than sign (>).
 
Using the $P value for text
 
If you include the $P character in the text parameter, MS-DOS reads your
disk after you enter each command to determine the current drive and path.
This can take extra time, especially for floppy disk drives.
 
Defining the MS-DOS command prompt in Windows
 
If you use Microsoft Windows 3.1, you can change the command prompt with the
WINPMT environment variable.
 
For example, suppose you want the following message to precede the MS-DOS
command prompt:
 
    Type "exit" when you're ready to return to Windows.
 
To display this message, include the following command to your AUTOEXEC.BAT
file:
 
    set winpmt=Type "exit" when you're ready to return to Windows.$_$p$g
 

 
                              PROMPTExamples
 
The following example sets the command prompt to display the current drive
and path followed by the greater-than sign (>):
 
    prompt $p$g
 
The following command displays a two-line prompt in which the current time
appears on the first line and the current date appears on the second line:
 
    prompt time is: $t$_date is: $d
 
:m546
If your CONFIG.SYS file loads ANSI.SYS, you can use ANSI escape sequences in
your prompts. The following command, for example, displays your prompt in
reverse video mode and returns to usual video mode for other text:
 
    prompt $e[7m$n:$e[m
 
The characters following the escape code ($E) are ANSI escape sequences.



 
                                   QBASIC
 
Starts MS-DOS QBasic, a program that reads instructions written in the Basic
computer language and interprets them into executable computer code.
 
The QBasic program provides a complete environment for programming in the
Basic language. QBasic includes extensive online Help. For more information
about using QBasic, press ENTER immediately after starting QBasic or press
F1 any time while running QBasic.
 
Syntax
 
    QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI]
    [[/RUN][drive:][path]filename]
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file to load when QBasic starts.
 
Switches
 
/B
    Displays QBasic in black and white if you have a color monitor.
 
:m547
/EDITOR
    Invokes MS-DOS Editor, a full-screen text editor.
 
/G
    Provides the fastest update of a CGA monitor.
 
/H
    Displays the maximum number of display lines possible on your screen.
 
/MBF
    Converts the built-in functions MKS$, MKD$, CVS, and CVD to MKSMBF$,
    MKDMBF$, CVSMBF, and CVDMBF, respectively.
 
/NOHI
    Allows the use of a monitor that does not support high-intensity video.
    Do not use this switch with Compaq laptop computers.
 
/RUN
    Runs the specified Basic program before displaying it. You must specify
    a filename.
 

 
                               QBASICNotes
 
Cannot use MS-DOS Editor if MS-DOS QBasic is not present
 
To use MS-DOS Editor, you must have the QBASIC.EXE file in the current
directory, or in the same directory as the EDIT.COM file in your search
path. If you delete QBASIC.EXE to save space on your hard disk, you cannot
use MS-DOS Editor.
 
Running consecutive Basic programs
 
You can run consecutive Basic programs from a batch file by using the Basic
SYSTEM statement and the QBASIC command with the /RUN switch. A SYSTEM
statement quits QBASIC and returns control to MS-DOS after a Basic program
has run, instead of returning to QBasic. This allows you to run more than
one Basic program from a batch file without having to intervene.
 
:m548
Display of shortcut keys
 
Some monitors may not support the display of shortcut keys by default. If
your monitor does not display shortcut keys, use the /B switch (for CGA
monitors) and the /NOHI switch (for systems that do not support bold
characters).
 

 
                                RAMDRIVE.SYS
 
Uses part of your computer's random-access memory (RAM) to simulate a hard
disk drive. This device driver must be loaded by a <DEVICE> or <DEVICEHIGH>
command in your CONFIG.SYS file.
 
RAM drives are much faster than hard disk drives because your computer can
read information faster from memory than from a hard disk. A RAM drive
appears to be a normal hard disk drive; you can use it just as you would any
hard disk drive. The most important difference between a real disk drive and
a RAM drive is that because it exists only in memory, information on a RAM
drive is lost when you turn off or restart your computer. You can set up as
many RAM drives as you want, up to the amount of memory your computer has.
To do this, add one RAMDRIVE.SYS line to your CONFIG.SYS file for each
additional RAM drive you want.
 
Syntax
 
    DEVICE=[drive:][path]RAMDRIVE.SYS [DiskSize SectorSize [NumEntries]]]
    [/E | /A]
 
Parameters
 
[drive:][path]
    Specifies the location of the RAMDRIVE.SYS file.
 
DiskSize
    Specifies how many kilobytes of memory you want to use for the RAM
    drive. For example, to create a 640K RAM drive, specify 640. If you
    don't specify an amount, RAMDrive will create a 64K RAM drive. You can
    specify a value from 4 to 32767. However, you cannot specify more memory
    than your system has available.
 
SectorSize
    Specifies the disk sector size in bytes. The size can be 128, 256, or
    512 bytes. (If you include a SectorSize value, you must also include a
    value for DiskSize.)
 
    Generally, you should use the default sector size of 512 bytes.
 
NumEntries
    Limits the number of files and directories you can create in the RAM
    drive's root directory. The limit can be from 2 to 1024 entries; the
    limit you specify is rounded up to the nearest sector size boundary. If
    you do not specify a limit, you can create up to 64 entries in the RAM
    drive's root directory. (If you include a value for NumEntries, you must
    also include values for DiskSize and SectorSize.)
 
    If there is not enough memory to create the RAM drive as specified,
    RAMDrive will try to create it with a limit of 16 directory entries.
    This may result in a RAM drive with a different limit from the one you
    specified.
 
Switches
 
/E
    Creates the RAM drive in extended memory.
 
    For RAMDrive to use extended memory, your system must be configured so
    that it provides extended memory, and a DEVICE command for the
    extended-memory manager (such as HIMEM.SYS) must appear in your
    CONFIG.SYS file before the DEVICE command for RAMDRIVE.SYS. In general,
    it is best to create a RAM drive in extended memory if your system has
    extended memory.
 
/A
    Creates the RAM drive in expanded memory.
 
    For RAMDrive to use expanded memory, your system must be configured so
    that it provides expanded memory, and the DEVICE command for the
    expanded-memory manager (such as EMM386, 386MAX, CEMM, or QEMM) must
    appear in your CONFIG.SYS file before DEVICE command for RAMDRIVE.SYS.
 


 
                            RAMDRIVE.SYSNotes
 
Using conventional memory
 
Although specifying a memory type is optional, it is strongly recommended.
If you omit both the /E and /A switches, RAMDRIVE.SYS uses your system's
conventional memory. It is not a good idea to use conventional memory for a
RAM drive, because this reduces available work space for programs. However,
if you don't have extended memory, expanded memory, or a hard disk drive,
you might want to use conventional memory for a RAM drive. A RAM drive can
increase the speed of a floppy disk system significantly enough that it may
be worth the loss of some conventional memory.
 
Using extended memory
 
If your system has extended memory installed (starting at the 1-megabyte
boundary), you can use this extended memory for one or more RAM drives. For
RAMDRIVE.SYS to use extended memory, you must first install HIMEM.SYS or
another extended-memory manager that conforms to the
Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS). In your
CONFIG.SYS file, the DEVICE command that installs the XMS extended-memory
manager must precede the commands that install the RAM drive.
 
Using expanded memory
 
For RAMDRIVE.SYS to use expanded memory, you must configure your system so
that it provides expanded memory. In your CONFIG.SYS file, the DEVICE
command that installs the expanded-memory manager (such as EMM386.EXE) must
precede the DEVICE command that installs RAMDRIVE.SYS. The expanded-memory
manager must conform to the Lotus/Intel/Microsoft Expanded Memory
Specification (LIM EMS).
 
Increasing the efficiency of a RAM drive
 
For the best results with a RAM drive, you can define a TEMP environment
variable and set it to a directory on the RAM drive. If you use Windows, be
sure the RAM drive is at least 2 MB in size; otherwise, there might not be
enough space to create temporary files for printing.
 
Compressing a RAMDrive
 
To compress a RAMDrive, use the <DBLSPACE /CREATE> command. Although it is
possible to compress a RAMDrive by using the DBLSPACE /COMPRESS command, it
is not recommended. Due to the inherent volatility of a RAMDrive,
DoubleSpace's automatic recovery mechanisms cannot work on a RAMDrive.
 
If you compress your RAMDrive, make sure the DEVICE command for RAMDRIVE.SYS
appears in your CONFIG.SYS file before the DEVICE command for DBLSPACE.SYS.
Otherwise, the compressed RAMDrive will not be automatically mounted when
your computer starts.
 

 
                           RAMDRIVE.SYSExamples
 
To create a RAM drive in extended memory and allocate 64K (the default
amount) of extended memory to RAMDRIVE.SYS, add the following line to your
CONFIG.SYS file:
 
    device=c:\dos\ramdrive.sys /e
 
This command loads RAMDRIVE.SYS from the C:\DOS directory.
 
Suppose you want to install RAMDRIVE.SYS in expanded memory and allocate 4
MB (4096K) of expanded memory to the RAM drive. To do this and to specify
that RAMDRIVE.SYS is located in the DOS directory on drive C, add the
following line to your CONFIG.SYS file:
 
    device=c:\dos\ramdrive.sys 4096 /a
 
Now suppose you want to allocate 2048K of extended memory to RAMDRIVE.SYS
and create a RAM drive that has 512-byte sectors and a limit of 1024 entries
in its root directory. To do this and to specify that RAMDRIVE.SYS is
located in the DEVICES directory on drive D, add the following line to your
CONFIG.SYS file:
 
    device=d:\devices\ramdrive.sys 2048 512 1024 /e
 

 
                                    REM
 
Enables you to include comments in a batch file or in your CONFIG.SYS file.
The REM command is also useful for disabling commands. (You can use a
semicolon (;) instead of the REM command in your CONFIG.SYS file, but not in
batch files.)
 
Syntax
 
    REM [string]
 
Parameters
 
string
    Specifies any string of characters  the command you want to disable or
    the comment you want to include.
 
Related Command
 
For information about displaying messages, see the <ECHO> command.
 

 
                                 REMNotes
 
Using the ECHO command to display comments
 
The REM command does not display comments on the screen. You must use the
ECHO ON command in your batch or CONFIG.SYS file in order to display
comments on the screen.
 
:m550a
Restrictions on characters in batch-file comments
 
You cannot use a redirection character (> or <) or pipe (|) in a batch-file
comment.
 
:m550
Using REM to add vertical spacing
 
Although you can use REM without a comment to add vertical spacing to a
batch file, you can also use blank lines. MS-DOS ignores the blank lines
when processing the batch program.
 

 
                               REMExamples
 
The following example shows a batch file that uses remarks for both
explanations and vertical spacing:
 
    @echo off
    rem  This batch program formats and checks new disks.
    rem  It is named CHECKNEW.BAT.
    rem
    echo Insert new disk in drive B.
    pause
    format b: /v
    chkdsk b:
 
Suppose you want to include in your CONFIG.SYS file an explanatory comment
before the COUNTRY command. To do this, add the following lines to
CONFIG.SYS:
 
    rem Set country code to France
    country=033
 
The following example shows a DEVICE command that has been disabled by using
a semicolon (;) instead of the REM command:
 
    ;device=c:\dos\ramdrive.sys
 

 
                                RENAME (REN)
 
Changes the name of the file or files you specify.
 
You can rename all files matching the specified filename. You cannot use the
RENAME command to rename files across drives or to move files to a different
directory location. To rename subdirectories or move files, use the <MOVE>
command.
 
Syntax
 
    RENAME [drive:][path]filename1 filename2
 
    REN [drive:][path]filename1 filename2
 
Parameters
 
[drive:][path]filename1
    Specifies the location and name of the file or set of files you want to
    rename.
 
filename2
    Specifies the new name for the file or, if you use wildcards, the new
    names for the files. (You cannot specify a new drive or path.)
 
Related Commands
 
For information about renaming directories, see the <MOVE> command.
 
For information about renaming a disk, see the <LABEL> command.
 
For information about copying files to a different drive or directory, see
the <COPY> command.
 
For information about copying entire directories to a new location, see the
<XCOPY> command.
 

 
                               RENAMENotes
 
Using wildcards with RENAME
 
You can use wildcards (* and ?) in either filename parameter. If you use
wildcards in filename2, the characters represented by the wildcards will be
identical to the corresponding characters in filename1.
 
RENAME will not work if filename2 already exists
 
If, for filename2, you specify a filename that already exists, RENAME
displays the following message:
 
    Duplicate file name or file not found
 

 
                              RENAMEExamples
 
Suppose you want to change the extensions of all the filenames in the
current directory that have the extension .TXT; for example, suppose you
want to change the .TXT extensions to .DOC extensions. To make this change,
type the following command:
 
    ren *.txt *.doc
 
To rename a file named CHAP10 (on drive B) to PART10, type the following
command:
 
    ren b:chap10 part10
 
The newly renamed file PART10 remains on drive B.
 

 
                                  REPLACE
 
Replaces files in a destination directory with files in a source directory
that have the same name. You can also use REPLACE to add unique filenames to
the destination directory.
 
Syntax
 
    REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]
 
    REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W]
    [/U]
 
Parameters
 
[drive1:][path1]filename
    Specifies the location and name of the source file or set of files.
 
[drive2:][path2]
    Specifies the location of the destination file. You cannot specify a
    filename for files you replace. If you specify neither a drive nor a
    directory, REPLACE uses the current drive and directory as the
    destination.
 
Switches
 
/A
    Adds new files to the destination directory instead of replacing
    existing files. You cannot use this switch with the /S or /U switch.
 
/P
    Prompts you for confirmation before replacing a destination file or
    adding a source file.
 
:m553b
/R
    Replaces read-only files as well as unprotected files. If you do not
    specify this switch but attempt to replace a read-only file, an error
    results and stops the replacement operation.
 
/S
    Searches all subdirectories of the destination directory and replaces
    matching files. You cannot use the /S switch with the /A switch. The
    REPLACE command does not search subdirectories specified in path1.
 
/W
    Waits for you to insert a disk before REPLACE begins to search for
    source files. If you do not specify /W, REPLACE begins replacing or
    adding files immediately after you press ENTER.
 
/U
    Replaces (updates) only those files on the destination directory that
    are older than those in the source directory. You cannot use the /U
    switch with the /A switch.
 
Related Command
 
For information about changing file attributes, see the <ATTRIB> command.
 

 
                               REPLACENotes
 
REPLACE messages
 
As REPLACE adds or replaces files, MS-DOS displays their filenames on the
screen. After the REPLACE command is finished, MS-DOS displays a summary
line in one of the following formats:
 
    nnn files added
    nnn files replaced
 
    no file added
    no file replaced
 
:m553
Replacing files on a floppy disk system
 
If you have a floppy disk system and need to switch disks during the REPLACE
operation, you can specify the /W switch so that REPLACE will wait for you
to switch disks, as necessary.
 
:m553a
Limitations on REPLACE
 
You cannot use the REPLACE command to update hidden files or system files
such as IO.SYS and MSDOS.SYS. For information about changing hidden and
system attributes, see the  <ATTRIB> command.
 
REPLACE exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    REPLACE successfully replaced or added the files.
 
1
    The computer has a version of MS-DOS that is incompatible with REPLACE.
 
2
    REPLACE could not find the source files.
 
3
    REPLACE could not find the source or destination path.
 
5
    The user does not have access to the files you want to replace.
 
8
    There is insufficient system memory to carry out the command.
 
11
    The user used the wrong syntax on the command line.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by REPLACE.
 
For an example of a batch program that processes exit codes, see the <IF>
command or the <CHOICE>command.
 

 
                             REPLACEExamples
 
Suppose that several directories on drive C contain different versions of a
file named PHONES.CLI, which contains client names and phone numbers. To
replace all of these files with the latest version of the PHONES.CLI file
from the disk in drive A, type the following command:
 
    replace a:\phones.cli c:\ /s
 
Suppose you want to add new printer device drivers to a directory on drive C
named TOOLS, which already contains several printer device-driver files for
a word processor. To do this, type the following command:
 
    replace a:*.prd c:\tools /a
 
This command searches the current directory on drive A for any files that
have the extension .PRD and then adds these files to the TOOLS directory on
drive C. Because the /A switch is included, REPLACE adds only those files
from drive A that do not exist on drive C.
 

 
                                  RESTORE
 
Restores files that were backed up by using any version of BACKUP from
MS-DOS versions 2.0 through 5.0. If you are restoring files that were backed
up using the MSBACKUP command in MS-DOS 6, use the <MSBACKUP> program to
restore files.
 
You can restore files from similar or dissimilar disk types.
 
Syntax
 
    RESTORE drive1: drive2:[path[filename]] [/S] [/P] [/B:date] [/A:date]
    [/E:time] [/L:time] [/M] [/N] [/D]
 
Parameters
 
drive1:
    Specifies the drive on which the backed-up files are stored.
 
drive2:
    Specifies the drive to which the backed-up files will be restored.
 
path
    Specifies the directory to which the backed-up files will be restored.
    You must specify the same directory from which the files were backed
    up.
 
filename
    Specifies the names of the backed-up files you want to restore.
 
Switches
 
/S
    Restores all subdirectories.
 
:m555
/P
    Prompts you for permission to restore files that are read-only (that
    have the read-only attribute set) or that have changed since the last
    backup (that have the archive attribute set).
 
/B:date
    Restores only those files last modified on or before the specified date.
    The format of date varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying date, see the <DATE>
    command.
 
/A:date
    Restores only those files last modified on or after the specified date.
    The format of date varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying date, see the <DATE>
    command.
 
/E:time
    Restores only those files last modified at or earlier than the specified
    time. The format of time varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying time, see the <TIME>
    command.
 
/L:time
    Restores only those files last modified at or later than the specified
    time. The format of time varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying time, see the <TIME>
    command.
 
/M
    Restores only those files modified since the last backup.
 
/N
    Restores only those files that no longer exist on the destination disk.
 
/D
    Displays a list of the files on the backup disk that match the names
    specified in filename without restoring any files. Even though no files
    are being restored, you must specify drive2 when you use /D.
 
Related Command
 
For information about backing up files, see the <MSBACKUP> command.
 

 
                               RESTORENotes
 
Checking restored files
 
Once a file has been restored, you can use the DIR or TYPE command to make
sure the file was restored properly.
 
:m556a
Limitations on RESTORE
 
You cannot use the RESTORE command to restore system files (IO.SYS and
MSDOS.SYS). RESTORE does not work with drives that have been redirected with
the ASSIGN or JOIN command.
 
:m556
Compatibility with previous versions of BACKUP
 
The MS-DOS 6 RESTORE command can restore files that were backed up by using
the BACKUP command in MS-DOS versions 2.0 through 5.0.
 
RESTORE exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    RESTORE successfully restored the file or files.
 
1
    RESTORE could not find the files to restore.
 
3
    The user pressed CTRL+C to stop the restoring operation.
 
4
    RESTORE stopped because of an error.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by RESTORE.
 
For an example of a batch program that processes exit codes, see the <IF>
command or the <CHOICE>command.
 
Listing the names of backed-up files
 
Use the /D switch to see a list of the backed up files. If you specify
filename with the /D switch, RESTORE displays a list of the backed up files
that match the name you specify. If you use the /D switch, RESTORE does not
restore any files.
 
Restoring to different drives
 
While you must restore files to their original directory, you can restore
them to a different drive. For example, files backed up from the
C:\MYFILES\*.* directory can be restored to the D:\MYFILES\*.* directory.
 

 
                             RESTOREExamples
 
To restore the file INVEST.MNT from the backup disk in drive A to the IRS
directory on drive C, type the following command:
 
    restore a: c:\irs\invest.mnt
 
MS-DOS prompts you to insert the backup disk into drive A. Once the backup
disk is in drive A, press ENTER to continue.
 
Suppose you backed up all of the files in the directory \USER\ADAMS on drive
C. To restore these files, insert the backup disk in drive A and type the
following command:
 
    restore a: c:\user\adams\*.*
 
It is important that you specify *.* for filename. Otherwise, the RESTORE
command attempts to restore a file named ADAMS in the USER directory.
 
To restore a complete hard disk from a backup disk (or disks) in drive A,
type the following command:
 
    restore a: c:\*.* /s
 
The /S switch and the wildcards (*.*) specify that RESTORE is to restore all
backed-up files to their original directories and subdirectories on drive
C.
 

 
                                 RMDIR (RD)
 
Deletes (removes) a directory.
 
Before you can delete a directory, you must delete its files and
subdirectories. The directory must be empty except for the "." and ".."
symbols.
 
Syntax
 
    RMDIR [drive:]path
 
    RD [drive:]path
 
Parameter
 
[drive:]path
    Specifies the location and name of the directory you want to delete.
 
Related Commands
 
For information about creating a directory, see the <MKDIR> command.
 
For information about hidden files, see the <ATTRIB> command and the <DIR>
command (the /A switch).
 
For information about deleting files, see the <DEL> command.
 
For information about deleting a directory, its files, and all
subdirectories and files subordinate to it, see the <DELTREE> command.
 

 
                                RMDIRNotes
 
Cannot delete directory with hidden or system files
 
You cannot delete a directory that contains files, including hidden or
system files. If you attempt to do so, MS-DOS displays the following
message:
 
    Invalid path, not directory,
    or directory not empty
 
Use the <DIR>  command to list hidden and system files and the <ATTRIB>
command to remove hidden and system attributes from files. For more
information, see those commands.
 
Using the backslash character with the path parameter
 
If you insert a backslash (\) before the first directory name in path,
MS-DOS treats the directory as a subdirectory of the root
directoryregardless of your current directory. If you do not insert a
backslash before the first directory name in path, MS-DOS treats the
directory as a subdirectory of the current directory.
 
Deleting the current directory
 
You cannot use RMDIR to delete the current directory. You must first change
to a different directory (not a subdirectory of the current directory) and
then use RMDIR with a path. If you attempt to delete the current directory,
MS-DOS displays a message in the following format:
 
    Attempt to remove current directory - drive:path
 
MS-DOS also displays this message if you attempt to delete a directory that
has been redirected by using the SUBST command.
 

 
                               RMDIRExample
 
To delete a directory named \USER\SMITH, first ensure that the directory is
empty, as in the following example:
 
    dir \user\smith /a
 
MS-DOS should display only the "." and ".." symbols.
 
Then, from any directory except \USER\SMITH, type the following command:
 
    rmdir \user\smith
 
You can type the following command with the same result:
 
    rd \user\smith
 

 
                                  SCANDISK
 
Starts Microsoft ScanDisk, a disk analysis and repair tool that checks a
drive for errors and corrects any problems that it finds. For an
introduction to using ScanDisk, see <An Introduction to ScanDisk>.
 
Syntax
 
To check the current drive for disk errors, use the following syntax:
 
    SCANDISK
 
To check one or more drives for disk errors, use the following syntax:
 
    SCANDISK [drive: [drive: ...]|/ALL] [/CHECKONLY | /AUTOFIX [/NOSAVE] |
    /CUSTOM] [/SURFACE] [/MONO] [/NOSUMMARY]
 
To check an unmounted DoubleSpace compressed volume file for errors, use the
following syntax:
 
    SCANDISK volume-name [/CHECKONLY | /AUTOFIX [/NOSAVE] | /CUSTOM] [/MONO]
    [/NOSUMMARY]
 
To check a file or files for fragmentation, use the following syntax:
 
    SCANDISK /FRAGMENT [drive:][path]filename
 
To undo repairs you made previously, use the following syntax:
 
    SCANDISK /UNDO [undo-drive:] [/MONO]
 
Parameters
 
drive:
    Specifies the drive or drives you want to check and repair.
 
volume-name
    Specifies the name of the unmounted DoubleSpace volume file you want to
    check and repair. The volume-name parameter should take the form
    [drive:\]DBLSPACE.nnn, in which drive specifies the drive that contains
    the volume file and nnn specifies the extension of the volume file. For
    example, H:\DBLSPACE.000.
 
[drive:][path]filename
    Specifies the file(s) you want to examine for fragmentation. You can
    also specify wildcards for the filename.
 
undo-drive:
    Specifies the drive containing the Undo disk.
 
Switches
 
/ALL
    Checks and repairs all local drives.
 
/AUTOFIX
    Fixes damage without prompting you first. By default, if you start
    ScanDisk with the /AUTOFIX switch and ScanDisk finds lost clusters on
    your drive, it saves the lost clusters as files in the drive's root
    directory. To have ScanDisk delete lost clusters rather than saving
    them, include the /NOSAVE switch. (If you use the /AUTOFIX switch and
    ScanDisk finds errors, it still prompts you for an Undo disk; to prevent
    this, include the /NOSUMMARY switch.) You cannot use the /AUTOFIX switch
    in conjunction with the /CHECKONLY or /CUSTOM  switches.
 
/CHECKONLY
    Checks a drive for errors, but does not repair any damage. You cannot
    use this switch with the /AUTOFIX or /CUSTOM switches.
 
/CUSTOM
    Runs ScanDisk using the configuration settings in the [Custom] section
    of the SCANDISK.INI file. This switch is especially useful for running
    ScanDisk from a batch program. You cannot use this switch in conjunction
    with the /AUTOFIX or /CHECKONLY switches.
 
/MONO
    Configures ScanDisk to use a monochrome display. Instead of specifying
    this switch every time you run ScanDisk, you can include the
    DISPLAY=MONO line in your SCANDISK.INI file.
 
/NOSAVE
    Directs ScanDisk to delete any lost clusters it finds. Can be used only
    in conjunction with the /AUTOFIX switch. (If you start ScanDisk with the
    /AUTOFIX switch and omit the /NOSAVE switch, ScanDisk saves the contents
    of any lost clusters as files in the root directory of the drive.)
 
/NOSUMMARY
    Prevents ScanDisk from displaying a full-screen summary after checking
    each drive. (This switch also prevents ScanDisk from prompting you for
    an Undo disk if it finds errors.)
 
/SURFACE
    Automatically performs a surface scan after checking other areas of a
    drive. During a surface scan of an uncompressed drive, ScanDisk confirms
    that data can be reliably written and read from the drive being scanned.
    During a surface scan of a DoubleSpace drive, ScanDisk confirms that
    data can be decompressed. You should periodically do surface scans of
    all drives.
 
    By default, when it has finished checking a drive's file system,
    ScanDisk asks whether or not you want to perform a surface scan.
    However, if you specify the /SURFACE switch, ScanDisk proceeds with the
    surface scan without prompting you first. When /SURFACE is used in
    conjunction with the /CUSTOM switch, it overrides the Surface setting in
    the [Custom] section of the SCANDISK.INI file.
 

 
                              SCANDISKNotes
 
Problems fixed by ScanDisk
 
ScanDisk checks and fixes problems in the following areas:
 
  File allocation table (FAT)
 
  File system structure (lost clusters, crosslinked files)
 
  Directory tree structure
 
  Physical surface of the drive (bad clusters)
 
  DoubleSpace volume header (MDBPB)
 
  DoubleSpace volume file structure (MDFAT)
 
  DoubleSpace compression structure
 
  DoubleSpace volume signatures
 
  MS-DOS boot sector
 
Types of drives
 
ScanDisk can find and fix errors on the following types of drives:
 
  Hard drives
 
  DoubleSpace drives
 
  Floppy disk drives
 
  RAM drives
 
  Memory cards
 
ScanDisk cannot find or fix errors on the following types of drives:
 
  CD-ROM drives
 
  Network drives
 
  Drives created by using the ASSIGN, SUBST, or JOIN commands
 
  Drives created by using INTERLNK
 
Using ScanDisk when other programs are running
 
Do not use ScanDisk to repair a drive when other programs are running.
ScanDisk is designed for use when files on a disk are in an unchanging
state. When you are using a file, MS-DOS updates the file allocation table
(FAT) and the directory structure to reflect changes. Such updates are not
always made immediately. If you run ScanDisk when other programs are
running, files might still be open. ScanDisk interprets differences between
the directory structure and the file allocation tables as errors. This can
result in corruption or loss of data.
 
You cannot use ScanDisk to correct disk errors if you start it from another
program, or when Microsoft Windows or MS-DOS Task Swapper are running.
However, you can check your disk without fixing errors by using the SCANDISK
command with the /CHECKONLY switch. If you run it with Windows, ScanDisk
might detect errors that do not exist when Windows is not running.
 
The SCANDISK.INI file
 
The SCANDISK.INI file is a text file located in the directory that contains
your MS-DOS files. The settings in the [Environment] section of the
SCANDISK.INI file determine certain aspects of ScanDisk's behavior, such as
whether it is configured for a monochrome or color display. The settings in
the [Custom] section determine the default behavior of ScanDisk when you
start it with the /CUSTOM switch.
 
For more information, read the comments in the SCANDISK.INI file.
 
Undoing the changes ScanDisk made
 
If ScanDisk finds errors on your drive, the program gives you the option of
creating an Undo disk, which enables you to undo the changes ScanDisk makes
to your drive. The Undo disk contains information that specifies which drive
it applies to as well as information on every change that ScanDisk made to
that drive.
 
CAUTION:  Use the Undo disk to undo changes only if your drive has not
          changed since that Undo disk was created. If you changed any of
          the files on your drive since you created the Undo disk, do not
          try to undo your changes. If you attempt to use the Undo disk
          after you update a file or directory, or copy or delete a file,
          you might damage your drive structure and lose data.
 
ScanDisk Errorlevels
 
When ScanDisk returns to the command prompt, it sets ERRORLEVEL to one of
the following:
 
0
    ScanDisk did not detect any problems on the drive(s) it checked.
 
1
    ScanDisk could not run because the command-line syntax was incorrect.
 
2
    ScanDisk terminated unexpectedly due to an out-of-memory error or an
    internal error.
 
3
    The user chose to exit before ScanDisk had finished.
 
4
    ScanDisk completed all logical checks on all drives, but the user exited
    from one or more surface scans before the scans were complete.
    Errorlevel 4 is not returned if the user chose to bypass the surface
    scans completely.
 
254
    ScanDisk found disk problems and corrected them all.
 
255
    ScanDisk found disk problems, but not all problems were corrected.



 
                             SCANDISKExamples
 
To check and fix the current drive, type the following:
 
    scandisk
 
Suppose that DoubleSpace is unable to mount your compressed drive because of
problems with the drive. The drive's compressed volume file is called
DBLSPACE.000 and is located in the root directory of drive C. To repair the
volume file, type the following:
 
    scandisk c:\dblspace.000
 
The DoubleSpace volume file must be located in the root directory of the
drive.
 
To check both drive C and drive E, type the following:
 
    scandisk c: e:
 
To check all your drives, type the following:
 
    scandisk /all
 
This will check all your hard disk partitions, in addition to all mounted
DoubleSpace drives.
 
Suppose you created an Undo disk, did not change the contents of the checked
drive since you created the Undo disk, and placed the Undo disk in drive A.
To undo the changes made by ScanDisk,  type the following:
 
    scandisk /undo a:
 

 
                                    SET
 
Displays, sets, or removes MS-DOS environment variables.
 
You use environment variables to control the behavior of some batch files
and programs and to control the way MS-DOS appears and works. The SET
command is often used in the AUTOEXEC.BAT or CONFIG.SYS files to set
environment variables each time you start MS-DOS.
 
Syntax
 
    SET variable=[string]
 
To display the current environment settings, use the following syntax:
 
    SET
 
Parameters
 
variable
    Specifies the variable you want to set or modify.
 
string
    Specifies the string you want to associate with the specified variable.
 
Related Commands
 
For information about setting environment variables that MS-DOS uses to
control its own operations, see the <PATH>, <PROMPT>, <SHELL>, and <DIR>
commands.
 

 
                                 SETNotes
 
Displaying the current environment settings
 
When you type the SET command alone, MS-DOS displays the current environment
settings. These settings usually include the COMSPEC and PATH environment
variables that MS-DOS uses to help find programs on disk. PROMPT, DIRCMD and
COPYCMD are some other environment variables that MS-DOS uses. For more
information about DIRCMD, see the <DIR> command.
 
Using parameters
 
When you use a SET command and specify values for both variable and string,
MS-DOS adds the specified variable value to the environment and associates
the string with that variable. If the variable already exists in the
environment, the new string value replaces the old string value.
 
If you specify only a variable and an equal sign (without a string) for the
SET command, MS-DOS clears the string value associated with the variable (as
if the variable is not there at all).
 
:m560a
Using SET in batch files
 
When creating batch files, you can use the SET command to create variables
and use them in the same way as you would the numbered variables %0 through
%9. You can also use the variables %0 through %9 as input for the SET
command.
 
:m560
Calling a SET variable from a batch file
 
When you call a variable value from a batch file, you must enclose the value
with percent signs (%). For example, if your batch program creates an
environment variable named BAUD, you can use the string associated with BAUD
as a replaceable parameter by inserting %BAUD% on the command line.
 
:m560b
Effect of SET on environment space
 
After you use a SET command, MS-DOS might display the following message:
 
    Out of environment space
 
This message means the available environment space is insufficient to hold
the new variable definition. For information about how to increase the
environment space, see the <COMMAND> command.
 
Using the COPYCMD environment variable
 
You can set the COPYCMD environment variable to specify whether you want the
COPY, MOVE, and XCOPY commands to prompt you for confirmation before
overwriting a file, whether issued from the command prompt or a batch file.
 
To force the COPY, MOVE, and XCOPY commands to prompt you before overwriting
in all cases, set the COPYCMD environment variable to /-Y. To force these
commands to overwrite in all cases without prompting you, set the COPYCMD
environment variable to /Y.
 
Typing any of these commands with the /Y or /-Y switch overrides all
defaults and the current setting of the COPYCMD environment variable.
 

 
                               SETExamples
 
To set an environment variable named INCLUDE so that the string C:\INC (the
INC directory on drive C) is associated with it, type the following
command:
 
    set include=c:\inc
 
You can then use the string C:\INC in batch files by enclosing the name
INCLUDE with percent signs (%). For example, you might include the following
command in a batch file in order to display the contents of the directory
associated with the INCLUDE environment variable:
 
    dir %include%
 
When MS-DOS processes this command, the string C:\INC replaces %INCLUDE%.
 
Another possible use for the SET command is in a batch program that adds a
new directory to the PATH environment variable, as the following example
shows:
 
    @echo off
    rem ADDPATH.BAT adds a new directory
    rem to the PATH environment variable.
    set path=%1;%path%
    set
 

 
                                   SETVER
 
Displays the version table. Reports a version number (earlier than 6.0) to
programs or device drivers that were designed for earlier versions of
MS-DOS.
 
You can also use this command to display and modify the version table, which
lists names of programs and the number of the MS-DOS version with which they
are designed to run. If you are using a program that has not been updated
for MS-DOS 6, you can add its name to the version table by using the SETVER
command.
 
Syntax
 
    SETVER [drive:path][filename n.nn]
 
    SETVER [drive:path][filename [/DELETE [/QUIET]]
 
To display the current version table, use the following syntax:
 
    SETVER [drive:path]
 
MS-DOS displays two columns: the left column lists the names of the program
files; the right column lists the corresponding MS-DOS version with which
each file is set to run.
 
Parameters
 
[drive:path]
    Specifies the location of the SETVER.EXE file.
 
filename
    Specifies the name of the program file (usually an .EXE or .COM file)
    that you want to add to the version table. You cannot use a wildcard
    character (* or ?).
 
n.nn
    Specifies the MS-DOS version (for example, 3.3 or 4.01) that MS-DOS 6
    reports to the specified program file.
 
Switches
 
/DELETE
    Deletes the version-table entry for the specified program file. You can
    abbreviate this switch as /D.
 
/QUIET
    Hides the message typically displayed during deletion of an entry from
    the version table.
 
Related Command
 
For information about loading the version table into MS-DOS, see the
<SETVER.EXE> command.
 

 
                               SETVERNotes
 
SETVER confirmation
 
If you make changes to the version table and no errors are detected, MS-DOS
displays the following message:
 
    WARNING - Contact your software vendor for information about whether a
    specific program works with MS-DOS 6. It is possible that Microsoft has
    not verified whether the program will successfully run if you use the
    SETVER command to change the program version number and version table.
    If you run the program after changing the version table in MS-DOS 6, you
    may lose or corrupt data or introduce system instabilities. Microsoft is
    not responsible for any loss or damage, or for lost or corrupted data.
 
    Version table successfully updated
 
    The version change will take effect the next time you restart your
    system.
 
Loading the version table into memory
 
Before you can use the SETVER command, the version table must be loaded into
memory by a <DEVICE> command in your CONFIG.SYS file. By default, the MS-DOS
Setup program modifies your CONFIG.SYS file to ensure that the version table
is loaded into memory each time you start your system.
 
Setting the version number of a command interpreter
 
You can use SETVER to set the version number of a command interpreter;
however, if you set the version number of the MS-DOS 6 command interpreter
(COMMAND.COM), you may not be able to start your system.
 
Using the version table
 
Many programs designed to run with a previous version of MS-DOS will run
correctly with MS-DOS 6. In some cases, however, a program might not run
correctly unless its name is included in the version table. The table
indicates to the program that it is running with the MS-DOS version for
which it was designed, even though it is running with MS-DOS 6. By
interpreting MS-DOS 6 as the earlier version, the program will probably run
correctly; however, using SETVER will not solve the problem if the program
is not compatible with MS-DOS 6.
 
Restarting after updating the version table
 
When you update the version table by adding or deleting entries, you must
restart your system before the changes will take effect.
 
Updating existing entries
 
If you specify a filename that is already in the version table, the new
entry replaces the existing entry.
 
SETVER exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    SETVER successfully completed its task.
 
1
    The user specified an invalid command switch.
 
2
    The user specified an invalid filename.
 
3
    There is insufficient system memory to carry out the command.
 
4
    The user specified an invalid version-number format.
 
5
    SETVER could not find the specified entry in the version table.
 
6
    SETVER could not find the SETVER.EXE file.
 
7
    The user specified an invalid drive.
 
8
    The user specified too many command-line parameters.
 
9
    SETVER detected missing command-line parameters.
 
10
    SETVER detected an error while reading the SETVER.EXE file.
 
11
    The SETVER.EXE file is corrupt.
 
12
    The specified SETVER.EXE file does not support a version table.
 
13
    There is insufficient space in the version table for a new entry.
 
14
    SETVER detected an error while writing to the SETVER.EXE file.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by SETVER. For an example of a batch
program that processes exit codes, see the <IF> command or the <CHOICE>
command.
 

 
                              SETVERExamples
 
Suppose you have a program file named MYPROG.EXE that runs with MS-DOS
version 3.30. To run MYPROG.EXE, you must first use the SETVER command to
create an entry in the version table that will cause MYPROG.EXE to interpret
MS-DOS 6 as version 3.30:
 
    setver myprog.exe 3.30
 
To delete the MYPROG.EXE entry from the version table (without otherwise
affecting the MYPROG.EXE file), type the following command:
 
    setver myprog.exe /delete
 
To list the contents of the version table on drive C, type the following
command:
 
    setver c:
 

 
                                 SETVER.EXE
 
Loads the MS-DOS version table into memory. This device driver must be
loaded by a <DEVICE> or <DEVICEHIGH> command in your CONFIG.SYS file.
 
SETVER.EXE loads into memory the MS-DOS version table, which lists names of
programs and the number of the MS-DOS version with which each program is
designed to run.
 
Syntax
 
    DEVICE=[drive:][path]SETVER.EXE
 
Parameters
 
[drive:][path]
    Specifies the location of the SETVER.EXE file.
 

 
                              SETVER.EXENote
 
If you are using SETVER to report a different MS-DOS version for a device
driver, the DEVICE command loading SETVER.EXE must appear in your CONFIG.SYS
file before the DEVICE command loading the other device driver.
 

 
                                   SHARE
 
Starts the Share program, which installs file-sharing and locking
capabilities on your disks and network drives.
 
Syntax
 
    SHARE [/F:space] [/L:locks]
 
In your CONFIG.SYS file, use the following syntax:
 
    INSTALL=[[drive:]path]SHARE.EXE [/F:space] [/L:locks]
 
Parameter
 
[drive:]path
    Specifies the location of the SHARE.EXE file.
 
Switches
 
/F:space
    Allocates file space (in bytes) for the MS-DOS storage area used to
    record file-sharing information. The default value is 2048.
 
/L:locks
    Sets the number of files that can be locked at one time. The default
    value is 20.
 

 
                                SHARENotes
 
Common use of Share
 
Typically, you use SHARE in a network or multitasking environment in which
programs share files. SHARE loads the code that supports file-sharing and
locking in these environments. Once you install Share, MS-DOS uses the code
loaded by Share to validate all read and write requests from programs. For
example, if two people are accessing the same data file, SHARE manages the
file so both people do not write to the file at the same time.
 
Allocating space for file-sharing information
 
When deciding how many bytes to allocate for file sharing, note that each
open file requires enough space for the length of the full path and
filename. The average length of a filename and its path is 20 bytes.
 
Using Share with Microsoft Flash File System
 
Share may be required in order to run some applications with Microsoft Flash
File System.
 

 
                              SHAREExamples
 
The following example shows how you can use the INSTALL command in your
CONFIG.SYS file to load Share, with the default values for the /F and /L
switches. MS-DOS searches for the file SHARE.EXE in the DOS directory on
drive C.
 
    install=c:\dos\share.exe
 
The following example allocates 4096 bytes for storing file-sharing
information and specifies that 25 files can be locked at one time. Again,
MS-DOS searches for SHARE.EXE in the DOS directory on drive C:
 
    install=c:\dos\share.exe /f:4096 /l:25
 

 
                                   SHELL
 
Specifies the name and location of the command interpreter you want MS-DOS
to use. You can use this command only in your CONFIG.SYS file.
 
If you want to use your own command interpreter (instead of COMMAND.COM),
you can specify its name by adding a SHELL command to your CONFIG.SYS file.
 
Syntax
 
    SHELL=[[drive:]path]filename [parameters]
 
Parameters
 
[[drive:]path]filename
    Specifies the location and name of the command interpreter you want
    MS-DOS to use.
 
parameters
    Specifies any command-line parameters or switches that can be used with
    the specified command interpreter.
 
Related Command
 
For information about COMMAND.COM switches, see the <COMMAND> command.
 

 
                                SHELLNotes
 
Default setting
 
The default command interpreter for MS-DOS is COMMAND.COM. If you do not use
a SHELL command in your CONFIG.SYS file, MS-DOS searches for COMMAND.COM in
the root directory of your startup drive. You need to use the SHELL command
if you want to specify a COMMAND.COM file that is not in the root directory
or if you do not want to use the default environment size for COMMAND.COM.
For information about COMMAND.COM switches, see the <COMMAND> command.
 
Using switches with a command interpreter
 
The SHELL command itself does not accept any switches, but if the command
interpreter does, you can include them on the SHELL command line.
 

 
                              SHELLExamples
 
Suppose the file NEWSHELL.COM is in a directory named BIN on your startup
drive, and suppose you want to use NEWSHELL.COM as your command interpreter.
To do this, add the following command to your CONFIG.SYS file:
 
    shell=\bin\newshell.com
 
Suppose you add the line SHELL=NEWCMDP.COM to your CONFIG.SYS file, and
suppose the NEWCMDP.COM command interpreter accepts the switches /C, /P, and
/E. You can now use any of these switches on the SHELL command line. Thus,
the following command would be valid:
 
    shell=newcmdp.com /c /p /e
 
:m567a
The SHELL command is the preferred method of using COMMAND to increase the
size of the environment. To increase the environment size to 512 bytes, add
the following command to your CONFIG.SYS file:
 
    shell=command.com /e:512 /p
 
To start an MS-DOS command interpreter located in the directory OLD on drive
C, add the following command to your CONFIG.SYS file:
 
    shell=c:\old\command.com c:\old /e:256 /p
 
For information about COMMAND.COM switches, see the <COMMAND> command.
 

 
                                   SHIFT
 
Changes the position of replaceable parameters in a batch program.
 
Syntax
 
    SHIFT
 

 
                                SHIFTNotes
 
How the SHIFT command works
 
The SHIFT command changes the values of the replaceable parameters %0
through %9 by copying each parameter into the previous one. In other words,
the value of %1 is copied to %0, the value of %2 is copied to %1, and so on.
This is useful for writing a batch file that performs the same operation on
any number of parameters.
 
:m567
Working with more than 10 command-line parameters
 
You can also use the SHIFT command to create a batch file that can accept
more than 10 parameters. If you specify more than 10 parameters on the
command line, those that appear after the tenth (%9) will be shifted one at
a time into %9.
 
Shifting parameters back
 
There is no backward SHIFT command. Once you carry out the SHIFT command,
you cannot recover the first parameter (%0) that existed before the shift.
 

 
                               SHIFTExample
 
The following batch file, MYCOPY.BAT, shows how to use the SHIFT command
with any number of parameters. It copies a list of files to a specific
directory. The parameters are the directory name followed by any number of
filenames.
 
    @echo off
    rem MYCOPY.BAT copies any number of files
    rem to a directory.
    rem The command uses the following syntax:
    rem mycopy dir file1 file2 ...
    set todir=%1
    :getfile
    shift
    if "%1"=="" goto end
    copy %1 %todir%
    goto getfile
    :end
    set todir=
    echo All done
 

 
                                 SIZER.EXE
 
Used by the MemMaker memory-optimization program to determine the size in
memory of device drivers and memory-resident programs.
 
During optimization, MemMaker adds SIZER.EXE to the beginning of each
CONFIG.SYS or AUTOEXEC.BAT command that starts a driver or program. When the
optimization process is complete, MemMaker removes SIZER.EXE from each
command line.
 
This program is used exclusively by MemMaker.
 

 
                                  SMARTDRV
 
Starts or configures SMARTDrive, which creates a disk cache in extended
memory. A disk cache can significantly speed up MS-DOS disk operations. When
used for disk caching, SMARTDrive is loaded by using the SMARTDRV command in
your AUTOEXEC.BAT file or at the command prompt.
 
SMARTDrive can also perform double buffering, which provides compatibility
for hard-disk controllers that cannot work with memory provided by EMM386 or
Windows running in 386 enhanced mode. To use double buffering, load the
<SMARTDRV.EXE> device driver by using a DEVICE command in your CONFIG.SYS
file.
 
SMARTDrive will not load after Windows has started.
 
Syntax
 
When starting SMARTDrive from your AUTOEXEC.BAT file or from the command
prompt, use the following syntax:
 
    [drive:][path]SMARTDRV [/X] [[drive[+|-]]...] [/U] [/C|/R] [/F|/N] [/L]
    [/V|/Q|/S] [InitCacheSize[WinCacheSize]] [/E:ElementSize]
    [/B:BufferSize]
 
Once SMARTDrive is running, use the following syntax:
 
    SMARTDRV [/X] [[drive[+|-]]...] [/C|/R] [/F|/N] [/Q|/S]
 
To view the current status after SMARTDrive has loaded, use the following
syntax:
 
    SMARTDRV
 
Parameters
 
[drive:][path]
    Specifies the location of the SMARTDRV.EXE file.
 
[[drive+|-]
    Specifies the letter of the disk drive for which you want to control
    caching. Include the plus (+) sign to enable caching for the specified
    drive; include the minus (-) sign to disable caching for that drive. You
    can specify multiple disk drives.
 
    If you specify a drive letter without a plus or minus sign, read-caching
    is enabled and write-caching is disabled. If you specify a drive letter
    followed by a plus sign (+), read-caching and write-caching are enabled.
    If you specify a drive letter followed by a minus sign (-), both
    read-caching and write-caching are disabled. If you don't specify a
    drive letter, floppy disk drives, CD-ROM drives, and drives created
    using Interlnk are read-cached but not write-cached, hard disk drives
    are both read-cached and write-cached, and network drives and Microsoft
    Flash memory-card drives are ignored. (For information about how
    DoubleSpace caches compressed drives, see Notes.)
 
InitCacheSize
    Specifies the size in kilobytes of the cache when SMARTDrive starts
    (when Windows is not running). The size of the disk cache affects how
    efficiently SMARTDrive runs. In general, the larger the cache, the less
    often SMARTDrive needs to read information from the disk, which speeds
    up your system's performance. If you do not specify an InitCacheSize
    value, SMARTDrive sets the value according to how much memory your
    system has (see the table below).
 
WinCacheSize
    Specifies, in kilobytes, how much SMARTDrive will reduce the cache size
    for Windows. When you start Windows, SMARTDrive reduces the size of the
    cache to recover memory for Windows' use. When you quit Windows, the
    cache returns to its normal size. WinCacheSize specifies the smallest
    size to which SMARTDrive will reduce the cache. The default value
    depends on how much available memory your system has (see the table
    below). If you specify a value for InitCacheSize that is smaller than
    the value specified for WinCacheSize, InitCacheSize is set to the same
    size as WinCacheSize.
 
The following table shows what the default values for InitCacheSize and
WinCacheSize will be, depending on the amount of available extended memory
your computer has.
 
Extended         InitCacheSize        WinCacheSize
Memory

 
Up to 1 MB       All extended         Zero (no caching)
                 memory
 
Up to 2 MB       1 MB                 256K
 
Up to 4 MB       1 MB                 512K
 
Up to 6 MB       2 MB                 1 MB
 
6 MB or more     2 MB                 2 MB
 
Switches
 
/X
    Disables write-behind caching for all drives. You can then enable
    caching for individual drives by using the drive+|- parameter.
 
/U
    Does not load the CD-ROM caching module of SMARTDrive even if you have a
    CD-ROM drive. If SMARTDrive is loaded with the /U switch, you cannot
    enable CD-ROM drive caching. If SMARTDrive is loaded without the /U
    switch, you can disable or enable caching individual CD-ROM drives using
    the drive+|- parameter.
 
/C
    Writes all cached information from memory to cached disks. SMARTDrive
    writes information from memory to the disk at times when other disk
    activity has slowed. You might use this option if you are going to turn
    off your computer and want to make sure all cached information has been
    written to the disk. (SMARTDrive writes all cached information to the
    disk if you restart your computer by pressing CTRL+ALT+DELETE, but not
    if you simply turn off the power or press your computer's reset
    button.)
 
/R
    Clears the contents of the existing cache, including writing all
    write-cached information to disk, and restarts SMARTDrive.
 
/F
    Writes cached data after each command completes. This is the default
    value.
 
/N
    Writes cached data when the system is idle. When the command prompt
    returns, not all cached data may be written yet. To ensure that all the
    cached data is written, use the /C switch.
 
/L
    Prevents SMARTDrive from automatically loading into upper memory blocks
    (UMBs), even if there are UMBs available. You can use the /L switch if
    upper memory is enabled for use by programs. If you are using
    SMARTDrive's double-buffering feature and your system appears to be
    running slowly, try adding the /L switch to the SMARTDrive command in
    your AUTOEXEC.BAT file.
 
/V
    Instructs SMARTDrive to display status and error messages when it
    starts. (By default, SMARTDrive does not display any messages unless it
    encounters an error condition.) The /V switch cannot be used in
    conjunction with the /Q switch.
 
/Q
    Instructs SMARTDrive not to display status messages when it starts. (By
    default, SMARTDrive does not display status messages when loading, but
    does for most other operations.) If SMARTDrive encounters an error while
    starting, it displays an error message whether or not it was loaded with
    the /Q switch. The /Q switch cannot be used in conjunction with the /V
    switch.
 
/S
    Displays additional information about the status of SMARTDrive.
 
/E:ElementSize
    Specifies in bytes the amount of the cache that SMARTDrive moves at a
    time. Valid values are 1024, 2048, 4096, and 8192. The default value is
    8192. The larger the value, the more conventional memory SMARTDrive
    uses.
 
/B:BufferSize
    Specifies in bytes the size of the read-ahead buffer. A read-ahead
    buffer is additional information that SMARTDrive reads when an
    application reads information from the hard disk. For example, if an
    application reads 512K of information from a file, SMARTDrive then reads
    the amount of information specified by BufferSize and saves it in
    memory. The next time the application needs to read information from
    that file, it can read it from memory instead. The default size of the
    read-ahead buffer is 16K (16384 bytes). Its value can be any multiple of
    ElementSize. The larger the value of BufferSize, the more conventional
    memory SMARTDrive uses.
 
Caution:  Check that SMARTDrive has completed all write-caching before you
          restart  or turn off your computer. (This is not necessary if you
          restart your computer by pressing CTRL+ALT+DELETE.) To have
          SMARTDrive write all cached information to cached disks, type
          SMARTDRV /C at the command prompt. After all disk activity has
          stopped, you can safely restart or turn off your computer.
 

 
                              SMARTDRVNotes
 
Enabling write caching on specific drives
 
By default, MS-DOS Setup configures SMARTDrive so that write-caching is
disabled. This configuration is extremely safe, but does not provide optimum
speed. After SMARTDrive starts, you can use the SMARTDRV command to enable
write caching on specific drives. This can significantly speed up your
system. To enable write-caching on a particular drive, carry out the
SMARTDRV command and specify the drive letter and a plus sign. For example,
to enable write-caching on drive C, you would type the following:
 
    smartdrv c+
 
For information about enabling write-caching for compressed drives, see
"SMARTDrive and Compressed Drives" later in this help topic.
 
Using extended memory
 
For SMARTDrive to use extended memory, your CONFIG.SYS file must contain a
DEVICE command for HIMEM.SYS or another extended-memory manager that
conforms to the Lotus/Intel/Microsoft/AST eXtended Memory Specification
(XMS).
 
Loading SMARTDrive into the upper memory area
 
If the upper memory area is available through MS-DOS, SMARTDrive will
automatically load into upper memory. You do not need to use the LOADHIGH
command with SMARTDrive.
 
If your hard disk requires double buffering, SMARTDrive may run faster if
its cache is located in conventional memory. To load SMARTDrive into upper
memory and its cache in conventional memory, use the following command:
 
    loadhigh smartdrv /l
 
SMARTDrive and compressed drives
 
SMARTDrive does not actually cache compressed drives; instead, it caches the
physical (host) drive on which the compressed volume file is located. This
improves the speed of both the physical drive and the compressed drive.
 
SMARTDrive and CD-ROM drives
 
If you are using a CD-ROM drive and you want to cache it, load MSCDEX before
you load SMARTDrive. If you do not want to cache the CD-ROM drive, load
SMARTDrive with the /U switch. (Note that MS-DOS Setup adds the SMARTDRV
command to the beginning of your AUTOEXEC.BAT file, before any other
commands.)
 
To find out whether SMARTDrive is caching your CD-ROM drive, type SMARTDRV
at the command prompt.
 

 
                             SMARTDRVExamples
 
To create a SMARTDrive disk cache and use the default cache size, add the
following command to your AUTOEXEC.BAT file:
 
    c:\dos\smartdrv
 
Example: A typical SMARTDrive command
 
Suppose you want to create a disk cache with a cache size of 2048K, and
ensure that Windows will not reduce the size of the cache to less than
1024K. To do this and to specify that the SMARTDRV.EXE file is located in
the DOS directory on drive C, add the following line to your AUTOEXEC.BAT
file:
 
    c:\dos\smartdrv 2048 1024
 
Example: Enabling and disabling caching on specific drives
 
Suppose that SMARTDrive is already running and you want to enable write
caching on drive C. To do this, type the following at the command prompt:
 
    smartdrv c+
 
Suppose you want to configure SMARTDrive to disable all caching of your
floppy-disk drives and enable write caching on Interlnk drive D. (Interlnk
drives, like floppy-disk drives, are not write-cached by default because
it's possible to lose access to the drive before all information has been
written from the cache). To do this, you would add the following command to
your AUTOEXEC.BAT:
 
    c:\dos\smartdrv a- b- d+
 
Example: Saving cached information on the hard disk
 
Before pressing your computer's reset button or turning off your computer,
it is a good idea to have SMARTDrive write all cached information from
memory to any cached disks. To do this, type the following at the command
prompt:
 
    smartdrv /c
 
You will not need to use this command before restarting your computer by
pressing the CTRL+ALT+DELETE keys: SMARTDrive detects the CTRL+ALT+DELETE
key sequence and automatically writes all information to cached disks before
allowing the system to restart.
 

 
                       SMARTDRV.EXEDouble Buffering
 
Loads the SMARTDRV.EXE device driver to perform double buffering. Double
buffering provides compatibility for certain hard-disk controllers that
cannot work with memory provided by EMM386 or Windows running in 386
enhanced mode. To find out whether you need to use double buffering, see
<SMARTDRV.EXENotes>.
 
SMARTDrive can also perform disk caching, which can speed up your computer.
To use SMARTDrive for disk caching, add the <SMARTDRV> command to your
AUTOEXEC.BAT file.
 
To use the double-buffering feature of SMARTDrive, the SMARTDRV.EXE device
driver must be loaded by a <DEVICE> command in your CONFIG.SYS file.
 
Syntax
 
    DEVICE=[drive:][path]SMARTDRV.EXE /DOUBLE_BUFFER
 
Parameters
 
[drive:][path]
    Specifies the location of the SMARTDRV.EXE file.
 
/DOUBLE_BUFFER
    Instructs SMARTDrive to perform double buffering.
 

 
                            SMARTDRV.EXENotes
 
Double buffering and conventional memory
 
SMARTDrive's double-buffering component must be loaded in conventional
memory. It uses 2K of conventional memory, and cannot be loaded in upper
memory.
 
The SMARTDrive disk cache can use either upper memory or conventional
memory. For more information, see <SMARTDRVNotes>.
 
Determining whether you need to use double buffering
 
If you use EMM386 or run Windows in 386 enhanced mode, you may need to use
double buffering. Double buffering is most commonly required with an SCSI
(small computer system interface) hard disk or other device, but can also be
necessary with an ESDI (enhanced system device interface) or MCA
(microchannel architecture) device.
 
Most hard disks do not need to use double buffering. If you are not sure
whether your hard disk needs double buffering, follow these steps:
 
1  Add the following command to your CONFIG.SYS file if the file does not
   already contain such a command:
 
       device=c:\dos\smartdrv.exe /double_buffer
 
   This command must appear before the DEVICE command that starts EMM386, if
   any.
 
2  Add the following command to your AUTOEXEC.BAT file if the file does not
   already contain such a command:
 
       c:\dos\smartdrv
 
3  Run the MemMaker program if you haven't already done so.
 
4  Use the MEM /C /P command to confirm that upper memory is in use.
 
5  At the command prompt, type SMARTDRV and then press ENTER.
 
   SMARTDrive displays information about your system.
 
6  Look at the column labeled "Buffering." If any line in this column reads
   "yes," you need to run the double-buffering component of SMARTDrive. (If
   your system seems to be running slowly, try adding the /L switch to the
   SMARTDRV command in AUTOEXEC.BAT.)
 
   If every line in the "Buffering" column says "no," you can remove the
   DEVICE command for SMARTDRV.EXE from your CONFIG.SYS file.
 
   If any line in the "Buffering" column contains the character "-", then
   SMARTDrive is unable to detect whether double buffering is needed. Use
   the MEM /C /P command to confirm that programs are located in upper
   memory.
 

 
                           SMARTDRV.EXEExample
 
Suppose you need to use SMARTDrive's double-buffering feature so that you
can use EMM386 to gain access to the upper memory area. To enable double
buffering, you would add the following command to your CONFIG.SYS file:
 
    device=c:\dos\smartdrv.exe /double_buffer
 
To improve your computer's speed, you could also install the SMARTDrive disk
cache by adding the following line to your AUTOEXEC.BAT file:
 
    c:\dos\smartdrv /l
 

 
                                    SORT
 
Reads input, sorts data, and writes the results to the screen, a file, or
another device.
 
SORT acts as a filter, reading characters in a specified column and
rearranging them in ascending or descending order.
 
Syntax
 
    SORT [/R] [/+n] [<] [drive1:][path1]filename1
    [> [drive2:][path2]filename2]
 
    [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]
 
Parameters
 
[drive1:][path1]filename1
    Specifies the location and name of the file whose data you want to
    sort.
 
[drive2:][path2]filename2
    Specifies the location and name of a file in which the sorted output is
    to be stored.
 
command
    Specifies a command whose output is the data you want to sort.
 
:m569a
Switches
 
/R
    Reverses the order of the sorting operation; that is, sorts from Z to A,
    and then from 9 to 0.
 
/+n
    Sorts the file according to the character in column n. If you do not use
    this switch, the SORT command sorts data according to the characters in
    column 1.
 
Related Command
 
For information about displaying information one screen at a time, see the
<MORE> command.
 

 
                                SORTNotes
 
Specifying a source
 
Unless you specify the command or filename parameter, SORT acts as a filter
and takes input from the MS-DOS standard input (usually from the keyboard,
from a pipe, or from a file).
 
Using redirection symbols with SORT
 
You can use the pipe (|) or the less-than sign (<) to direct data through
the SORT command from command or filename. If you want to display the
information one screen at a time or direct the information to a file, you
can also specify the MORE command or a filename. You can use the
greater-than sign (>) to direct the sorted output to a file.
 
Before using a pipe for redirection, you should set the TEMP environment
variable in your AUTOEXEC.BAT file.
:m569
 
Collating sequence
 
The SORT program uses the collating-sequence table corresponding to the
country code and code-page settings. Characters greater than ASCII code 127
are sorted based on information in the COUNTRY.SYS file or in an alternate
file specified by the COUNTRY command in your CONFIG.SYS file.
 
Uppercase vs. lowercase
 
SORT does not distinguish between uppercase and lowercase letters.
 
Limits on file size
 
The SORT command can handle files as large as 64K.
 

 
                               SORTExamples
 
The following command reads the file EXPENSES.TXT, sorts it in reverse
order, and displays it on your screen:
 
    sort /r < expenses.txt
 
Suppose you want to search a large file named MAILLST.TXT for the text
"Jones", and suppose you want to sort the results of the search. To do this,
use the pipe (|) to direct the output of a FIND command to the SORT command,
as shown in the following example:
 
    find "jones" maillst.txt | sort
 
The command produces a sorted list of lines that contain the specified
text.
 
:m570
To sort keyboard input and display the results alphabetically on the screen,
you can first use the SORT command with no parameters, as the following
example shows:
 
    SORT
 
Then type the text you want sorted, pressing ENTER at the end of each line.
When you have finished typing text, press CTRL+Z, and then press ENTER. The
SORT command displays the text you typed, sorted alphabetically. You could
also redirect sorted keyboard input to a file.
 

 
                                   STACKS
 
Supports the dynamic use of data stacks to handle hardware interrupts. You
can use this command only in your CONFIG.SYS file.
 
Syntax
 
    STACKS=n,s
 
Parameters
 
n
    Specifies the number of stacks. Valid values for n are 0 and numbers in
    the range 8 through 64.
 
s
    Specifies the size (in bytes) of each stack. Valid values for s are 0
    and numbers in the range 32 through 512.
 

 
                               STACKSNotes
 
Default settings
 
The default settings for the STACKS command are as follows:
 
Computer                              Stacks
 

 
IBM PC, IBM PC/XT, IBM PC-Portable      0,0
 
Other                                  9,128
 
Special cases for stack allocation
 
Upon receiving a hardware interrupt, MS-DOS allocates one stack from the
specified number of stacks. When you specify 0 for the n and s values,
MS-DOS allocates no stacks. If the values are 0, each running program must
have enough stack space to accommodate the computer's hardware interrupt
drivers. Many computers operate correctly, saving some memory for programs,
with n and s values of 0. If, however, your computer becomes unstable when
you set these values to 0, return to the default values.
 
Increasing the value of STACKS
 
If the STACKS values are not equal to 0,0 and you see a "Stack Overflow" or
"Exception error 12" message, increase the number or size of the stacks.
 

 
                              STACKSExample
 
To allocate 8 stacks of 512 bytes each for hardware-interrupt handling, add
the following command to your CONFIG.SYS file:
 
    stacks=8,512
 

 
                                  SUBMENU
 
Defines an item on a startup menu that, when selected, displays another set
of choices. You can use this command only within a menu block in your
CONFIG.SYS file.
 
The startup menu is a list of choices that appears when you start your
computer. You define a startup menu by using special CONFIG.SYS commands.
Each item on the menu corresponds to a set of CONFIG.SYS commands called a
"configuration block." A startup menu makes it possible to start your
computer with a variety of configurations. For more information about
defining multiple configurations, see the chapter "Configuring Your System"
in the MS-DOS 6 User's Guide.
 
Syntax
 
    SUBMENU=blockname[,menu_text]
 
Parameters
 
blockname
    Specifies the name of the associated menu block. The menu block must be
    defined elsewhere in the CONFIG.SYS file and can contain menu-definition
    commands. Unlike the "main" menu block, which must have the block name
    [MENU], a menu block for a submenu can have any name you want. If MS-DOS
    cannot find a block with the specified name, the item does not appear on
    the startup menu. The block name can be up to 70 characters long and can
    contain most printable characters. It cannot include spaces, backslashes
    (\) and forward slashes (/), commas, semicolons (;), equal signs (=),
    and square brackets ([ and ]).
 
menu_text
    Specifies the text you want MS-DOS to display for this menu item. If you
    don't specify any menu text, MS-DOS displays the block name as the menu
    item. The menu text can be up to 70 characters long and can contain any
    characters you want.
 
Related Commands
 
The SUBMENU command is one of six special CONFIG.SYS commands for defining
startup menus. The other commands are:
 
  The <MENUITEM> command, which defines an item on the menu.
 
  The <MENUDEFAULT> command, which specifies the default menu item.
 
  The <MENUCOLOR> command, which defines the color of the menu's text and
   screen background.
 
  The <NUMLOCK> command, which specifies the state of the NUM LOCK key when
   the startup menu appears. (Although NUMLOCK can be used anywhere in the
   CONFIG.SYS file, it is especially useful when defining a startup menu.)
 
  The <INCLUDE> command, which includes the contents of one configuration
   block in another. This command cannot be included in a menu block.
 
For an overview of the steps required to define multiple configurations, see
<Commands for Defining Multiple Configurations>.
 

 
                              SUBMENUExample
 
The following CONFIG.SYS file defines a main startup menu and one submenu:
 
    [menu]
    menuitem base_config,Base configuration only
    menuitem full_config,Normal configuration
    submenu netmenu, Normal configuration with network
 
    [netmenu]
    menuitem lanman, Start Microsoft LAN Manager
    menuitem vines, Start Banyan VINES
 
    [base_config]
    dos=high
    device=c:\dos\himem
 
    [full_config]
    include=base_config
    dos=umb
    device=c:\dos\emm386 ram
    device=c:\dos\ramdrive.sys 512
 
    [lanman]
    include=full_config
    rem Commands for Microsoft LAN Manager would go here.
 
    [vines]
    include=full_config
    rem Commands for Banyan VINES would go here
 
This CONFIG.SYS file provides a choice of four configurations: a basic
configuration (base_config), a full configuration (full_config), and two
network configurations. Both network configurations include all the commands
in the full configuration; the lanman configuration runs Microsoft LAN
Manager and the vines configuration runs Banyan VINES network software. To
choose a network configuration, the user first selects item 3, "Normal
configuration with network," from the main menu. MS-DOS then displays the
network choices on the submenu.
 
When MS-DOS starts, it displays the following menu:
 
    MS-DOS 6 Startup Menu
    =====================
 
       1. Base configuration only
       2. Normal configuration
       3. Normal configuration with network
 
    Enter a choice: 1
 
If item 3 is selected, MS-DOS displays the following menu instead:
 
    MS-DOS 6 Startup Menu
    =====================
 
    1. Start Microsoft LAN Manager
    2. Start Banyan VINES
 
    Enter a choice: 1
 

 
                                   SUBST
 
Associates a path with a drive letter.
 
The drive letter you assign represents a virtual drive, because you can use
the drive letter in commands as if it were a physical drive.
 
Do not use the SUBST command when Windows is running.
 
Syntax
 
    SUBST [drive1: [drive2:]path]
 
    SUBST drive1: /D
 
To display the names of the virtual drives in effect, use the following
syntax:
 
    SUBST
 
Parameters
 
drive1:
    Specifies the virtual drive to which you want to assign a path.
 
drive2:
    Specifies the physical drive that contains the specified path (if
    different from the current drive).
 
path
    Specifies the path that you want to assign to a virtual drive.
 
Switch
 
:m572
/D
    Deletes a virtual drive.
 
Related Command
 
For information about increasing the number of available drive letters, see
the <LASTDRIVE> command.
 

 
                                SUBSTNotes
 
Using other commands with SUBST
 
The following commands do not work, or should not be used, on drives used in
the SUBST command:
 
ASSIGN           DISKCOPY          RECOVER
BACKUP           FDISK             RESTORE
CHKDSK           FORMAT            SYS
DEFRAG           LABEL             UNDELETE /S
DISKCOMP         MIRROR
 
Valid drive1 values
 
The drive1 parameter must be within the range specified by the LASTDRIVE
command. If not, SUBST displays the following error message:
 
    Invalid parameter - drive1:
 
Using SUBST with Microsoft Windows
 
Do not create or delete virtual drives using the SUBST command while
Microsoft Windows is running. If you want to create or delete a virtual
drive using the SUBST command, quit Windows, create or delete the virtual
drive, and then start Windows again.
 
Using SUBST with compressed drives
 
You can use SUBST to associate a path on a compressed drive with a drive
letter. However, the drive size and free space of the SUBST drive (for
example, as reported by the DIR command) might not match the drive size and
free space reported for the compressed drive.
 

 
                               SUBSTExample
 
The following command creates a virtual drive Z for the path
B:\USER\BETTY\FORMS:
 
    subst z: b:\user\betty\forms
 
Now, instead of typing the full path, you can reach this directory by typing
the letter of the virtual drive, followed by a colon, as in the following
example:
 
    z:
 
This example works only if you have included the line LASTDRIVE=Z in your
CONFIG.SYS file to define Z as the highest letter that MS-DOS recognizes as
a disk drive. For more information, see the <LASTDRIVE> command.
 

 
                                  SWITCHES
 
Specifies special options in MS-DOS. Use this command only in your
CONFIG.SYS file.
 
Syntax
 
    SWITCHES= /F /K /N /W
 
Switches
 
/F
    Skips the 2-second delay after displaying the "Starting MS-DOS ..."
    message during startup.
 
/K
    Forces an enhanced keyboard to behave like a conventional keyboard.
 
/N
    Prevents you from using the F5 or F8 key to bypass startup commands.
    (SWITCHES /N does not prevent you from pressing CTRL+F5 or CTRL+F8 to
    bypass DBLSPACE.BIN; to prevent this, use the <DBLSPACE /SWITCHES>
    command to add the SWITCHES /N setting to your DBLSPACE.INI file.)
 
/W
    Specifies that the WINA20.386 file has been moved to a directory other
    than the root directory. You need to use this switch only if you are
    using Microsoft Windows 3.0 in enhanced mode and have moved the
    WINA20.386 file from the root directory to another directory.
 

 
                              SWITCHESNotes
 
When to use the SWITCHES command with an enhanced keyboard
 
If you have a program that does not correctly interpret input from an
enhanced keyboard, add this command to your CONFIG.SYS file so your enhanced
keyboard will use conventional keyboard functions.
 
Using the /K switch with ANSI.SYS
 
If you use the SWITCHES=/K command and you install the ANSI.SYS device
driver, use the /K switch on the DEVICE command line for ANSI.SYS.
 
The SWITCHES command and the DBLSPACE /SWITCHES command
 
The SWITCHES /N and SWITCHES /F commands affect the behavior of the F5 and
F8 keys when your computer starts. To control the behavior of the CTRL+F5
and CTRL+F8 startup keys, which bypass DoubleSpace in addition to other
startup commands, use the <DBLSPACE /SWITCHES>command.
 
Using the SWITCHES command with Microsoft Windows 3.0
 
In order for Microsoft Windows 3.0 to run in enhanced mode, the WINA20.386
file must be located in your root directory. If this file is not present,
you will see this message:
 
    You must have the file WINA20.386 in the root of your boot drive
    to run Windows in Enhanced Mode
 
If you move the WINA20.386 file, you must add the SWITCHES command with the
/W switch to your CONFIG.SYS file. You must also add a DEVICE command under
the [386Enh] heading in your SYSTEM.INI file, specifying the new location of
the WINA20.386 file.
 
If you do not use Microsoft Windows version 3.0, do not use the SWITCHES
command with the /W switch.
 

 
                             SWITCHESExamples
 
If you want MS-DOS to use conventional keyboard functions even though you
are using an enhanced keyboard, add the following command to your CONFIG.SYS
file:
 
    switches=/k
 
If you use Microsoft Windows 3.0 in enhanced mode and you have moved the
WINA20.386 file to a directory other than the root directory, add the
following command to your CONFIG.SYS file:
 
    switches=/w
 
If you want to prevent users from using the F5 or F8 key to bypass startup
commands, add the following command to your CONFIG.SYS file:
 
    switches=/n
 
If you want to skip the 2-second delay after displaying the "Starting MS-DOS
..." message during startup, add the following command to your CONFIG.SYS
file:
 
    switches=/f
 
You can also combine switches in one command. For example, if you want to
skip the 2-second delay after displaying the "Starting MS-DOS ..." message
during startup, and you use Microsoft Windows 3.0 and have moved the
WINA20.386 file to a directory other than the root directory, add the
following command to your CONFIG.SYS file:
 
    switches=/f /w
 

 
                                    SYS
 
Creates a startup disk by copying hidden MS-DOS system files (IO.SYS and
MSDOS.SYS), the MS-DOS command interpreter (COMMAND.COM), and the part of
MS-DOS that provides access to compressed drives (DBLSPACE.BIN) to the
disk.
 
IO.SYS, MSDOS.SYS and DBLSPACE.BIN are hidden files and do not typically
appear when you type the DIR command. To see these files, type DIR /A.
 
Syntax
 
    SYS [drive1:][path] drive2:
 
Parameters
 
[drive1:][path]
    Specifies the location of the system files. If you do not specify a
    path, MS-DOS searches the root directory on the current drive for the
    system files.
 
drive2:
    Specifies the drive to which you want to copy the system files. These
    files can be copied only to a root directory, not to a subdirectory.
 
Related Commands
 
For information about copying files, see the <COPY> and <XCOPY> commands.
 

 
                                 SYSNotes
 
How the SYS command copies files
 
The SYS command copies the files in the following order: IO.SYS, MSDOS.SYS,
COMMAND.COM and DBLSPACE.BIN.
 
No requirement for contiguous files
 
MS-DOS no longer requires the two system files to be contiguous. This means
that when you want to copy a new version of MS-DOS to a disk containing
system files for MS-DOS version 3.3 or earlier, you need not reformat the
disk.
 
Using the SYS command on compressed drives
 
The SYS command does not work on compressed drives. If drive C is compressed
and you need to make your hard disk bootable, use the SYS command on drive
C's host drive. (To find out which is drive C's host drive, type DBLSPACE
/INFO C: at the command prompt.)
 
qhmark 574 Using the SYS command on assigned drives and network drives
 
The SYS command does not work on drives that have been redirected by using
the ASSIGN, JOIN, or SUBST command. SYS also does not work on network drives
or drives redirected using INTERLNK.
 

 
                               SYSExamples
 
To copy the MS-DOS system files and command interpreter from the disk in the
current drive to a disk in drive A, type the following command:
 
    sys a:
 
To copy the MS-DOS system files and command interpreter from a disk in drive
B to a disk in drive A, type the following the command:
 
    sys b: a:
 

 
                                    TIME
 
Displays the system time or sets your computer's internal clock.
 
MS-DOS uses time information to update the directory whenever you create or
change a file.
 
Syntax
 
    TIME [hours:[minutes[:seconds[.hundredths]]][A|P]]
 
To display the current time or to display a prompt by which you can change
the current time, use the following syntax:
 
    TIME
 
Parameters
 
hours
    Specifies the hour. Valid values are in the range 0 through 23.
 
minutes
    Specifies minutes. Valid values are in the range 0 through 59.
 
seconds
    Specifies seconds. Valid values are in the range 0 through 59.
 
hundredths
    Specifies hundredths of a second. Valid values are in the range 0
    through 99.
 
A|P
    Specifies A.M or P.M. for the 12-hour time format. If you type a valid
    12-hour time but do not type A or P, TIME uses A (for A.M.).
 
Related Commands
 
For information about changing the current date, see the <DATE> command.
 
For information about changing the time format, see the <COUNTRY> command.
 

 
                                TIMENotes
 
Specifying an invalid TIME format
 
If you specify the time in an invalid format, MS-DOS displays the following
message and then waits for you to specify the time:
 
    Invalid time
    Enter new time:_
 
Changing the TIME format
 
You can change the TIME format by changing the COUNTRY setting in your
CONFIG.SYS file. For more information, see the <COUNTRY> command. Depending
on the country code, MS-DOS will display the time in the 12-hour format or
the 24-hour format. If you are setting the time in the 12-hour format, be
sure to specify P for hours after noon.
 
Ensuring that MS-DOS prompts you for the time
 
If you want MS-DOS to prompt you for the current time whenever you start
your system, you can add the TIME command to your AUTOEXEC.BAT file. MS-DOS
will automatically prompt you for the time and date if you do not have an
AUTOEXEC.BAT file.


 
                               TIMEExample
 
To set your computer's clock to 1:36 P.M., use either of the following
commands:
 
    TIME 13:36
 
    TIME 1:36p
 

 
                                    TREE
 
Graphically displays the structure of a directory.
 
Syntax
 
    TREE [drive:][path] [/F] [/A]
 
Parameters
 
drive:
    Specifies the drive that contains the disk for which you want to display
    the directory structure.
 
path
    Specifies the directory for which you want to display the directory
    structure.
 
Switches
 
/F
    Displays the names of the files in each directory.
 
/A
    Specifies that TREE is to use text characters instead of graphic
    characters to show the lines linking subdirectories. Use this switch
    with code pages that do not support graphic characters and to send
    output to printers that don't properly interpret the graphic
    characters.
 
Related Command
 
For information about displaying the contents of a directory, see the <DIR>
command.
 

 
                                 TREENote
 
The structure that TREE displays depends upon the parameters you specify on
the command line. If you do not specify a drive or path, TREE displays the
tree structure beginning with the current directory of the current drive.
 

 
                               TREEExamples
 
To display the names of all the subdirectories on the disk in your current
drive, type the following command:
 
    tree \
 
:m578
To display, one screen at a time, the files in all the directories on drive
C, type the following command:
 
    tree c:\ /f | more
 
:m578a
To print the same list that the previous example displayed, type the
following command:
 
    tree c:\ /f > prn



 
                                    TYPE
 
Displays the contents of a text file.
 
Use the TYPE command to view a text file without modifying it.
 
Syntax
 
    TYPE [drive:][path]filename
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file that you want to view.
 
Related Commands
 
For information about displaying filenames and file sizes, see the <DIR>
command.
 
For information about displaying text files one screen at a time, see the
<MORE> command.
 

 
                                 TYPENote
 
Displaying binary files
 
If you display a binary file or a file created by a program, you may see
strange characters on the screen, including formfeed characters and
escape-sequence symbols. These characters represent control codes used in
the binary file. In general, you should avoid using the TYPE command to
display binary files.
 

 
                               TYPEExamples
 
If you want to display the contents of a file named HOLIDAY.MAR, type the
following command:
 
    type holiday.mar
 
:m579
If the file you want to display is long, you can use the MORE command along
with TYPE, as shown in the following command, to display the file's contents
one screen at a time:
 
    type holiday.mar | more
 
Before using a pipe (|) for redirection, you should set the TEMP environment
variable in your AUTOEXEC.BAT file.
 

 
                                  UNDELETE
 
Restores files that were previously deleted by using the <DEL> command.
 
UNDELETE offers three levels of protecting files against accidental
deletion Delete Sentry, Delete Tracker, and standard. For information
about each level of protection, see Notes.
 
For information about the Windows version of UNDELETE, see the chapter
"Managing Your System" in the MS-DOS 6 User's Guide, or see Windows Undelete
Help.
 
Syntax
 
    UNDELETE [[drive:][path]filename] [/DT|/DS|/DOS]
 
    UNDELETE [/LIST|/ALL|/PURGE[drive]|/STATUS|/LOAD|/UNLOAD
    |/S[drive]|/Tdrive[-entries]]
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file or set of files you want to
    recover. By default, UNDELETE restores all deleted files in the current
    directory.
 
Switches
 
/LIST
    Lists the deleted files that are available to be recovered, but does not
    recover any files. The [drive:][path]filename parameter and the /DT,
    /DS, and /DOS switches control the listing produced by this switch.
 
:m580
/ALL
    Recovers deleted files without prompting for confirmation on each file.
    UNDELETE uses the Delete Sentry method, if it is present. If Delete
    Sentry is not, UNDELETE uses Delete Tracker, if present. Otherwise,
    UNDELETE recovers files from the DOS directory, supplying a number sign
    (#) for the missing first character in the filename. If a duplicate
    filename already exists, this switch next tries each of the following
    characters, in the order listed, until the result is a unique filename:
    #%&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
 
/DOS
    Recovers only those files that are internally listed as deleted by
    MS-DOS, prompting for confirmation on each file. If a deletion-tracking
    file exists, this switch causes UNDELETE to ignore it.
 
/DT
    Recovers only those files listed in the deletion-tracking file,
    prompting for confirmation on each file.
 
/DS
    Recovers only those files listed in the SENTRY directory, prompting for
    confirmation on each file.
 
/LOAD
    Loads the Undelete memory-resident program into memory using information
    defined in the UNDELETE.INI file. If the UNDELETE.INI file does not
    exist, UNDELETE uses default values.
 
/UNLOAD
    Unloads the memory-resident portion of the Undelete program from memory,
    turning off the capability to restore deleted files.
 
/PURGE[drive]
    Deletes the contents of the SENTRY directory. If no drive is specified,
    UNDELETE searches the current drive for the directory.
 
/STATUS
    Displays the type of delete protection in effect for each drive.
 
/S[drive]
    Enables the Delete Sentry level of protection and loads the
    memory-resident portion of the UNDELETE program. The program records
    information used to recover deleted files on the specified drive. If you
    do not specify a drive, using this switch enables the Delete Sentry
    level of protection on the current drive. Specifying the /S switch loads
    the memory-resident program into memory using the information defined in
    the UNDELETE.INI file.
 
/Tdrive[-entries]
    Enables the Delete Tracker level of protection and loads the
    memory-resident portion of the UNDELETE program. The program records
    information used to recover deleted files. The required drive parameter
    specifies the drive containing the disk for which you want UNDELETE to
    save information about deleted files. The optional entries parameter,
    which must be a value in the range 1 through 999, specifies the maximum
    number of entries in the deletion-tracking file (PCTRACKR.DEL). The
    default value for entries depends upon the type of disk being tracked.
    The following list shows each disk size, its default number of entries,
    and its corresponding file size:
 
Disk       Entries  File size
size

 
360K       25       5K
 
720K       50       9K
 
1.2 MB     75       14K
 
1.44 MB    75       14K
 
20 MB      101      18K
 
32 MB      202      36K
 
>32 MB     303      55K
 
    CAUTION:  Do not use deletion tracking for any drive that has been
              redirected by using the JOIN or SUBST command. If you intend
              to use the ASSIGN command, you must do so before using
              UNDELETE to install deletion tracking.
 

 
                              UNDELETENotes
 
CAUTION:  Once you delete a file from your disk, you may not be able
          retrieve it. Although the UNDELETE command can recover deleted
          files, it can do so with certainty only if no other files have
          been created or changed on the disk. If you accidentally delete a
          file that you want to keep, stop what you are doing and
          immediately use the UNDELETE command to retrieve the file.
 
Levels of protection
 
MS-DOS provides three levels of protection against accidental file
deletionDelete Sentry, Delete Tracker, and standard.
 
Delete Sentry provides the highest level of protection. Delete Sentry
requires a small amount of memory and disk space. The next level of
protection is Delete Tracker, which requires the same amount of memory as
Delete Sentry, but minimal disk space. The lowest level of protection,
standard, requires neither memory nor disk space, but still allows you to
recover deleted files, provided that their location on the disk has not been
taken by other files.
 
For more details, see the notes that follow about each level of protection.
 
Delete Sentry
 
Delete Sentry provides the highest level of protection to ensure that you
can recover deleted files. This level of protection creates a hidden
directory named SENTRY. When you delete a file, UNDELETE moves the file from
its current location to the SENTRY directory without changing the record of
the file's location in the file allocation table (FAT). If you undelete the
file, MS-DOS moves the file back to its original location.
 
The size of the SENTRY directory and its files is limited to approximately 7
percent of your hard disk space. If you delete a file and the directory and
its files exceed this limit, UNDELETE purges the oldest files until enough
space has been freed to accommodate the newly deleted file.
 
In addition to the disk space needed for the SENTRY directory, Delete Sentry
requires 13.5K of memory for the memory-resident portion of the UNDELETE
program.
 
Delete Tracker
 
Delete Tracker provides an intermediate level of protection. It uses a
hidden file named PCTRACKER.DEL to record the location of deleted files.
When you delete a file, MS-DOS changes the file allocation table (FAT) to
indicate that the location of the file is now available for another file.
You can recover the deleted file provided that another file has not been
placed in that location. If another file has been placed there, you may be
able to partially recover the deleted file.
 
Delete Tracker requires 13.5K of memory for the memory-resident portion of
the UNDELETE program and a minimal amount of disk space for the
PCTRACKER.DEL file.
 
Standard
 
The standard level of protection is automatically available when you switch
on your computer. Of the three levels of guarding against accidental file
deletion, it provides the lowest level of protection. However, it does not
require you to load a memory-resident program. It also has the advantage of
requiring neither memory nor disk space.
 
Using this level of protection, you can recover a deleted file, provided
MS-DOS has not placed another file in the deleted file's location. If a file
has been placed there, you may be unable to recover all or part of the
deleted file.
 
Method used to recover files
 
Use any one of the following switches: /DOS, /DT, or /DS. If you do not
specify a switch, UNDELETE uses Delete Sentry, if it is available. If Delete
Sentry is not available, UNDELETE uses the Delete Tracker file, if
available. If a deletion-tracking file is not available, UNDELETE attempts
to recover files by using MS-DOS.
 
CAUTION:  UNDELETE cannot restore a directory that has been removed, and it
          cannot retrieve a file if you have removed the directory that
          contained the file. If the directory was an immediate subdirectory
          of the root directory, you may be able to retrieve the directory
          and its files if you first use the UNFORMAT command to restore the
          directory and then use UNDELETE to retrieve the files. You must
          use caution because you can lose data if you use UNFORMAT
          incorrectly. Usually, UNFORMAT can restore only immediate
          subdirectories of the root directory. However, when you use
          UNFORMAT to recover an accidentally formatted disk, UNFORMAT
          recovers all root-level files and subdirectory names.
 
The UNDELETE.INI file
 
UNDELETE uses the UNDELETE.INI file to define values when UNDELETE is loaded
into memory. If the file does not exist when you load UNDELETE into memory,
UNDELETE creates an UNDELETE.INI file that contains the following values:
 
  Use the Delete Sentry method of file tracking on the current drive.
 
  Save all files except *.TMP, *.VM?, *.WOA, *.SWP, *.SPL, *.RMG, *.IMG,
   *.THM, and *.DOV files.
 
  Do not save files that have the archive bit set.
 
  Purge files after 7 days.
 
  Restrict the amount of disk space available for deleted files to 20
   percent of total disk space.
 
The UNDELETE.INI file has five sections: [sentry.drives], [sentry.files],
[mirror.drives], [configuration], and [defaults].
 
The [sentry.drives] section specifies the drives protected by the Delete
Sentry method, if used.
 
The [sentry.files] section specifies the files protected from deletion using
either Delete Tracker or Delete Sentry. A hypen (-) before a filename
indicates that the file is not saved. The default values defined in the
[sentry.files] section are as follows:
 
    [sentry.files]
    *.* -*.TMP -*.VM? -*.WOA -*.SWP -*.SPL  -*.RMG -*.IMG -*.THM -*.DOV
 
The [mirror.drives] section specifies the drives protected by the Delete
Tracker method, if used.
 
The [configuration] section defines the following values:
 
  Whether files with the archive bit set are protected. If files with the
   archive bit set are not protected (the default value), the entry is as
   follows:
 
       archive=FALSE
 
   A TRUE value saves files with the archive bit set.
 
  The number of days files are saved. The following entry defines the
   default value:
 
       days=7
 
  The amount of total disk space reserved for deleted files. The following
   entry defines the default value:
 
       percentage=20
 
The [defaults] section specifies the method of file tracking. The following
defines the default Delete Sentry method:
 
    [defaults]
    d.sentry=TRUE
    d.tracker=FALSE
 
Changing the method of file protection
 
You can use only one method of file protection at a time. If you want to
change the method, carry out the following procedure:
 
1  Unload the memory-resident portion of the Undelete program by typing the
   following at the command prompt:
 
       undelete /u
 
2  Enable the new level of protection and reload the memory-resident portion
   of the Undelete program. For example, to enable the Delete Sentry level
   of protection on your current drive, type the following at the command
   prompt:
 
       undelete /s
 
Drives protected
 
The Undelete program protects all drives specified in the UNDELETE.INI file,
regardless of the drives you specify when you start the program. For
example, suppose your UNDELETE.INI file contains the following entry:
 
    [sentry.drives]
    C=
    D=
 
The following command enables the Delete Sentry level of protection on both
drives C and D:
 
    undelete /sc
 
To enable protection only on drive C, you would do the following:
 
1  Using any text editor, open your UNDELETE.INI file.
 
2  Delete the following line from the [sentry.drives] section of the file:
 
       D=
 
3  Save changes you made to the file.
 
4  Exit your text editor.
 
5  Enable Delete Sentry protection by typing the following at the command
   line:
 
       undelete /sc
 
Network drives and delete protection
 
To protect files on a network drive from accidental deletion, you must
enable the Delete Sentry level of protection and have read, write, create,
and delete file access in the drive's root directory.
 

 
                             UNDELETEExamples
 
The following command specifies that UNDELETE is to recover all deleted
files in the current directory one at a time, to prompt for confirmation on
each file, and to use the highest available level of delete tracking:
 
    undelete
 
The following command specifies that UNDELETE is to recover all deleted
files with the .BAT extension in the root directory of drive C, without
prompting for confirmation on each file:
 
    undelete c:\*.bat /all
 
The following command loads the memory-resident portion of the UNDELETE
program into memory, creates a hidden directory named SENTRY, and specifies
that UNDELETE move files you delete on drive C to that directory:
 
    undelete /sc
 
The following command loads the memory-resident portion of the UNDELETE
program into memory and creates a PCTRACKER.DEL file to track up to 400
deleted files on drive C:
 
    undelete /tc-400
 

 
                                  UNFORMAT
 
Restores a disk that was erased by using the FORMAT command.
 
UNFORMAT restores only local hard disk drives and floppy disk drives; it
cannot be used on network drives. The UNFORMAT command can also rebuild a
corrupted disk partition table on a hard disk drive.
 
Syntax
 
    UNFORMAT drive: [/L] [/TEST] [/P]
 
Parameter
 
drive:
    Specifies the drive that contains the disk on which you want to recover
    files.
 
Switches
 
/L
    Lists every file and subdirectory found by UNFORMAT. If you do not
    specify this switch, UNFORMAT lists only subdirectories and files that
    are fragmented. To suspend scrolling of the displayed list, press
    CTRL+S; to resume scrolling, press any key.
 
/TEST
    Shows how UNFORMAT would recreate the information on the disk, but does
    not actually unformat the disk.
 
/P
    Sends output messages to the printer connected to LPT1.
 
Related Command
 
For information about formatting a disk, see the <FORMAT> command.
 

 
                              UNFORMATNotes
 
Limitation on the UNFORMAT command
 
If the FORMAT command was used with the /U switch, UNFORMAT cannot restore
the disk to its previous condition.
 
Unformatting a disk
 
The UNFORMAT command can restore your disk by using information in the root
directory and file allocation table on the disk.
 
As UNFORMAT rebuilds the disk, it displays how many subdirectories it has
found; if you specified the /L switch, it also shows you all files in each
subdirectory.
 
If UNFORMAT finds a file that appears to be fragmented (that is, stored in
separate places on the disk), it cannot recover the file because it cannot
locate the remaining portions of the file. In this case, the UNFORMAT
command prompts you to confirm whether you want UNFORMAT to truncate the
file (that is, recover only the first part of the file that it can locate)
or delete the file altogether.
 
If UNFORMAT does not prompt you for a specific file, that file is most
likely intact. In certain circumstances, however, UNFORMAT may not recognize
that a file is fragmented, even though it has located only a portion of the
file. If this happens to a program file, the program does not run properly.
If this happens to a data file, information is lost and the program that
created the data file may not be able to read it. In these cases, your only
recourse is to restore the files from your original floppy disks or backup
files.
 
Sector size of the hard disk
 
The sectors on your hard disk must be 512, 1024, or 2048 bytes.
 

 
                             UNFORMATExamples
 
To determine whether UNFORMAT can restore a formatted disk in drive A, type
the following command:
 
    unformat a: /test
 
To restore a formatted disk in drive A, listing all files and
subdirectories, type the following command:
 
    unformat a: /l
 

 
                                    VER
 
Displays the MS-DOS version number.
 
Syntax
 
    VER
 

 
                                VERExample
 
When you enter the VER command, MS-DOS displays the following message:
 
    MS-DOS Version 6.0
 

 
                                   VERIFY
 
Directs MS-DOS to verify that your files are written correctly to a disk and
displays the status of verification. For example, you can use this command
to make sure data is not written to a bad sector. You can use this command
either at the command prompt or in your AUTOEXEC.BAT file.
 
Syntax
 
    VERIFY [ON|OFF]
 
Switch
 
ON|OFF
    Specifies whether MS-DOS should verify (ON) or not verify (OFF) that
    write operations are done correctly.
 
Related Commands
 
For information about checking a disk for bad sectors, see the <CHKDSK>
command.
 
For information about verifying files as you copy them, see the /V switch in
the <COPY> or <XCOPY> command.
 

 
                               VERIFYNotes
 
Displaying the current status of the ON|OFF switch
 
Use the VERIFY command without a switch to find out whether verification is
turned on.
 
How VERIFY affects performance
 
Turning VERIFY on slows down all disk write operations.
 

 
                                    VOL
 
Displays the disk volume label and serial number, if the disk has them.
 
Syntax
 
    VOL [drive:]
 
Parameters
 
drive:
    Specifies the drive that contains the disk for which you want to display
    the volume label and serial number.
 
Related Commands
 
For information about assigning a volume label, see the <FORMAT> and
<LABEL> commands.
 

 
                                 VOLNote
 
To cause MS-DOS to display the volume label of the disk in the current
drive, you can use the VOL command with no parameter.
 

 
                                   VSAFE
 
Continuously monitors your computer for viruses and displays a warning when
it finds one. VSAFE is a memory-resident program that uses 22K of memory.
 
Do not use the VSAFE command when Windows is running.
 
Syntax
    VSAFE [/option[+ | -] ...] [/NE] [/NX] [/Ax | /Cx] [/N] [/D] [/U]
 
Switches
 
option
    Specifies how VSAFE monitors for viruses. Use a plus or minus sign (+ or
    -) after the number to turn an option on or off. The following list
    describes the options you can choose.
 
    1
        Warns of formatting that could completely erase the hard disk. The
        default setting is "on."
 
    2
        Warns of an attempt by a program to stay in memory. The default
        setting is "off."
 
    3
        Prevents programs from writing to disk. The default setting is
        "off."
 
    4
        Checks executable files that MS-DOS opens. The default setting is
        "on."
 
    5
        Checks all disks for boot sector viruses. The default setting is
        "on."
 
    6
        Warns of attempts to write to the boot sector or partition table of
        the hard disk. The default setting is "on."
 
    7
        Warns of attempts to write to the boot sector of a floppy disk. The
        default setting is "off."
    8
        Warns of attempts to modify executable files. The default setting is
        "off."
/NE
    Prevents VSafe from loading into expanded memory.
 
/NX
    Prevents VSafe from loading into extended memory.
 
/Ax
    Sets the hot key as ALT plus the key specified by x.
 
/Cx
    Sets the hot key as CTRL plus the key specified by x.
 
/N
    Allows VSAFE to monitor for possible viruses on network drives.
 
/D
    Turns off checksumming.
 
/U
    Removes VSAFE from memory.
 

 
                                VSAFENote
 
Using VSAFE with Microsoft Windows
 
Before installing Windows, turn off VSAFE. If VSAFE is running, you may not
be able complete the Windows installation. If you use VSAFE with Windows,
run the MWAVTSR.EXE memory-resident program by adding the following command
to your WIN.INI file:
 
    load=mwavtsr.exe
 
MWAVTSR.EXE enables VSAFE messages to be displayed in Windows.
 

 
                               VSAFEExample
 
To specify that VSAFE not check for formatting that could erase all data on
the hard disk, that VSAFE warn of attempts to write to the boot sector of a
floppy disk, and that ALT+T be assigned as the hot key to display the VSAFE
screen, type the following command:
 
    vsafe /1- /7+ /At
 

 
                                   XCOPY
 
Copies directories, their subdirectories, and files (except hidden and
system files).
 
With this command, you can copy all the files in a directory, including the
files in the subdirectories of that directory.
 
Syntax
 
    XCOPY source [destination] [/Y|/-Y] [/A|/M] [/D:date] [/P] [/S] [/E]
    [/V] [/W]
 
Parameters
 
source
    Specifies the location and names of the files you want to copy. Source
    must include either a drive or a path.
 
destination
    Specifies the destination of the files you want to copy. Destination can
    include a drive letter and colon, a directory name, a filename, or a
    combination.
 
Switches
 
/Y
    Indicates that you want XCOPY to replace existing file(s) without
    prompting you for confirmation. By default, if you specify an existing
    file as the destination file, XCOPY will ask you if you want to
    overwrite the existing file. (Previous versions of MS-DOS would simply
    replace the existing file.) If the XCOPY command is part of a batch
    file, XCOPY will behave as in previous versions. Specifying this switch
    overrides all defaults and the current setting of the COPYCMD
    environment variable.
 
/-Y
    Indicates that you want XCOPY to prompt you for confirmation when
    replacing an existing file. Specifying this switch overrides all
    defaults and the current setting of the COPYCMD environment variable.
 
/A
    Copies only source files that have their archive file attributes set.
    This switch does not modify the archive file attribute of the source
    file. For information about how to set the archive file attribute, see
    the ATTRIB command.
 
/M
    Copies source files that have their archive file attributes set. Unlike
    the /A switch, the /M switch turns off archive file attributes in the
    files specified in source. For information about how to set the archive
    file attribute, see the <ATTRIB> command.
 
/D:date
    Copies only source files modified on or after the specified date. Note
    that the format of date depends on the COUNTRY setting you are using.
 
/P
    Prompts you to confirm whether you want to create each destination
    file.
 
/S
    Copies directories and subdirectories, unless they are empty. If you
    omit this switch, XCOPY works within a single directory.
 
/E
    Copies any subdirectories, even if they are empty.
 
/V
    Verifies each file as it is written to the destination file to make sure
    that the destination files are identical to the source files.
 
/W
    Displays the following message and waits for your response before
    starting to copy files:
 
    Press any key to begin copying file(s)
 
Related Command
 
For information about copying individual files, see the <COPY> command. For
information about copying disks, see the <DISKCOPY> command.
 

 
                                XCOPYNotes
 
Default value for destination
 
If you omit destination, the XCOPY command copies the files to the current
directory.
 
Specifying whether destination is a file or directory
 
If destination does not contain an existing directory and does not end with
a backslash (\), XCOPY prompts you with a message in the following format:
 
    Does destination specify a file name
    or directory name on the target
    (F = file, D = directory)?
 
Press F if you want the file(s) to be copied to a file. Press D if you want
the file(s) to be copied to a directory.
 
Setting the COPYCMD environment variable
 
You can set the COPYCMD environment variable to specify whether you want the
COPY, MOVE, and XCOPY commands to prompt you for confirmation before
overwriting a file in all cases, whether issued from the command prompt or
from a batch file.
 
To force the COPY, MOVE, and XCOPY commands to prompt you before overwriting
in all cases, set the COPYCMD environment variable /-Y. To force these
commands to overwrite in all cases without prompting you, set the COPYCMD
environment variable to /Y.
 
Typing any of these commands with the /Y or /-Y switch overrides all
defaults and the current setting of the COPYCMD environment variable.
 
XCOPY does not copy hidden and system files
 
In older versions of MS-DOS, XCOPY copied hidden and system files. This is
not the case in MS-DOS 6.2. To remove the hidden or system attribute from a
file, use the <ATTRIB> command.
 
:m589
XCOPY sets archive attribute for destination files
 
XCOPY creates files with the archive attribute set, whether or not this
attribute was set in the source file. For more information about file
attributes, see the ATTRIB command.
 
:m589a
XCOPY vs. DISKCOPY
 
If you have a disk that contains files in subdirectories and you want to
copy it to a disk that has a different format, you should use the XCOPY
command instead of DISKCOPY. Since the DISKCOPY command copies disks track
by track, it requires that your source and destination disks have the same
format. XCOPY has no such requirement. In general, use XCOPY unless you need
a complete disk image copy. However, XCOPY will not copy hidden or system
files such as IO.SYS and MSDOS.SYS. Therefore, use DISKCOPY to make copies
of system disks.
 
XCOPY exit codes
 
The following list shows each exit code and a brief description of its
meaning:
 
0
    Files were copied without error.
 
1
    No files were found to copy.
 
2
    The user pressed CTRL+C to terminate XCOPY.
 
4
    Initialization error occurred. There is not enough memory or disk space,
    or you entered an invalid drive name or invalid syntax on the command
    line.
 
5
    Disk write error occurred.
 
You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by XCOPY. For more information, see
the topic <XCOPYExamples>.
 

 
                              XCOPYExamples
 
The following example copies all the files and subdirectories (including any
empty subdirectories) from the disk in drive A to the disk in drive B:
 
    xcopy a: b: /s /e
 
The following example uses the /D: and /V switches:
 
    xcopy a: b: /d:01/18/93 /s /v
 
In this example, only files on the disk in drive A that were written on or
after 01/18/93 are copied to the disk in drive B. Once the files are written
to the disk in drive B, the XCOPY command compares the files on the two
disks to make sure they are the same.
 
You can create a batch program to perform XCOPY operations and use the batch
IF command to process the exit code in case an error occurs. For example,
the following batch program uses replaceable parameters for the XCOPY source
and destination parameters:
 
    @echo off
    rem COPYIT.BAT transfers all source
    rem files in all directories on the source
    rem drive (%1) to the destination drive (%2)
 
    xcopy %1 %2 /s /e
 
    if errorlevel 4 goto lowmemory
    if errorlevel 2 goto abort
    if errorlevel 0 goto exit
 
    :lowmemory
    echo Insufficient memory to copy files or
    echo invalid drive or command-line syntax.
    goto exit
 
    :abort
    echo You pressed CTRL+C to end the copy operation.
    goto exit
 
    :exit
 
To use this batch program to copy all files in the C:\PRGMCODE directory and
its subdirectories to drive B, type the following command:
 
    copyit c:\prgmcode b:
 
The command interpreter substitutes C:\PRGMCODE for %1 and B: for %2, then
uses XCOPY with the /E and /S switches. If XCOPY encounters an error, the
batch program reads the exit code and goes to the label indicated in the
appropriate IF ERRORLEVEL statement. MS-DOS displays the appropriate message
and exits from the batch program.
 



                   Ŀ Ŀ Ŀ Ŀ
                    ķ  ķ  ӷ   ӷ     ķ 
                                       Ŀ 
                                   Ľ      Ľ 
                                   ķ      ķ 
                                              Ŀ
                       ֽ       ֽ   ֽ     Ľ 
                              
 

                  Ŀ  Ŀ Ŀ Ŀ
                    ķ     ķ   ӷ   ӷ  ķ  
                     Ŀ                       
                    Ľ                           
                    ķ                           
                      Ŀ                      
                    Ľ  ֽ     Ľ    ֽ  Ľ  
                      


                           Ŀ Ŀ Ŀ
                                            
                       Ĵ           
                                             
                                   


            Ŀ                       
                                                 
      Ĵ                                      
                                                  
               


      Ŀ Ŀ         Ŀ           Ŀ
                                                    
                                 Ĵ            
                                                     
                      


                    Ŀ Ŀ Ŀ
                                                 
                       Ŀ                       
                                                
                      


                               Ŀ    
                                               
                                            Ŀ
                                                 
                            


