Appendix F. Command Reference

With every new release, Microsoft has added features to MS-DOS. MS-DOS 6.22 now contains more than 100 commands, providing configuration support and utilities for the large variety of computers that run MS-DOS. Many commands help you organize the files and subdirectories on your hard disk or enable you to configure your computer system to run more efficiently. Other commands enable you to automate routine tasks that you perform with your computer every day. DOS now includes commands that provide support for the various characters and conventions used in many countries other than the United States.

This command reference describes all the commands that Microsoft provides in the standard MS-DOS 6.22 package. Each command entry includes a description of the command's purpose, its syntax, notes and rules on how to use it, examples of its use, error messages and exit codes when applicable, and a “See Also” section that points you to additional information about using a particular command.

Note

This command reference also describes commands provided in other common DOS versions, including MS-DOS “7” (in Windows 95), MS-DOS “7.1” (in Windows 98), Caldera DR DOS, and IBM's PC-DOS.

DOS Commands by Function

So that you can easily find the command you're looking for, the following lists group the various DOS commands by their functions and contain short descriptions of each command. Many commands have more than one function, so they may appear in more than one group. When you locate the command you want in these function lists, turn to the reference section for much more detailed information about a particular command. The reference section lists the commands in alphabetical order.

In the following function lists, the commands are divided into these categories:

  • Batch File Commands

  • CONFIG.SYS Commands

  • CONFIG.SYS Device Drivers

  • Directory Commands

  • Disk Commands

  • File Commands

  • Full-Screen DOS Applications

  • Help Commands

  • International Commands and Device Drivers

  • Memory and System Performance Commands

  • Miscellaneous Commands

  • Windows Applications

Batch File Commands

CALLExecutes a batch file from within another batch file.
CHOICEAccepts a single keystroke from the keyboard.
COMMANDRuns a second copy of the MS-DOS command interpreter.
ECHOEchoes text to the screen from a batch file.
FORFOR-IN-DO loop for batch files.
GOTOJumps to a labeled line in a batch file.
IFIF-THEN decision structure for a batch file.
PAUSEWaits for a keystroke before continuing.
REMInserts a remark into a batch file.
SHIFTShifts batch file parameters down one place.

CONFIG.SYS Commands

BREAK=Turns on or off extended Ctrl+Break checking.
BUFFERS=Sets the number of disk buffers used by DOS.
COUNTRY=Sets country information.
DEVICE=Loads an installable device driver.
DEVICEHIGH=Loads an installable device driver into high (UMB) memory.
DOS=Sets whether DOS will use the high memory area (HMA) and upper memory blocks (UMB).
DRIVPARM=Redefines the physical characteristics of an existing disk drive.
FCBS=Sets the maximum number of open file control blocks (FCBs) that DOS will allow.
FILES=Sets the maximum number of open files that DOS will allow.
INCLUDE=Includes the commands from one CONFIG.SYS block within another.
INSTALL=Loads TSR programs into memory from CONFIG.SYS.
LASTDRIVE=Sets the maximum number of drive letters available to DOS.
MENUCOLOR=Sets the color of the screen for the CONFIG.SYS startup menu.
MENUDEFAULT=Sets the default menu choice in a CONFIG.SYS menu block.
MENUITEM=Sets the text and configuration block associated with menu items in CONFIG.SYS.
NUMLOCK=Sets the state of the NumLock key when the computer starts up.
REMInserts a remark into CONFIG.SYS.
SETSets environment variables.
SHELL=Sets the name of the program used as a command-line shell by MS-DOS.
STACKS=Sets the number of stacks set aside for hardware interrupts.
SUBMENU=Defines a submenu in CONFIG.SYS.
SWITCHES=Sets miscellaneous control options for MS-DOS.

CONFIG.SYS DEVICE= Drivers

ANSI.SYSAlternate console driver, which provides ANSI standard control of the display and keyboard.
DBLSPACE.SYSDummy drivers that can relocate DBLSPACE.BIN in memory.
DISPLAY.SYSDevice driver for the display with international code page support.
DRIVER.SYSDriver that sets the DOS drive letter for an existing disk drive or creates an additional drive letter for a disk drive.
EMM386.EXEExpanded (EMS) Memory Manager with upper memory block (UMB) support.
HIMEM.SYSExtended (XMS) Memory Manager.
INTERLNK.EXEClient device driver for an InterLnk network.
POWER.EXEAdvanced Power Management (APM) device driver for portable computers.
RAMDRIVE.SYSDriver that sets up a disk drive in RAM memory.
SETVER.EXEDOS version control program that can fool certain programs into running with the “incorrect” version of MS-DOS.
SMARTDRV.EXEDriver that installs double-buffering to make SMARTDrive compatible with certain hard disk drives.

Directory Commands

CD or CHDIRChanges the current directory of a disk drive.
DELTREEDeletes a directory, including all the files and subdirectories it may contain.
MD or MKDIRCreates a new subdirectory on a disk.
RD or RMDIRDeletes an empty subdirectory on a disk.
TREEDisplays the subdirectory structure present on a disk.

Disk Commands

CHKDSKChecks a disk for errors and provides information on the amount of space in use.
DEFRAGDefragments the files on a disk. Using this command can cut down on the time your computer takes to find files on your hard disk.
DISKCOMPCompares two floppy disks to see whether they are identical.
DISKCOPYMakes an exact copy of a floppy disk.
FDISKHard disk partitioning program. Prepares a new hard disk to accept DOS or partitions a single drive into two or more logical drives.
FORMATFormats a hard or floppy disk for MS-DOS.
LABELCreates, edits, or deletes the volume label on a disk.
Disk Commandsdisk commandscommandsdisk SCANDISKAnalyzes disks and repairs errors. The ScanDisk utility can repair DoubleSpace-compressed drives as well as normal disks.
SUBSTCreates a disk drive letter that refers to a subdirectory of another drive.
SYSInstalls the MS-DOS system files on another disk.
UNFORMATReturns a disk to the state it was in before FORMAT was run.
VERIFYControls whether DOS will read everything written to disk to ensure that no errors occurred.
VOLDisplays the volume label of a disk.

File Commands

ATTRIBViews or changes file attributes.
COPYCopies or concatenates a file or group of files.
DEL or ERASEDeletes a file or group of files.
DIRDisplays a listing of the files in a subdirectory.
EXPANDExpands (uncompresses) files on the MS-DOS 6 distribution disks.
FCCompares two files for differences.
FINDFinds matching text in a file.
MOVEMoves a file from one subdirectory to another or renames a subdirectory.
REN or RENAMERenames a file or group of files.
REPLACEReplaces or adds files to a subdirectory.
SHAREProvides file sharing and locking capabilities for DOS.
TYPEDisplays the contents of a file onscreen.
UNDELETEUndeletes a file or group of files.
XCOPYCopies files and subdirectories.

DOS Applications

DBLSPACEProgram that compresses information on a disk, providing up to twice the amount of space you previously had.
DEBUGProgrammer's debugger.
DEFRAGProgram that defragments the files on a disk. Running this program can cut down on the time your computer takes to find files on your hard disk.
DOSSHELLGraphical shell program for DOS.
EDITA full-screen ASCII text file editor.
FDISKHard disk partitioning program. Prepares a new hard disk to accept DOS or partitions a single drive into two or more logical drives.
HELPAn online help system that provides descriptions and examples for every DOS command.
MSAVThe Microsoft Anti-Virus program. Checks your computer for viruses.
MSBACKUPThe Microsoft Backup program. Backs up files on your hard disk to a series of floppy disks.
MSDThe Microsoft System Diagnostics program. Provides information about the configuration of your computer system.
QBASICProgram that provides access to the Microsoft QuickBASIC development environment, which enables you to write and run programs written in the QuickBASIC language.

Help Commands

FASTHELPDisplays a short description of what each DOS command is for and the correct syntax for its use.
HELPOpens a full-screen, online help system that provides descriptions and examples for every DOS command.
/?Not an actual command; if you include a /? on the command line with a DOS command, DOS displays a short description of what the command does and how you can use it.

International Commands and Device Drivers

CHCPChanges the active country code page.
COUNTRY=Sets country information.
DISPLAY.SYSRuns a device driver for the display with international code page support.
KEYBSets the active keyboard layout.
MODEConfigures standard DOS devices, including changing the active code page for the keyboard, display, and printer.
NLSFUNCContains code page switching support required by CHCP and MODE.

Memory and System Performance Commands

BUFFERS=Sets the number of disk buffers used by DOS.
DEFRAGDefragments the files on a disk. Using this command can cut down on the time your computer takes to find files on your hard disk.
DEVICEHIGH=Loads an installable device driver into high (UMB) memory.
DOS=Determines whether DOS loads itself into conventional memory or into the high memory area (HMA).
EMM386.EXEExpanded (EMS) Memory Manager with upper memory block (UMB) support.
HIMEM.SYSExtended (XMS) Memory Manager.
LH or LOADHIGHLoads a TSR program into high (UMB) memory.
MEMDisplays how memory in your computer system is being used.
MEMMAKERUtility to optimize memory usage on your computer.
SMARTDRVDisk cache program that can speed up disk access time.

Miscellaneous Commands

APPENDEstablishes a DOS search path for data files.
BREAKTurns on or off extended Ctrl+Break checking.
CLSClears the screen.
CTTYChanges the device used for standard input and output.
DATESets or views the system date.
DOSKEYProvides enhanced command-line editing and macros capability.
EXITExits (terminates) a temporary copy of COMMAND.COM.
GRAPHICSProvides support for a graphics mode Print Screen function.
INTERLNKControls the client device driver in an InterLnk network.
INTERSVRControls the server program for an Interlnk network.
LOADFIXForces a program to load into the second 64KB of memory.
MODEConfigures standard DOS devices such as serial ports, parallel ports, the display, and the keyboard.
MOREPauses display output when the screen is full.
PATHEstablishes a DOS search path for executable files.
PRINTControls the print spooler for ASCII text files.
PROMPTCustomizes the prompt used by DOS at the command line.
RESTORERestores files backed up with the DOS 5 version of BACKUP.
SETSets, clears, or displays environment variables.
SORTSorts ASCII text lines into alphabetical order.
TIMESets or views the system time.
VERDisplays the version of DOS running on the computer.
VSAFEWatches for viruses.

Windows Applications

MWAVThe Microsoft Anti-Virus for Windows program. Checks your computer for viruses.
MWAVTSRA Windows program that enables VSAFE to alert you to trouble when you are running Windows.
MWBACKUPThe Microsoft Backup for Windows program. Backs up files on your hard disk to a series of floppy disks.
MWUNDELThe Microsoft Undelete for Windows program. Undeletes a file or group of files.
SMARTMONThe SMARTDrive monitoring and configuration program for Windows.

Conventions Used in This Command Reference

The following conventions have been used throughout this reference to make the command descriptions clear and accurate:

BoldRequired literal. Indicates an argument that is required and must be typed as part of the command. For example, the command name always appears in bold because it must be included when you issue the command.
ItalicOptional placeholder. The placeholder holds the place for the actual name or value that you would type when you issue the command. In other words, you don't type the word filename, you replace filename with the actual name of a file.
Bold italicRequired placeholder. Indicates a placeholder argument that is required. When you issue the command, you must substitute an appropriate value for an argument that appears in bold italic.
Monospaced typeOptional literal. Indicates an optional argument that, if included, must be typed as shown. Switches often are optional literal arguments.

The COPY command, for example, uses all four types of arguments in its syntax:

COPY source destination /V
  • COPY is a required literal, so it appears in bold. The command name always has to be typed exactly as it is shown, although you can add a drive and subdirectory path before the command when necessary.

  • source is a required placeholder, so it appears in bold italic. In this case, you would enter the name of the file or files that you wanted to copy.

  • destination is an optional placeholder, so it appears in regular italic. If you choose to omit this argument, a default value is assumed. As with all placeholders, if you include this argument, you replace the word destination with the filename and path where you want to copy the files.

  • /V is an optional literal, so it appears in regular text. Most switches are optional. If you want to include one, you must type it exactly as it is shown.

DOS is not usually sensitive to the case of the characters you use. Normally, you can type command lines in any mixture of upper- or lowercase characters. Some third-party utilities and a few DOS commands, however, do use case-sensitive parameters. When upper- or lowercase is significant in a command's syntax, it is noted in the text.

Pay particular attention to the punctuation used in syntax lines. DOS is often very picky about punctuation; if a semicolon is shown, a comma rarely will do the trick. Spaces are an exception: Where one space is shown, more than one space or tab usually is acceptable. The order of command arguments is usually somewhat flexible, with switches allowed either before or after filename arguments. Exceptions are noted in the text.

Every command line begins the same way—with the name of the command you want to run. Internal commands are located inside COMMAND.COM and are always available at the DOS prompt. External commands are files with .COM or .EXE extensions that are located on your disk. To run an external command, COMMAND.COM must be able to find the corresponding file on disk. The Setup program for DOS 6 places all the external commands in the C:DOS subdirectory by default. To help COMMAND.COM find external commands, Setup also adds or edits the PATH statement in your AUTOEXEC.BAT file to include the C:DOS subdirectory. As long as the subdirectory in which the command is located is included in your DOS PATH, you can simply type the name of the command at the command line and COMMAND.COM finds the executable file. If you move any of the files or if you remove the C:DOS subdirectory from your DOS PATH, you have to specify the location of external commands by including the subdirectory in which they are located as part of the name of the command.

Icons Used in This Command Reference

To help you quickly identify the function of a particular command, this command reference uses the following icons:

Icons Used in This Command ReferenceYou should avoid using this command unless absolutely necessary.
Icons Used in This Command ReferenceThis command frequently is used in batch files.
Icons Used in This Command ReferenceYou can issue this command from the DOS prompt.
Icons Used in This Command ReferenceYou can choose to include this command in your CONFIG.SYS file.
Icons Used in This Command ReferenceThis command is dangerous; use it with extreme caution.
Icons Used in This Command ReferenceThis command is used as a device driver and normally is loaded through your CONFIG.SYS file.
Icons Used in This Command ReferenceYou use this command to access a full-blown DOS utility.
Icons Used in This Command ReferenceThis command enables you to configure your system for use outside the U.S.
Icons Used in This Command ReferenceThis command is new in MS-DOS 6.2.
Icons Used in This Command ReferenceThis command is included on the MS-DOS 6.0 or 6.2 Supplemental Disk.
Icons Used in This Command ReferenceYou can choose to include this command in your SYSTEM.INI file.
Icons Used in This Command ReferenceThis terminate-and-stay-resident command loads into memory and may be accessed anytime thereafter.
Icons Used in This Command ReferenceYou can use this command with Microsoft Windows.
Icons Used in This Command ReferenceThis command is specific to the versions of DOS with Windows 95 and Windows 98.
Icons Used in This Command ReferenceThis command is specific to IBM's PC-DOS.
Icons Used in This Command ReferenceThis command is specific to Caldera's DR DOS.

Filenames and Pathnames

Filenames and pathnames for MS-DOS consist of a series of standard parts, and DOS makes certain assumptions when these parts are omitted. A fully qualified pathname consists of the following parts:

drive:path1path2... filename.ext
drive:Represents the disk drive letter.
path1, path2Represent the subdirectories.
filenameRepresents the one- to eight-character name of the file.
.extRepresents the optional extension to the filename. When included, the extension can be up to three characters in length.
...An ellipsis in a syntax line indicates that the preceding argument can be repeated one or more times. The spaces around the ellipsis are added here only for clarity. An actual pathname can never include any spaces.

Note that a disk drive letter, when present, is always followed by a colon. The drive (with colon), all pathnames, and the filename are separated from each other by backslash characters (). The filename extension, when present, is always separated from the filename by a period.

If no drive is specified, the current disk drive is assumed. If no path is specified, the current subdirectory of that disk drive is used. Typically, commands that accept wildcard characters in their filename arguments default to “all files” if no filename is specified. Otherwise, no defaults are assumed for the filename portion.

In this command reference, the term filename refers to the one- to eight-character name of a file, either with or without a one- to three-character extension. The term pathname refers to the complete path to a file (the drive, subdirectory path, and filename).

Legal Filename Characters

DOS allows only certain characters to be included in the name of a file or subdirectory. All the letters A to Z, either upper- or lowercase, and the numbers 0 to 9 are allowed. In addition, the following punctuation characters are acceptable:

&  '  @  ^  _  {   }   $  !  -  #  (  )  %  '  ~

No other punctuation or special characters are permissible in a filename. (If you are using a non-USA code page, you may have additional legal filename characters, such as accented characters.)

Most of the illegal filename characters have a special meaning on the command line. Spaces, tabs, commas, and semicolons typically are used to separate arguments. The colon (:) indicates a disk drive letter, and the backslash () separates subdirectories or indicates the root directory. The greater-than (>), less-than (<), and pipe (|) characters are used for redirection and piping. Although percent signs (%) are legal, you should avoid using them in your filenames because this character indicates replaceable parameters and can lead to some confusing errors in batch files.

Tip

Consider using an underscore (_) or a hyphen (-) in file or subdirectory names in which you normally would use a space. This naming convention can help make your filenames more readable, as in MY_FILE.TXT.

DOS converts all pathname characters to uppercase before searching for the file, so you can enter pathnames in any combination of upper- and lowercase letters that suits you. MYFILE.TXT, myfile.txt, and MyFiLe.TxT all refer to the same file as far as DOS is concerned.

DOS Reserved Names

Although you are free to name your files anything you would like, a few filenames have special meaning to MS-DOS. They refer to specific devices attached to your computer system; when you use them on the command line in place of a filename, they always refer to that device, not a file on the disk.

NameDevice That Name Refers To
NULThe null device. This is your computer's equivalent of the Black Hole, which accepts (and ignores) anything written to it.
CONThe standard device for input and output. CON normally refers to the keyboard for input and the video display for output.
LPTxThe printer (parallel) ports. The x represents the port number, as in LPT1.
PRNThe primary printer port, normally the same as LPT1.
COMxThe serial ports. The x represents the port number, as in COM1.
AUXThe primary serial port, normally the same as COM1.

In some cases, you are required to enter these names followed by a colon (:), as if you were referring to a disk drive. Normally, however, you just use them as though they refer to a file in the current directory. No matter what drive, path, or extension you include with these reserved names, they always refer to that device and never to a file on your disk. (In other words, you cannot have a file named PRN.TXT on your disk because this name always refers to the printer and not to a disk file.) If, however, you specify a drive or path that doesn't exist, you do receive an error message.

?, * 1.0 and later—Internal

?, * 1.0 and later—Internal
?, * 1.0 and later—Internal

With certain commands, you can use wildcard characters in the filename portion of a pathname argument to specify more than one file at a time. You can use the question mark (?) to match any single character and the asterisk (*) to match multiple characters. Wildcards are never allowed in the drive or subdirectory portions of a pathname.

Using the ? Wildcard Character in a Filename or Extension

A question mark (?) can be used to match any single character in a filename or extension. For example, typing MYFILE.T?T matches files named MYFILE.TXT and MYFILE.TOT but not MYFILE.TT or MYFILE.TXB. To match the latter, you have to specify MYFILE.T??. Notice that a question mark placed in the middle of the filename or extension matches any single character in that position, whereas a question mark placed at the end also matches zero characters.

Using the * Wildcard Character in a Filename or Extension

An asterisk (*) matches zero or more characters from the position in which it is placed to the end of the filename or extension. For example, MY*.TXT matches MYFILE.TXT and MYHOUSE.TXT but not MYFILE.DOC or YOURFILE.TXT. Any characters following an asterisk in the filename, or following an asterisk in the extension, are ignored. In other words, typing MY*.TXT or MY*FILE.TXT gives you exactly the same result.

For most commands that accept wildcards, if you enter a filename with no extension, all extensions are matched. For example, MYFILE matches MYFILE, MYFILE.TXT, and MYFILE.DOC, whereas MY* matches MYHOUSE.TXT as well. If you type a period after the filename (for example, MYFILE. or MY*.), only files with no extension are matched.

Examples

*.*Match any filename.
*Same as *.* in most cases.
????????.???Same as *.*
*.Match any filename that has no extension.
*.??Match any file that has a zero- to two-letter extension.
?.*Match any file that has a one-letter filename.
*.BAKMatch all files with a .BAK extension.
MYFILEMatch all files with the filename MYFILE with any (or no) extension.
MY*.*Match all files that begin with MY.
M?F*.?XTMatch any file that begins with the letter M, has an F as the third character in the filename, and has a three-letter extension that ends in XT.

> and >> 2.0 and later—Internal

> and >> 2.0 and later—Internal
> and >> 2.0 and later—Internal

You can use the greater-than redirection symbols (> and >>) on the command line to instruct DOS to take any output that normally would be written to the screen and send it somewhere else. These symbols are handy for sending the output of a command, such as DIR, to the printer (DIR > PRN) or to a file on disk (DIR > MYFILE.TXT). Using two greater-than signs (>>) tells DOS to append the output to the file specified (if it already exists) instead of overwriting the file as it normally would. For example,

DIR  C:DOS  > DIR_LIST.TXT

creates (or overwrites if it already exists) the file DIR_LIST.TXT in the current directory and fills it with a list of all the files in the C:DOS subdirectory. However, the command

DIR  C:WIN  >> DIR_LIST.TXT

appends (adds) a list of all the files in the C:WIN subdirectory to the end of the DIR_LIST.TXT file.

Notice that only the program output normally written to the screen is redirected. For example, the command

COPY  MYFILE.TXT  YOURFILE.TXT  >  COPYMSG.TXT

still copies MYFILE.TXT to YOURFILE.TXT, but the message 1 file(s) copied is written to the file COPYMSG.TXT.

In batch files, it is fairly common to redirect messages from commands such as COPY to the NUL device, as in the following:

COPY  MYFILE.TXT  YOURFILE.TXT  >  NUL

This technique can keep the onscreen clutter generated by a batch file to a minimum because anything written to the NUL device is essentially thrown away.

See Also

<, |, FIND, MORE, and SORT

Using Redirection Commands” in Chapter 13

< 2.0 and later—Internal

< 2.0 and later—Internal
< 2.0 and later—Internal

Programs normally expect input from the user to come from the keyboard. If you want to provide this input from a file instead of the keyboard, you can use the less-than redirection symbol (<) to redirect that program's input. DOS includes three commands specifically designed to use with input redirection: MORE, SORT, and FIND.

One common use for input redirection is with the MORE filter program. To display the contents of the file README.TXT one screen at a time, you type the following command:

MORE  <  README.TXT

To sort all the lines in a text file, you might use the SORT command like this:

SORT  <  UNSORTED.TXT  >  SORTED.TXT

This command sorts all the lines in UNSORTED.TXT into alphabetical order and writes the sorted output to SORTED.TXT. If you did not include the > SORTED.TXT argument, SORT would write the sorted lines to the display (standard output). If you forgot to redirect the input to the SORT command (that is, if you did not include the < UNSORTED.TXT argument), DOS would wait for you to type the input at the keyboard.

Occasionally, you find a use for input redirection when you are automating the input to a program. Many software patches distributed as batch files use this technique to redirect DEBUG's input to a text file to make changes to a program file. (Indeed, this is just what the SPATCH.BAT file on the DOS 6 distribution disk does.) Just remember that after the input to a program is redirected, control does not return to the keyboard until the program terminates. If you forget to put the keystrokes that exit the program at the end of your input file, you have to reboot your computer to regain control.

See Also

> and >>, |, FIND, MORE, and SORT

Using Redirection Commands” in Chapter 13

| 2.0 and later—Internal

| 2.0 and later—Internal
| 2.0 and later—Internal

You can use the pipe character (|) on the command line to tell DOS to use the screen output from one program as the keyboard input to another. (The term pipe comes from the Unix operating system, which often uses this method to string together several programs to perform a particular job.) For the pipe character to work, the first program must write output to the screen that the second program expects to get from the keyboard.

In DOS, pipe characters are most often used with the TYPE and MORE commands to display a text file one screen at a time, as in the following:

TYPE  README.TXT  |  MORE

You also can combine MORE with FIND to look at the results of a text search one screen at a time, as in this example:

FIND  "Mr. Merryweather"  BIGTEXT.TXT  |  MORE

DOS actually accomplishes piping by writing the output from the first program to a temporary file and then redirecting the input for the second program from that file. When the second program terminates, DOS deletes the temporary file. So, the preceding command accomplishes the same thing as the following three commands:

FIND "Mr. Merryweather" BIGTEXT.TXT > TEMP.TXT
MORE < TEMP.TXT
DEL TEMP.TXT

Using the pipe character saves you from having to type all three of these commands.

See Also

> and >>, <, FIND, MORE, and SORT

Using Redirection Commands” in Chapter 13

:label 1.0 and later—Internal

:label 1.0 and later—Internal

In a batch file, you can type a colon (:) in the first column of any line to indicate that the next eight characters on that line should be interpreted as a label. Any additional characters on the line after the label are ignored. Labels are used as the destination for GOTO statements in batch files.

Syntax

:label

Notes

  1. To define a label, you must use a colon as the first character on the line. Not even a space or tab character can precede it.

  2. Only the first eight characters of a label are significant, although the label can be as long as you like. Everything on the line after the eighth character of the label is ignored.

  3. Although you can define the same label in more than one place in a batch file, the GOTO command always jumps to the first occurrence.

  4. Labels and filenames share the same legal characters with the exception that labels cannot include percent signs (%) or hyphens (-). Batch file labels can be typed in any mixture of upper- and lowercase characters.

Examples

GOTO SKIP_DEL
DEL *.BAK
:SKIP_DEL   This text will be ignored

In this example, when DOS executes the line containing the GOTO SKIP_DEL command, DOS searches for the :SKIP_DEL label and continues execution with the line that follows it. The DEL *.BAK command is never executed.

Messages

Label not found

Error: The label specified in a GOTO statement was not found. After displaying this message, the batch file terminates.

See Also

GOTO

Branching with GOTO” in Chapter 16

%n 1.0 and later—Internal

%n 1.0 and later—Internal

You can use replaceable parameters to represent command-line arguments from within a batch file. DOS replaces these markers with their corresponding command-line arguments when the batch file is executed.

Syntax

%n

Notes

  1. Ten replaceable parameters are available, %0 through %9.

  2. %0 returns the name of the batch file as it was entered on the command line, %1 returns the first argument on the command line, %2 returns the second, and so on. Spaces, tabs, commas, and semicolons all are considered valid argument delimiters. To include a delimiter in a command-line argument, enclose the argument in double quotation marks.

  3. DOS can find replaceable parameters almost anywhere in a batch file, including within double quotation marks and embedded in words. For example, the filename MY%1FILE.TXT is a perfectly legal filename for DOS; in a batch file, however, the %1 embedded in the name is replaced with the first argument to the batch file. This can lead to some strange errors.

  4. If you want to include a percent sign in a batch file, write it twice. When DOS is parsing the file, it sees the two percent signs (%%) and replaces them with a single percent sign (%). For example, %1 is replaced with the first argument to the batch file, whereas %%1 simply becomes %1.

    This rule explains why the variable markers in a FOR loop must be written as %%a in a batch file, but as %a from the command line. In a batch file, DOS removes the doubled %% signs and replaces them with a single % before the FOR command gets to see it. If you forget and use a single percent sign, DOS removes it and leaves only the a, which results in a syntax error.

  5. If you require more than nine arguments in your batch file, you can use the SHIFT command to gain access to them.

  6. An empty parameter is replaced with nothing at all. In other words, if you enter MY%2.TXT in your batch file and then forget to enter a second parameter when you run the batch file, DOS looks for the file MY.TXT.

Examples

The following batch file displays a series of files one screen at a time:

:START
IF "%1"=="" GOTO END
IF NOT EXIST %1 GOTO END
TYPE %1 | MORE
SHIFT
GOTO START
:END

In the first IF statement, the %1 is replaced with the first argument to the batch file. As long as the argument exists, the statement is false and execution continues on the next line. The second IF statement checks to see whether this argument is a valid pathname. If the argument passes this check, execution finally passes to the TYPE command, which types the file to the screen through the MORE filter program. When TYPE finishes, SHIFT moves the arguments down one place, and the next line transfers execution back to the first line in the batch file. The loop continues until the batch file runs out of arguments or finds an invalid pathname.

Note

The preceding example isn't quite foolproof. If wildcards are included in the first argument to this batch file, it easily could pass both of the tests you perform with the IF commands. TYPE, however, cannot handle wildcards and would display the message Invalid filename or file not found rather than the files you specified.

See Also

%name%, IF, FOR, and SHIFT

Understanding Replaceable Parameters” in Chapter 16

%envir% 4.0 and later—Internal

%envir% 4.0 and later—Internal

With the addition of the %envir% syntax in MS-DOS 4.0, users finally had access to variables in batch files. Before executing a line in a batch file, DOS replaces every occurrence of %envir% with the contents of the corresponding environment variable. When combined with the capability of the SET command to create and destroy environment variables, this feature can be very powerful.

Syntax

%envir%

Notes

  1. The name of the environment variable can be entered in upper- or lowercase characters, but it must be surrounded by percent signs (%) to be recognized by DOS.

  2. DOS can find the variable placeholder almost anywhere in a batch file, including enclosed in double quotation marks or embedded within words. Any pair of percent signs enclosing characters is assumed to be an environment variable. (If the first character following the percent sign is a digit, DOS assumes you are referring to a replaceable parameter, not an environment variable.) The string with values between 7% and 15% annually would tell DOS to search for an environment variable named “and 15”. When DOS failed to find such a variable, it would change the string to read with values between 7 annually.

  3. If you want to include a percent sign in a batch file, write it twice. When DOS is parsing the file, it sees the two percent signs (%%) and replaces them with a single one (%). For example, %PATH% is replaced with the contents of the PATH environment variable, whereas %%PATH%% becomes %PATH%.

  4. If no environment variable with that name exists, the %envir% placeholder is replaced with an empty string.

Examples

To add a subdirectory to your PATH, execute a particular program, and then restore your original PATH, you might use a batch file like this:

SET OLDPATH=%PATH%
PATH C:CADD;%PATH%
C:CADDCADD.EXE %1
PATH %OLDPATH%
SET OLDPATH=

The first line saves the current PATH setting in an environment variable named OLDPATH. Next, the subdirectory C:CADD is added to the PATH. In the third line, the program is executed, and a single command-line argument is passed to it if one exists. Finally, when the program terminates, PATH is set equal to OLDPATH and the OLDPATH variable is deleted.

You can easily run out of space in the environment while manipulating variables in batch files, especially if you are running them from a Shell program such as DOSSHELL. When this happens, DOS displays the message Out of environment space and then continues executing the batch file. To make the preceding example abort if not enough environment space is available, add an IF statement, as follows, to check whether OLDPATH was successfully created:

SET OLDPATH=%PATH%
IF "%OLDPATH%"=="" GOTO ERROR
PATH C:CADD;%PATH%
C:CADDCADD.EXE %1
PATH %OLDPATH%
SET OLDPATH=
GOTO END
:ERROR
ECHO Can't start CADD - not enough environment space
:END

Now CADD doesn't execute if not enough environment space is available to save OLDPATH. To increase the size of the environment, increase the size of the /E:size parameter specified in the SHELL= command in your CONFIG.SYS file.

If you are running batch files from within a Shell program such as DOSSHELL, increasing the /E:size parameter may not help. When DOS runs a program, it gives the program access to a copy of the current environment. This copy is only big enough to hold the environment variables that are currently defined and has very little free space in it. When you run a batch file from within a Shell program, a temporary copy of COMMAND.COM is loaded into memory, and a copy of the shrunken environment the Shell program was using is passed to it. With so little available space in the current environment, batch files often run out of environment space.

One technique to avoid Out of environment space error messages when you run batch files from a Shell program is to define a dummy variable in your AUTOEXEC.BAT file that simply takes up space, as shown in this example:

SET DUMMY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

When you need space in the environment, simply delete the DUMMY variable, as follows, before you define any new variables that your batch file needs:

SET DUMMY=
SET OLDPATH=%PATH%

When your batch file terminates, you return to your Shell program, and the copy of the environment that the batch file was using is discarded. Because the DUMMY variable is being thrown away, there is no reason to restore it before the batch file exits.

If you might run this batch file from the DOS prompt when your Shell program isn't running, include a SET statement, such as the following, that restores your DUMMY variable after you delete OLDPATH:

SET OLDPATH=
SET DUMMY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOTO END

See Also

%n, IF, SET, and SHELL=

Chapter 16, “Understanding Batch Files”

@ 4.0 and later—Internal

@ 4.0 and later—Internal

Normally, DOS echoes to the screen every line in a batch file before executing it. Although this capability can be handy when you are testing a new batch file, you usually want to use ECHO OFF to turn off the echo feature in a batch file you use every day. With the “at” sign (@), you can turn echo off for each line individually if you want to.

Syntax

@command_line

Notes

  1. The @ symbol must be the first character on the line. Don't insert any spaces before or after it.

  2. The most common use of the @ symbol is with the ECHO OFF command that begins most batch files. Because the echo feature is on when this command is executed, the ECHO OFF command is echoed to the screen—unless you precede the ECHO OFF command with an @ symbol.

  3. Only the display of the command line that DOS executes is suppressed, not screen output generated by a command, which can be rather confusing to some users. To suppress the output generated by a command, you have to redirect the output of the command to the NUL device. For example,

    @COPY MYFILE.TXT YOURFILE.TXT
    

    does not echo the command line itself (COPY MYFILE.TXT, and so on) to the screen, but still displays the message 1 file(s) copied that is generated by COPY. If, in addition, you redirect the screen output of the COPY command to the NUL device @COPY MYFILE.TXT YOURFILE.TXT > NUL

    nothing is displayed on the screen at all.

See Also

> and >>, and ECHO

Using Batch File Commands” in Chapter 16

; 6.0 and later—Internal

; 6.0 and later—Internal

When DOS encounters a semicolon as the first character on a line in your CONFIG.SYS file, it ignores the contents of the rest of the line. Using a semicolon in this way is exactly the same as using the REM command. Inserting comments into your CONFIG.SYS file can help you remember what each line is for.

Syntax

;comment text

Notes

  1. To mark a line in CONFIG.SYS as a comment, you must add the semicolon (;) as the first character on the line. Do not precede it with any spaces.

    Tip

    The configuration lines necessary for many devices are quite complicated, so using a semicolon to “comment them out” can be a handy way to turn features on and off in your CONFIG.SYS file.

  2. Note that this technique for creating a comment line works only in CONFIG.SYS. To insert a comment in a batch file, you either have to use REM or define a dummy label line with a colon.

  3. If you find yourself continually commenting and uncommenting DEVICE= lines in your CONFIG.SYS file, consider using the question mark (?) instead so that you can enable or disable that driver interactively each time you boot up. If you insert a question mark (?) between the command name and equal sign, DOS asks you before it executes a command in your CONFIG.SYS file.

Examples

Comments can help you keep track of what each line in your CONFIG.SYS file is for, as shown in the following:

; The old SCSI drive requires double buffering.
; Remember to remove this line when the new drive gets installed!!!
DEVICE=C:DOSSMARTDRV.EXE /DOUBLE_BUFFER

DOS skips over all lines that start with a semicolon and executes only the DEVICE= line that loads SMARTDrive's double-buffering feature.

See Also

? and REM

Chapter 2, “Starting DOS”

? 6.0 and later—Internal

? 6.0 and later—Internal

In CONFIG.SYS, if you put a question mark (?) between a command and the equal sign (=), DOS prompts you for confirmation before executing that command. This technique works for all CONFIG.SYS commands that use the command= form, including the SET command.

Syntax

command?=settings

Parameters and Switches

commandThis parameter can be any CONFIG.SYS command that uses the command= format.
settingsThe settings used with the command specified (when you allow it to be run).

Notes

  1. Use the question mark (?) for individual features you want to control. If you find yourself using more than one or two question marks in your CONFIG.SYS file, however, you might want to consider setting up a menu instead. You can easily get confused and select the wrong combination of drivers when you're enabling each line individually.

  2. The question mark (?) must come between the command and the equal sign, with no spaces between it and the command name.

  3. Each line you have marked for confirmation is displayed followed by [Y,N]?. Enter Y to execute the line and N to skip it.

  4. Pressing the F8 key when DOS displays the Starting MS-DOS... message causes DOS to prompt you for confirmation of every line in your CONFIG.SYS file, whether or not the line includes a question mark.

  5. DOS doesn't necessarily process the lines in CONFIG.SYS in the order they appear in the file, which can be confusing when you receive a prompt for a line near the end of the file before being prompted for a line at the beginning. In general, DOS processes commands such as DOS=, FILES=, and BUFFERS= before it begins to load any of your device drivers. However, after DOS begins processing the DEVICE= (and DEVICEHIGH=) lines, it loads them in the order they appear in the file.

Examples

To instruct DOS to prompt you before setting up a 1.4MB RAM disk in extended memory, place a question mark in the line that loads the RAMDRIVE.SYS driver as follows:

DEVICEHIGH?=C:DOSRAMDRIVE.SYS  1450  512  224  /E

If MemMaker has optimized your CONFIG.SYS file, /L and /S switches may appear on the DEVICEHIGH line. Make sure you place the ? directly after the command name, as shown here, not before the equal sign:

DEVICEHIGH?  /L:1,1200  /S  =C:DOSRAMDRIVE.SYS  1450  512  224  /E

Messages

If you place the ? incorrectly in a CONFIG.SYS command, you will receive one of the following error messages when you reboot:

Bad command or parameter - ?=
Error in CONFIG.SYS line #

or

Bad or Missing ?
Error in CONFIG.SYS line #

Edit your CONFIG.SYS file and make sure that all your question marks (?) are placed directly after the name of the command, with no intervening spaces.

See Also

;, [blockname], and MENUITEM=

Chapter 2, “Starting DOS”

[blockname] 6.0 and later—Internal

[blockname] 6.0 and later—Internal

Defining blocks in CONFIG.SYS is part of the multiple configuration feature in DOS 6. By naming blocks of commands, you can choose which blocks to execute from a menu when you start your computer.

Syntax

[blockname]

Notes

  1. The name for a block can be up to 70 characters long and contain any legal filename characters. You cannot use spaces in block names, so you might want to consider using underscores (_) or hyphens (-) to separate words and make your block names more readable. Upper- and lowercase characters are considered the same. The name must be surrounded by square brackets ([ and ]) and appear on a line by itself. Any commands that follow the block name are considered to be part of that block until the next [blockname] is encountered in the file.

  2. Blocks cannot be embedded inside each other. When DOS encounters another block name in the CONFIG.SYS file, it considers the preceding block to be complete.

  3. Any block never referred to by a MENUITEM= line is never executed by DOS. Exceptions are the predefined block names [MENU] and [COMMON].

  4. The [MENU] block defines entries for the main startup menu and should contain the configuration menu that you want DOS to display when the computer starts up. DOS always executes this block.

  5. Commands in a [COMMON] block are always executed by DOS. [COMMON] also is the only block that you are allowed to define more than once in your CONFIG.SYS file. A [COMMON] block located before the [MENU] block is run before the startup menu is displayed. Similarly, a [COMMON] block located at the end of your CONFIG.SYS file is executed after all other blocks.

  6. Any commands that you include in CONFIG.SYS before the first block name are considered to be part of a [COMMON] block. As far as DOS is concerned, CONFIG.SYS files that don't use multiple configuration features are simply one big [COMMON] block.

  7. Microsoft recommends that you include a [COMMON] block command at the end of your CONFIG.SYS file, even if you don't need to place any commands in it. Many software installation programs modify your CONFIG.SYS file by adding to the end of the file the settings the software requires. With a [COMMON] block defined at the end, these added commands are run when you start your system; without [COMMONBLOCK], these added commands might never run at all.

Examples

Suppose that you want to set up a menu that enables you to choose among three basic configurations for your computer: Windows, DOS, and Maintenance. Begin by adding a menu block like this at the beginning of your CONFIG.SYS file with the predefined block name [MENU]:

[MENU]

MENUITEM=WIN, Configure for Windows (Default)
MENUITEM=DOS, Configure for MS-DOS
MENUITEM=MAINT, Configure for File & Disk Maintenance

When these lines are included in your CONFIG.SYS file, DOS searches for blocks named [WIN], [DOS], and [MAINT]. You also might want to include a [COMMON] block that contains any commands that you always want executed, as in this example:

[COMMON]
DEVICE=C:DOSSETVER.EXE
DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE RAM MIN=0
DOS=HIGH,UMB
BREAK=ON
FILES=50
DEVICE=C:DOSANSI.SYS
SHELL=C:DOSCOMMAND.COM C:DOS/P /E:512

[WIN]
BUFFERS=10

[DOS]
BUFFERS=10
DEVICE=C:DOSRAMDRIVE.SYS 1450 512 224 /E

[MAINT]
BUFFERS=30
DEVICE=C:DOSRAMDRIVE.SYS 1450 512 224 /E

[COMMON]

Include a [COMMON] block at the end of your CONFIG.SYS file. That way, any commands added to the file by software installation programs are executed, no matter what configuration you choose. Without the final [COMMON] block, any commands that are added to the end of the file are executed only when you choose the maintenance configuration because they are part of the [MAINT] block.

DOS displays a startup menu that looks something like this:

MS-DOS 6 Startup Menu
=====================

1. Configure for Windows (Default)
2. Configure for MS-DOS
3. Configure for File & Disk Maintenance

Enter a choice: 1

Entering 1, 2, or 3 at this menu tells DOS to select the [WIN], [DOS], and [MAINT] blocks, respectively. DOS sets the CONFIG environment variable equal to the name of the configuration block you selected from the startup menu.

In this example, you might be able to better understand the small differences between these three configurations if you look at a few lines from the AUTOEXEC.BAT file:

IF "%CONFIG%"=="MAINT" GOTO SET_TEMP
C:DOSSMARTDRV

:SET_TEMP
SET TEMP=C:TEMP
SET TMP=C:TEMP

IF NOT "%CONFIG%"=="WIN" GOTO THE_REST
MD D:TEMP
SET TEMP=D:TEMP
SET TMP=D:TEMP

:THE_REST

The SMARTDrive disk cache is loaded if you are using the DOS or Windows configurations, which is why so few DOS buffers are needed (BUFFERS=10). The Maintenance configuration does not have a disk cache, so the number of DOS buffers is set to 30.

Similarly, the Windows configuration doesn't use a RAM drive; therefore, the TEMP (and TMP) environment variables are set pointing to the C:TEMP subdirectory, instructing programs to create any temporary files they require in that subdirectory. When a RAM drive is present, temporary files are written to the RAM drive instead.

See Also

? and MENUITEM=

Creating Multiple Configurations” in Chapter 2

ANSI.SYS (device driver) 2.0 and later—External

ANSI.SYS (device driver) 2.0 and later—External
ANSI.SYS (device driver) 2.0 and later—External

ANSI.SYS is a device driver that provides a subset of the commands defined by the American National Standards Institute (ANSI) for controlling video displays and keyboards. ANSI.SYS enables you to control cursor positioning, display colors, video modes, and keyboard mapping. To use it, you must load ANSI.SYS with a DEVICE= command in your CONFIG.SYS file. ANSI.SYS replaces the default CON driver provided by the MS-DOS kernel.

Syntax

DEVICE=drive:pathANSI.SYS  /X  /K  /R

or

DEVICEHIGH=drive:pathANSI.SYS  /X  /K  /R

Parameters and Switches

drive:pathIndicates the full path to the ANSI.SYS file on your system. Setup places the ANSI.SYS file in the C:DOS subdirectory by default. If the full path to ANSI.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
/XEnables you to remap extended keys if you are using a 101-key keyboard.
/KForces ANSI.SYS to treat a 101-key keyboard as if it were an 84-key keyboard, which is a handy feature with older TSR programs that don't recognize the new keycodes properly. Using this switch is the same as specifying SWITCHES=/K. If you are using the SWITCHES=/K switch already, you also should include the /K option in the DEVICE= line that loads ANSI.SYS.
/RSlows down the line scrolling rate so that lines on the display are more readable. Chances are, you won't notice any difference when you use this switch because the scrolling rate doesn't change that much. Microsoft claims this switch can aid screen-reading programs that make computers more accessible to people with disabilities.

Notes

  1. You can load ANSI.SYS with either the /X or /R switch, but not both. These two functions are mutually exclusive.

  2. ANSI.SYS occupies about 4KB of memory in your computer and can be loaded into upper memory with the DEVICEHIGH command.

  3. Note that all ANSI commands begin with the Escape character and are case sensitive. After it is loaded, ANSI.SYS scans all text that is written to the screen, looking for commands.

  4. The MODE command requires ANSI.SYS to be loaded in order to change the number of text lines displayed on your screen. MODE can switch between color and monochrome adapters, however, without ANSI.SYS.

  5. When it's loaded, ANSI.SYS resets your screen colors to the default (white on black). If you've set screen colors with the MENUCOLOR= command, they are reset when ANSI.SYS loads into memory. If this is a problem, either insert an ANSI command into your AUTOEXEC.BAT file to reset your screen colors or load ANSI.SYS from a [COMMON] block located before your [MENU] block in CONFIG.SYS.

  6. All ANSI commands begin with an Escape character (ASCII 27). When you press the Esc key at the DOS prompt, DOS interprets that as a request to cancel the current command line, so you cannot simply send ANSI commands from the command line by typing them. To get around this problem, people often use PROMPT to send ANSI commands. Another alternative is to place the ANSI commands in a file and then copy the file to the console like this:

    COPY  ANSI_CMD.TXT  CON
    
  7. Chapter 17, “Understanding ANSI.SYS,” provides a list of all the ANSI commands supported by ANSI.SYS.

Examples

To use the PROMPT command to set your screen colors to blue on white, you would enter the following command:

PROMPT  $e[34;47m$p$g

Some people like to create very elaborate DOS prompts with ANSI.SYS. For example, entering the command

PROMPT  $e[s$e[H$d$e[0;68H$t$e[u"Good morning Mr. Phelps"$_$p$g

changes the DOS prompt to display the current date in the upper-left corner of the screen and the time in the upper-right corner; it also creates a two-line prompt that starts with Good morning Mr. Phelps and then has the familiar C:> on the following line. Notice that case is significant in ANSI commands, and the preceding command does not work if, for example, you type E rather than e.

See Also

DEVICE= and PROMPT

Chapter 17, “Understanding ANSI.SYS”

APPEND 3.3 and later—External

APPEND 3.3 and later—External
APPEND 3.3 and later—External
APPEND 3.3 and later—External
APPEND 3.3 and later—External

You can use the APPEND command to set up a search path that enables DOS to find data files even if they're not in the current directory. The subdirectories in the APPEND path are appended to the current directory when DOS searches for data files. APPEND was developed so that programs requiring you to make their program directories current can be run from the subdirectory that contains their data files rather than the one that contains their program files.

Syntax

To load APPEND into memory:

APPEND  /X:onoff  /E

or

APPEND  path1;path2;... /X:onoff  /PATH:onoff

To replace and/or set the appended directory search path:

APPEND  path1;path2;... /X:onoff  /PATH:onoff

To clear the appended directory search path:

APPEND ;

To display the current appended directory search path:

APPEND

Parameters and Switches

path1;path2;...Each path specifies a valid subdirectory that exists on your system. Use full, absolute pathnames that include drive letters for each subdirectory included in your appended directory search path; the current subdirectory and disk drive often change. Separate each subdirectory from the previous one with a semicolon (;).
/EStores the appended directory search path in an environment variable named APPEND rather than internally. With this switch specified, you can use SET to view or change the appended directory search path. You can specify this option only when you first load APPEND into memory.
/X:onoffSpecifies whether DOS is to search appended directories (/X or /X:ON) or not (/X:OFF) when executing programs. Directories on the APPEND path are searched before those specified with the PATH command. To use this feature, you must specify it when you load APPEND into memory, after which you can toggle it on (/X or /X:ON) and off (/X:OFF).
/PATH:onoffNormally, if you specify a full pathname for a file, DOS searches only that directory. /PATH:ON instructs DOS to search the appended directories even if the full pathname of the file is given. /PATH:OFF turns off this feature.

Notes

  1. The first time you run APPEND, it loads itself into memory as a TSR program, occupying about 5KB of memory. APPEND does not remove itself from memory until you restart DOS.

  2. After you load APPEND into memory, do not specify the .EXE file extension. At this point, APPEND is resident in memory and will not load more than once.

  3. You can use the /E switches only when you first load APPEND into memory, and you cannot specify any search paths on the same line. In other words, if you want the APPEND path to be stored in the environment, you have to run the command twice—once with /E and then again to set your appended directory search path.

  4. To use the /X switch, you must specify it in the line that loads APPEND into memory. After APPEND is loaded with this feature enabled, you can toggle it on and off by using /X:ON and /X:OFF.

  5. Each path you specify in the appended directory search path must be separated by a semicolon. Don't include any spaces between paths. The total length of the appended directory search path cannot exceed 127 characters.

  6. When DOS looks for a data file, it first searches the current directory and then the appended directories in the order you specified them. If DOS encounters an invalid path, it skips that path without displaying any error messages.

  7. Do not use APPEND when running Microsoft Windows or Windows Setup.

  8. APPEND can't change the environment being used by running applications, so the /E switch does not work with shell programs, such as DOSSHELL, XTree, or Norton Commander. To work with these types of programs, APPEND must store the appended directory search path internally (in other words, don't specify /E).

  9. The DIR command ignores the appended directory search path and never displays files from appended directories.

  10. APPEND ignores any drive assignments made with the ASSIGN command. To use both utilities, you must load APPEND into memory before using ASSIGN; otherwise, an error message appears.

  11. DOS searches the appended directories when it opens files requested through Interrupt 21h functions 0Fh (Open File), 3Dh (Open File Handle), and 23h (Get File Size). When /X or /X:ON is specified, functions 11h (Find First Entry), 4Eh (Find First File), and 4Bh (Execute Program) search the appended directories as well.

Caution

APPEND is intended for locating and reading files, but not for writing them. Any files written to disk are placed in the current subdirectory, no matter what subdirectory they originally were read from. This capability works out well for program overlay and help files, which are rarely written to, but can be very frustrating if APPEND starts scattering data files all over your hard disk.

Examples

The following line loads APPEND into memory, enables searching for executable files in appended directories, and stores the active APPEND path in the environment. This line assumes that the file APPEND.EXE is located in the C:DOS subdirectory:

C:DOSAPPEND  /X  /E

To instruct DOS to search the current directory, C:BIN, and C:BINOVR when opening data files, enter the following command:

APPEND  C:BIN;C:BINOVR

When the program that needed data file path support terminates, disable APPEND by using the following command:

APPEND  ;

To reactivate APPEND, simply specify a new APPEND path.

Messages

APPEND/ASSIGN conflict

Error: You tried to load APPEND after reassigning disk drives with ASSIGN. Break any disk drive reassignments you may have set, load APPEND, and then reset your ASSIGN settings.

APPEND already installed

Warning: You attempted to load APPEND a second time. Try running the command again, making sure to enter APPEND and not APPEND.EXE on the command line.

Incorrect APPEND version

Error: You used a version of APPEND from a different version of DOS. Make sure that you do not use an APPEND version from the IBM local area network (LAN) program. The problem may be that the wrong version of APPEND is loading first from a subdirectory included in your DOS PATH.

No Append

Information: You typed APPEND to display the current appended directory path, and APPEND currently is inactive.

See Also

PATH

ASSIGN 2.0 to 5.0—External

ASSIGN 2.0 to 5.0—External
ASSIGN 2.0 to 5.0—External
ASSIGN 2.0 to 5.0—External

ASSIGN was a utility that enabled you to attach an alias drive letter to an existing drive. Microsoft no longer distributes ASSIGN in the standard DOS package and is encouraging everyone to begin using SUBST instead. ASSIGN is included on the DOS 6 Supplemental Disk.

Using SUBST Instead of ASSIGN

Using SUBST Instead of ASSIGN
Using SUBST Instead of ASSIGN

You can use ASSIGN to create an alias of A: for your B: drive if you want to fool an installation program that runs only from drive A:. To accomplish this task with ASSIGN, you use the following command:

ASSIGN  B  =  A

To do the same thing with SUBST, you enter the following command:

SUBST  A:  B:

See Also

SUBST

Changing Disk Drives” in Chapter 11

ATTRIB 3.0 and later—External

ATTRIB 3.0 and later—External
ATTRIB 3.0 and later—External

In a file's directory entry on disk, DOS stores information about the file's size, the date and time the file was last modified, and any attributes associated with that file. File attributes flag files that have to be backed up, control whether a file can be written to, and hide files from view. With ATTRIB, you can view or change the attributes associated with a particular file.

Syntax

Use this syntax to display the attributes currently set for a file or group of files:

ATTRIB  pathname  /S

Use this syntax to set or clear attributes for a file or group of files:

ATTRIB  +|- A  +|-R  +|-S  +|-H  pathname  /S

Parameters and Switches

+|- ASets (+A) or clears (-A) the archive attribute for all files matching the pathname specified. By default, new files always have their archive attribute turned on. DOS sets this attribute each time a file is written to.
+|- RSets (+R) or clears (-R) the read-only attribute for all files matching the pathname specified. Marking a file as read-only can prevent COPY from overwriting it, but many programs can override this flag.
+|- SSets (+S) or clears (-S) the system attribute for all files matching the pathname specified. Few files use this attribute. It flags the hidden MS-DOS system files that are in the root directory of your startup disk drive.
+|- HSets (+H) or clears (-H) the hidden attribute for all files matching the pathname specified. A file with the hidden attribute normally does not show up in a listing of the files in a directory. ATTRIB enables you to set the hidden flag for subdirectories as well as for files.
pathnameIndicates the file or files that you want ATTRIB to display information about. Wildcards are allowed in the filename portion. If no pathname is specified, all files (*.*) in the current directory are displayed. If no filename is specified, ATTRIB displays or changes the attributes of that subdirectory. Notice that the root directory has no attributes and therefore cannot be changed.
/SSearches for files in the specified subdirectory and all subdirectories below it.

Notes

  1. If a file has either the hidden or system attribute set, you must clear that attribute before you can change any other attributes for the file. Otherwise, you are denied access to the file (see the following “Messages” section). If a single file has both the system and hidden attributes set, you must clear both attributes with a single ATTRIB command to avoid being denied access to the file.

  2. Normally, ATTRIB only displays or alters the attributes of files. To change the attributes of a subdirectory, you must enter the full pathname for that subdirectory on the command line with ATTRIB. You cannot use wildcards when you are specifying subdirectories.

Caution

Commas can make strange things happen with ATTRIB. If you include a comma in an ATTRIB command, as shown here, ATTRIB clears all the attributes for all the files in the current directory:

ATTRIB  ,

If you also include the /S switch, as in the following example, ATTRIB clears the attributes of all the files on your hard disk, not just the ones below the current directory:

ATTRIB  ,  /S

This problem has been confirmed by Microsoft and is present in DOS 5 versions of ATTRIB as well.

Examples

To display the attributes of all the .TXT files in the C:MYWORK subdirectory, you would enter the following:

ATTRIB  C:MYWORK*.TXT

If you want to extend the search to include any subdirectories under the subdirectory, you would include the /S switch, as in the following:

ATTRIB  C:MYWORK*.TXT  /S

To set the archive bit on for all the files you found so that MSBACKUP will be sure to back them up the next time you run it, enter the following:

ATTRIB  +A C:MYWORK*.TXT  /S

To clear all the attributes of all the files in the root directory of drive C:, including the MS-DOS system files, enter the following:

ATTRIB  -A  -R  -H  -S  C:*.*

To hide the C:SECRET subdirectory so that it no longer shows up in directory listings, enter the following:

ATTRIB  +H  C:SECRET

Messages

Not resetting hidden file
Not resetting system file

Error: ATTRIB is unable to set or clear the attributes you've requested because the file has either the hidden or system attribute set. To get around this problem, clear the hidden or system attribute for that file first (for example, use ATTRIB -H -S); then retry the command.

BACKUP 2.0 to 5.0—External

BACKUP 2.0 to 5.0—External
BACKUP 2.0 to 5.0—External
BACKUP 2.0 to 5.0—External
BACKUP 2.0 to 5.0—External

The BACKUP utility has been around for quite a while. You could use it to back up files from your hard disk drive to a series of floppy disks. It created a special file on each backup disk, a file that could be read only by the RESTORE utility. RESTORE, however, would often refuse to restore files if anything went wrong with your disks. With MS-DOS 6.0, Microsoft began distributing the new MSBACKUP program. If you still want to use the old BACKUP utility, Microsoft has included it on the DOS 6 Supplemental Disk.

See Also

MSBACKUP and RESTORE

BREAK 2.0 and later—Internal

BREAK= 2.0 and later—Internal

BREAK= 2.0 and later—Internal
BREAK= 2.0 and later—Internal
BREAK= 2.0 and later—Internal

When DOS detects a Ctrl+Break (or Ctrl+C), it attempts to stop the program that is currently running. DOS checks for a Ctrl+Break after performing any screen, keyboard, or printer I/O operation. Turning BREAK ON or setting BREAK=ON in your CONFIG.SYS file instructs DOS to check for Ctrl+Break after performing disk I/O operations as well. This way, you can regain control more quickly when you are trying to stop disk-oriented DOS commands.

Syntax

In CONFIG.SYS, to set extended Ctrl+Break checking on or off, use the following format:

BREAK=onoff

To turn extended Ctrl+Break checking on or off from the command line, use the following format:

BREAK  onoff

Parameters and Switches

onoffSpecifies whether you want extended Ctrl+Break checking to be turned on or off. The only legal values for the onoff parameter are ON and OFF. In the CONFIG.SYS form of this command, this parameter is required. If you omit the onoff parameter when you run BREAK from the command line, the current state of extended Ctrl+Break checking is displayed.

Notes

  1. When DOS starts, it sets extended Ctrl+Break checking off by default.

  2. Set BREAK=ON in your CONFIG.SYS file. The speed penalty is negligible, and if this setting saves just one file from a mistyped COPY command, it is well worthwhile. Most long operations involve reading or writing to disk. If BREAK is off, you may be unable to stop a lengthy process you would rather not wait for.

  3. In most cases, pressing Ctrl+C produces the same effect as pressing Ctrl+Break, but there is a subtle difference. The Ctrl+C key combination is passed through the keyboard buffer. If any other key is pressed before Ctrl+C, it is ignored until the program reads the keyboard. For example, DIR stops if you press Ctrl+C, but not if you press the spacebar and then Ctrl+C. Ctrl+Break is passed directly to DOS without buffering and often gets a quicker response.

  4. In theory, turning on extended Ctrl+Break checking should slow down your system. In practice, any slowdown is so insignificant that you probably will never notice it.

  5. Programs have complete control over what happens when a Ctrl+Break is detected. The default action is for the running program to be halted, but applications often disable Ctrl+Break so that you can save your work before exiting. Typically, short command-line utilities respond to Ctrl+Break, whereas most full-screen applications do not.

  6. The state of the BREAK flag can be changed by a running program. Programming etiquette dictates that when an application finishes running, it should reset all flags to their original states. Still, you may run across applications that forget to reset BREAK. If this causes problems, you can run the application from a batch file that restores the BREAK flag setting when the program terminates.

See Also

VERIFY

Telling DOS When to Break” in Chapter 19

BUFFERS= 2.0 and later—Internal

BUFFERS= 2.0 and later—Internal

DOS stores any information read from or written to disk in memory buffers. With more buffers available, it is more likely that DOS already has in memory the data requested by a program. The BUFFERS= command enables you to fine-tune your system so that DOS can perform disk I/O as efficiently as possible. BUFFERS= can be used only in your CONFIG.SYS file.

Syntax

BUFFERS=number,read_ahead

Parameters and Switches

numberThe number of disk buffers DOS should use, from 1 to 99. The default value varies depending on the amount of memory in your computer. Normally, 15 is used for a computer with at least 512KB of RAM.
read_aheadThe number of buffers in the secondary, read ahead cache. For DOS 5.0, this value could be from 1 to 8, with a default value of 1. In DOS 6.0, you can specify zero secondary cache buffers, and 0 is the default value.

Notes

  1. Each disk buffer uses approximately 532 bytes of memory. If DOS is loaded HIGH, it attempts to locate these buffers in the HMA as well. About 48 buffers can fit in the HMA with DOS 6. If you have specified more buffers than can fit in the HMA, DOS loads them all into conventional memory.

    Tip

    Make sure that you explicitly set the number of DOS buffers in your CONFIG.SYS file. If you aren't using disk-caching software, the default for BUFFERS (usually 15) is too low. You may be slowing down your computer by not requesting more.

  2. If you are using disk-caching software, such as SMARTDRV.EXE, you might want to decrease the number of buffers that DOS uses. A dedicated disk cache is much more efficient at optimizing disk access time than the simple memory buffers that DOS uses, and having several DOS buffers can slow your system. In this situation, set the number of buffers fairly low—using only 15 or 20.

  3. Although the perfect setting for buffers can be found only through trial and error, a good place to start is to use half the size of your hard disk (in megabytes), adjusted to be in the range of 15 to 55. For example, if you have an 80MB drive, a good setting might be 40. With large drives, you may be tempted to specify a higher number of buffers, but under normal circumstances, using a number higher than 50 hurts rather than helps performance.

  4. The secondary read-ahead buffer setting can give you a performance boost if you aren't running any other caching software. Because many programs read files sequentially, DOS can perform fewer disk accesses by reading in more information than was requested. The number of read-ahead buffers you specify is the amount of data that DOS reads from disk in addition to the data requested by a program.

    Cache software, such as SMARTDRV.EXE, usually includes much more sophisticated read-ahead capabilities than DOS can provide. If you are using any cache software, you should turn off this feature by letting DOS default to zero read-ahead buffers.

See Also

DOS=HIGH, FASTOPEN, FILES, HIMEM.SYS, and SMARTDRV.EXE

Chapter 19, “Configuring Your Computer”

CALL 3.3 and later—Internal

CALL 3.3 and later—Internal

You can use the CALL command to execute a second batch file and return control to the first batch file. CALL normally is used to replace the awkward COMMAND /C syntax that was required before DOS 3.3. CALL can be used to run any executable file, but there is no reason to use it for .COM or .EXE files because they return control automatically. If you execute a batch file from a batch file without using CALL, control is never returned.

Syntax

CALL  drive:pathfilename parameters

Parameters and Switches

drive:pathThe drive and/or path to the batch file you want to execute. If no drive or path is specified, the DOS PATH is searched for filename.

filenameThe filename of the batch file you want to execute. This argument is required and wildcards cannot be used. You are not required to enter the .BAT extension, but you can include it if you want to ensure that a batch file, rather than an executable file, is found.

parametersAny parameters that you want passed to the batch file you are executing.

Notes

  1. When you use the CALL command to execute a batch file from within a batch file, control returns to the first batch file when the second one terminates. If you execute a batch file from within a batch file without the CALL command, control never returns to the first batch file.

  2. Any parameters specified are passed to the called batch file. You can access these parameters from within the called batch file by using replaceable parameters (for example, %1) as usual.

  3. Avoid using redirection symbols (<, >, and >>) or the pipe character (|) in the parameters you pass to the batch file with the CALL command. DOS ignores any redirection operations you specify, which might cause some programs (such as MORE) to lock up or crash.

  4. Although the CALL command is very similar to the COMMAND /C command, it has one significant difference: CALL doesn't execute a temporary copy of the command interpreter, whereas COMMAND /C does. For this reason, CALL requires less memory to use.

  5. If you use CALL to call a program that returns an exit code, that exit code value will be available after CALL returns. Unfortunately, you can't set the exit code for a batch file, so CALL can't return an exit code from a batch file you have executed. To return status information from a batch file executed with the CALL command, create an environment variable and set it equal to your return status. You then can test this environment variable in the calling batch file.

  6. A batch file executed with the CALL command uses the same copy of the command interpreter that its parent is using; therefore, they share access to the same environment area. Any environment variables you set in the called batch file can be read by the parent batch file when it regains control. This is not true when you use COMMAND /C. The environment of a batch file executed with COMMAND /C disappears when the temporary copy of the command interpreter it is running under is removed from memory.

  7. If you are going to load any resident software from a called batch file, make sure you use CALL rather than COMMAND /C. When you return from COMMAND /C, the temporary copy of the command interpreter is unloaded from memory. If you load any resident software while this temporary copy is running, the memory occupied by the temporary command interpreter remains unavailable until you reboot your computer. This “memory loss” doesn't happen with the CALL command because no temporary copy of the command interpreter is loaded.

  8. A batch file can call itself, but you must be careful to explicitly terminate the batch file at some point to avoid an endless loop. A batch file can be terminated by instructing the user to press Ctrl+Break at a PAUSE or by executing another batch file (without CALL) at some point.

  9. Although executing a .COM or .EXE file with the CALL command is perfectly legal, there is little reason to do so. After a .COM or .EXE file is executed, control returns to the batch file with or without using the CALL command. Executing the CALL command from the DOS prompt, although legal, is fairly useless unless it is part of a FOR-IN-DO loop.

Examples

To call a batch file from another batch file, simply include the name of the batch file in a CALL command, as shown in the following:

CALL  OTHER.BAT

Note that you can omit the .BAT extension; however, if DOS locates an .EXE or .COM file named OTHER, it executes that program rather than your batch file. DOS searches the current directory as well as any subdirectories listed in your DOS PATH looking for OTHER.BAT. To save time by limiting DOS's search, you can specify the full pathname of the batch file.

Arguments can be passed to the called batch file. Suppose that you previously wrote a batch file named COPYDOC.BAT, which copied all the .DOC files in a subdirectory (%1) to a floppy disk (%2). The project you are working on is stored in five separate subdirectories, and you want to write a batch file, as shown in the following example, that runs COPYDOC once for each subdirectory:

@ECHO OFF
CALL COPYDOC.BAT C:PROJECTWORK B:
CALL COPYDOC.BAT C:PROJECTLTR B:
CALL COPYDOC.BAT C:PROJECTEXPN B:
CALL COPYDOC.BAT C:PROJECTRES B:
CALL COPYDOC.BAT C:PROJECTOLD B:
ECHO *** All Done ***

Each CALL command executes COPYDOC with different parameters, backing up all five of the C:PROJECT subdirectories. After all the copy commands are executed, the message *** All Done *** is displayed onscreen. If you execute the COPYDOC.BAT file without using CALL, the batch file is terminated after backing up one subdirectory because control never returns to this batch file from COPYDOC.BAT.

To eliminate the repetition in the preceding example, you can combine all five CALL commands into a single FOR-IN-DO loop, as shown in the following:

@ECHO OFF
FOR %%A IN (WORK LTR EXPN RES OLD) DO CALL COPYDOC.BAT C:PROJECT\%%A B:
ECHO *** All Done ***

Note that you can execute this FOR command from the command line, as long as you remember to substitute single percent signs for the double ones that are required in batch files, like this:

FOR %A IN (WORK LTR EXPN RES OLD) DO CALL COPYDOC.BAT C:PROJECT\%A B:

Messages

Batch file missing

Error: DOS attempted to read the next line from the batch file it was executing and was unable to find the file. This error can happen if you execute a batch file from a floppy disk and change disks before the batch file has finished. The batch file may have renamed or deleted itself, in which case you have to edit it to avoid this behavior.

CD or CHDIR 2.0 and later—Internal

CD or CHDIR 2.0 and later—Internal
CD or CHDIR 2.0 and later—Internal

Each disk drive has one subdirectory that is referred to as the current directory. When a pathname contains no subdirectories, DOS assumes the current directory for that drive is being referenced. The CD (or CHDIR) command enables you to display or change the current directory for a disk drive.

Syntax

CD  drive:path

or

CHDIR  drive:path

Parameters and Switches

drive:pathThe subdirectory (path) on a particular drive: that you want to make current. If only a path is specified, it becomes the current directory on the current drive. If only a drive: is specified, the name of the current subdirectory on that drive is displayed. If this parameter is omitted, the name of the current directory of the current drive is displayed.

Notes

  1. If a backslash () is the first (or only) character in a subdirectory path, it is considered an absolute path and is specified starting from the root directory. If the subdirectory path begins with a subdirectory name, it is considered a relative path, and the current directory is used as the starting point. A drive letter, followed by a colon, can precede either an absolute or relative path.

  2. Two periods (..) represent the parent of the current directory. A common shorthand with the CD command is to switch to the parent directory by using a CD .. command. The “double-dot” can be used in any pathname, but it is more useful in relative pathnames than in absolute ones. Notice that the root directory has no parent; attempting to switch to the parent of the root directory (for example, CD ..) causes an error message to be displayed. (See the first item in the following “Messages” section.)

  3. Do not specify a filename with the CD (or CHDIR) command; otherwise, DOS interprets the filename as a subdirectory name and displays an error message. (See the first item in the following “Messages” section.)

  4. You must include a colon after the drive letter; otherwise, DOS interprets the drive letter as a subdirectory name and displays an error message. (See the first item in the following “Messages” section.)

Examples

To change to the root directory of the current drive, enter CD (or CHDIR) followed by a backslash:

CD  

To change to the parent or the current directory, enter CD followed by two periods:

CD  ..

If the current directory was the root directory, switching to the parent directory with the preceding command causes an Invalid directory message to be displayed (because the root directory has no parent). (See the first item in the following “Messages” section.)

For the next set of examples, assume the following directory tree:

C:

  DOS

  TEMP
WIN

      SYSTEM

WORK

      STEVE

      ALICE

Enter the following command to display the current directory on drive C:

CD  C:

If you omit the C:, the current directory of the current drive is displayed. Assuming that drive C is the current drive, you enter the following command to change to the C:WORKSTEVE subdirectory:

CD  WORKSTEVE

Then, if you want to change to the C:WORKALICE subdirectory, you can use either of the following two commands:

CD  WORKALICE

or

CD  ..ALICE

The second line uses the “double-dot” directory to specify a relative path to the new subdirectory. It is interpreted as “the subdirectory ALICE of the parent of the current directory.”

Relative pathnames can get very convoluted. If C:WORKALICE is the current drive and directory, and you want to change to the C:WINSYSTEM subdirectory, enter one of the following commands:

CD  ....WINSYSTEM

or

CD  ..STEVE....DOS..WINSYSTEM

The preceding examples can help you understand how DOS interprets relative pathnames, but using absolute pathnames is much easier when you want to move to a remote part of the subdirectory structure.

Messages

Invalid directory

Error: You have used the path argument to specify a directory that doesn't exist. Make sure that you entered the subdirectory path correctly and that you did not include a filename at the end of the path.

Invalid drive specified

Error: You have specified an invalid drive letter.

See Also

DELTREE, MD (or MKDIR), MOVE, RD (or RMDIR), and TREE

Changing the Current Directory with CHDIR (CD)” in Chapter 5

CHAIN

CHAINCHAIN commandcommandsCHAIN
CHAINCHAIN commandcommandsCHAIN

You use CHAIN in your CONFIG.SYS file to start another configuration file and process the commands in it.

Syntax

CHAIN drive:pathfilespec.ext

Parameters and Switches

drive:pathfilespec.extThe location and filename of the configuration file to process. If the configuration file is on a different drive, you need to specify the drive and full path for any device commands in the file.

CHCP 3.3 and later—Internal

CHCP 3.3 and later—Internal
CHCP 3.3 and later—Internal
CHCP 3.3 and later—Internal

The CHCP command is a systemwide, code-page (character-set) changer. CHCP simultaneously resets all affected devices to the changed font. MODE works in a similar manner but changes only one device at a time.

Syntax

To change the current code page, use the following format:

CHCP codepage

To display the current code page, use the following format:

CHCP

Parameters and Switches

codepageA valid three-digit code-page number. See “International Country Codes” in Chapter 14, “Understanding the International Features of DOS,” for a list of the code pages that MS-DOS supports.

Notes

  1. Before using CHCP, you must use the COUNTRY command (to specify the location of the country-information file, normally COUNTRY.SYS), use the NLSFUNC command (to specify a location that overrides that of the COUNTRY command), or place COUNTRY.SYS in the root directory of the current disk. Otherwise, DOS returns the message Cannot open specified country information file.

  2. Before using CHCP, you must use the NLSFUNC command.

  3. When you select a code page, the new code page becomes the specified code page. If you include CONFIG.SYS directives for devices that use code pages, such as DEVICE=DISPLAY.SYS, CHCP loads the correct code pages for the devices.

  4. You can access the COUNTRY.SYS file to get country information. If you do not specify the location of COUNTRY.SYS when you invoke NLSFUNC, COUNTRY.SYS must exist in the current disk's root directory. Otherwise, DOS returns the message Cannot open specified country information file.

Messages

Code page nnn not prepared for device ddd

Error: CHCP could not select the code page nnn because of one of the following errors:

  • You did not use MODE to prepare a code page for this device.

  • An I/O error occurred while DOS was sending the new font information to the device.

  • The device is busy (for example, a printer is in use or offline).

  • The device does not support code-page switching.

Check to make sure that the command MODE CODEPAGE PREPARE was issued for the appropriate devices and the devices are online and ready. Then, try CHCP again.

Invalid code page

Error: CHCP could not select the code page because of one of the following errors:

  • You specified an invalid code page for the country.

  • You did not use the MODE command to prepare a code page.

Be sure that you run NLSFUNC and use the command MODE CODEPAGE PREPARE to prepare the code page for the appropriate devices.

NLSFUNC not installed

Error: You attempted to change the code page but did not initiate NLSFUNC before using CHCP. If you plan to use code pages and have the correct directives in CONFIG.SYS, add NLSFUNC to your AUTOEXEC.BAT file so that the command is executed when you boot the computer.

See Also

COUNTRY=, MODE device CP, and NLSFUNC

Chapter 14, “Understanding the International Features of DOS”

CHDIR (see CD)

CHDIR is an alternative name for the CD command. For information on using the CD or CHDIR command, see the entry for CD earlier in this command reference.

CHECK

CHECK

The CHECK command checks a Stacker-compressed drive, produces a status report, and fixes any detected problems. The Stacker drive must be installed before using the CHECK command.

Syntax

CHECK drive: /b /d /f /n /t /v /wp /?

Parameters and Switches

drive:Indicates the Stacker drive to check.
/bRuns in batch file mode, suppressing pauses.
/dDisplays detailed error and statistics report.
/fFixes detected problems.
/nPrevents new save-header files from being created.
/tSkips the SmartPack sector check.
/vDisplays the name of each file in every directory as the drive is checked.
/wpChecks and repairs any write-protected Stacker drives.
/?Displays the abbreviated online help.

Remarks

To receive a Stacker drive space report on a compressed drive, use the command check e: /d.

CHKDSK 1.0 and later—External

CHKDSK 1.0 and later—External
CHKDSK 1.0 and later—External

The CHKDSK command checks the directory and file allocation table (FAT) of the disk and reports disk and memory status. CHKDSK also can repair errors in the directories or the FAT.

Syntax

CHKDSK  drive:pathfilename.ext  /F  /V

Parameters and Switches

drive:The disk drive to be analyzed.
pathThe directory path to the files to be analyzed.
filename.extA valid DOS filename. Wildcards are permitted.
/FFixes the FAT and other problems if errors are found. (Do not use this switch when you are running under Microsoft Windows or the DOS Task Swapper.)
/VShows CHKDSK's progress and displays more detailed information about the errors that the program finds. (This switch is known as the verbose switch.)

Exit Codes

ERRORLEVEL ValueMeaning
0No errors found
255Errors were found

Rules

  1. You must direct CHKDSK to repair the disk by using the /F switch. CHKDSK asks you to confirm that you want the repairs made before it proceeds.

  2. CHKDSK cannot process a directory in which you used the JOIN command—that is, a second disk joined to a subdirectory.

  3. CHKDSK does not process a disk on which you used a SUBST command.

  4. CHKDSK cannot process a disk drive on which you used the ASSIGN command.

  5. CHKDSK cannot process a networked (shared) disk.

  6. Do not use CHKDSK on disks that contain open files, or have another program running that may access the disk drive while CHKDSK is running.

  7. (Not MS-DOS 6.2) After completing its normal checks on a DoubleSpace drive, CHKDSK automatically runs DBLSPACE /CHKDSK on the drive.

Notes

Notes
  1. In MS-DOS 6.2, CHKDSK now displays numbers with embedded commas, making them much easier to read.

  2. CHKDSK displays the following information:

    • Volume name and creation date (only disks with volume labels)

    • Volume serial number (if it exists)

    • Total disk space

    • Number of files and bytes used for hidden or system files

    • Number of files and bytes used for directories

    • Number of files and bytes used for user (normal) files

    • Bytes used by bad sectors (flawed disk space)

    • Bytes available on disk (free space)

    • Bytes of total conventional memory (RAM)

    • Bytes of available conventional memory

    Tip

    If you are using MS-DOS 6.2, Microsoft advises you to stop using the CHKDSK command and use the new ScanDisk program instead. ScanDisk can identify and fix many more types of errors than CHKDSK. If you use DoubleSpace, ScanDisk can identify and fix any errors it finds on your compressed drives as well.

  3. In DOS 4.0 and later, CHKDSK also reports the following information:

    • Total bytes in each allocation unit

    • Total allocation units on the disk

    • Available allocation units on the disk (an allocation unit equates to a cluster)

  4. CHKDSK checks the directories and the FAT of a disk. The command also checks the amount of memory in the system and determines how much of that memory is free. If errors are found, CHKDSK reports them onscreen before making a status report.

  5. If lost clusters are found, CHKDSK asks whether you want to repair them. You must type Y or N. If you type Y, CHKDSK shows a report onscreen as though the lost clusters were repaired. This report is only a simulation, however. To actually reclaim the lost clusters, you must issue a second command: CHKDSK /F.

  6. The CHKDSK filename checks to see whether the specified files are stored contiguously on the disk. DOS reports any noncontiguously stored files and how many different sections store the files. If CHKDSK reports many noncontiguous files, you might want to run DEFRAG on the disk.

  7. CHKDSK does not check to see whether your files can be read, nor does CHKDSK test your disk to determine whether new bad spots have appeared.

Messages

All specified file(s) are contiguous

Information: The files you specified are stored in contiguous sectors on the disk. Disk performance for the files should be optimal.

filename
Allocation error, size adjusted

Warning: The filename has an invalid sector number in the FAT. The file was truncated by CHKDSK at the end of the last valid sector.

Check this file to verify that all information in the file is correct. If you find a problem, use your backup copy of the file. This message usually appears when the problem is in the FAT, not in the file. Your file probably is still good.

filename
Contains xxx non-contiguous blocks

Information: filename is not stored continuously on the disk but in xxx number of pieces. This arrangement can diminish the performance of the disk. If you find that many files on a disk are stored in noncontiguous pieces, you might want to run DEFRAG.

directoryname
Convert directory to file (Y/N)?

Warning: directoryname contains so much bad information that the directory no longer is usable. If you type Y, CHKDSK converts the directory into a file so that you can use DEBUG or another tool to repair the directory. If you type N, no action is taken.

The first time you see this message, type N. Try to copy files from this directory to another disk and check the copied files to see whether they are usable. Then, rerun CHKDSK to convert the directory into a file and try to recover the rest of the files.

Errors found, F parameter not specified
Corrections will not be written to the disk

Information: CHKDSK found an error. This message tells you that CHKDSK will go through the motions of repairing the disk but will not actually change the file because you did not use the /F switch.

filename
First allocation unit is invalid, entry truncated

Warning: filename's first entry in the FAT refers to a nonexistent portion of the disk. If you used the /F switch, the file becomes a zero-length file (truncated).

Try to copy this file to another floppy disk before CHKDSK truncates the file. You may not get a useful copy, however, and the original file will be lost.

. or ..
Entry has a bad attribute
or Entry has a bad size or
Entry has a bad link

Warning: The link to the parent directory (..) or the current directory (.) has a problem. If you used the /F switch, CHKDSK attempts to repair the problem. Normally, this procedure is safe, and you do not risk losing files.

filename
Has invalid allocation unit, file truncated

Information and warning: Part of the chain of FAT entries for filename points to a nonexistent part of the disk. The /F switch truncates the file at its last valid sector. If you did not use the /F switch, DOS takes no corrective action. Try to copy this file to a different disk and then rerun CHKDSK with the /F switch. (You may lose part of the file.)

filename1
Is cross linked on allocation unit x
filename2
Is cross linked on allocation unit x

Warning: Two files—filename1 and filename2—had entries in the FAT that point to the same area (cluster) of the disk. In other words, the two files believe that they own the same piece of the disk.

CHKDSK takes no action. To handle the problem, copy both files to another floppy disk, delete the files from the original disk, and edit the files as necessary. (The files may contain garbage.)

Insufficient room in root directory
Erase files from root and repeat CHKDSK

Error: CHKDSK recovered so many “lost” clusters from the disk that the root directory is full. CHKDSK aborts at this point.

Examine the FILExxxx.CHK files. If you find nothing useful, delete them. Rerun CHKDSK with the /F switch to continue recovering lost clusters.

xxxxxxxxxx bytes disk space freed

Information: CHKDSK regained some disk space that was improperly marked as “in use.” xxxxxxxxxx tells you how many additional bytes are now available. To free this disk space, review and delete any FILExxxx.CHK file that does not contain useful information.

xxx lost allocation units found in yyy chains
Convert lost chains to files (Y/N)?

Information: Although CHKDSK found xxx blocks of data allocated in the FAT, no file on the disk is using these blocks. The blocks are lost clusters, which CHKDSK normally can free if no other error or warning message appears.

If you use the /F switch and type Y, CHKDSK joins each set of lost chains into a file placed in the root directory of the disk. That file is called FILExxxx.CHK, in which xxxx is a consecutive number between 0000 and 9999. Examine this file and delete any clusters that contain no useful information.

If you use the /F switch and type N, CHKDSK simply frees the lost chains so that other files can reuse the disk space. No files are created. If you type Y and omit /F, CHKDSK displays the actions that you can take but takes no action itself.

See Also

DEFRAG, DOUBLESPACE/CHKDSK, and SCANDISK

Analyzing a Disk with CHKDSK” in Chapter 7

CHKSTATE.SYS (see MEMMAKER)

The CHKSTATE.SYS device driver helps MemMaker optimize memory use on your computer. MemMaker requires this driver only while optimizing your system; it's not needed at any other time. You should not attempt to use this device driver yourself.

Very few details about CHKSTATE.SYS's operation are documented. It's loaded into memory by MemMaker with a DEVICE= line in your CONFIG.SYS file during the optimization process. Presumably, CHKSTATE.SYS communicates with MEMMAKER about the state of your computer, verifying that system integrity is not violated as different combinations of drivers are loaded. When optimization is complete, MemMaker removes this driver from the CONFIG.SYS file.

See Also

MEMMAKER and SIZER

CHOICE 6.0 and later—External

CHOICE 6.0 and later—External

The CHOICE command suspends batch-file processing and prompts the user to make a choice before processing resumes. You can specify which keystrokes are accepted and what default choices are made if no keys are pressed.

Syntax

CHOICE  /C:keys  /N  /S  /T:choice,seconds  prompt

Parameters and Switches

/C:keysSpecifies which keys are displayed in the prompt. The colon (:) is optional. If /C is not specified, CHOICE acts as though you specified /C:YN.

/N Suppresses the key list and question mark that DOS normally adds to the prompt (see the first item in the following “Notes” section).

/S Enables case sensitivity for the keys. That is, if /S is specified, the uppercase key represents a different response from the lowercase key. If /S is not specified, the uppercase key is the same as the lowercase key.

/T:choice,secondsSpecifies a default key and the number of seconds to wait for the user to press a key before the default is used. The colon (:) is optional. choice must be one of the keys specified by /C:keys, and seconds must be from 0 to 99 (0 means no pause before choice is used).

promptSpecifies the prompt line that is displayed to inform the user about the choice that has to be made. To the end of the prompt you specify, DOS adds a bracketed list of allowable keys and a question mark. Quotation marks (“) can be used around text, but you don't have to use them unless the prompt contains a switch character (/), redirection symbols, or trailing blank spaces. If no prompt is specified, DOS does not display any prompt at all.

Exit Codes

ERRORLEVEL ValueMeaning
0CHOICE terminated by user (Ctrl+Break or Ctrl+C)
1User picked the first key in /C:keys parameter
2User picked the second key in /C:keys parameter
3User picked the third key in /C:keys parameter
4 up… and so on …
255Terminated by illegal syntax or other error conditions

Notes

  1. When a CHOICE command is executed, the user sees the command's prompt, followed by a prompt. The prompt is a left bracket ([), followed by the first key in /C:keys, followed by a comma, followed by any other keys in keys (separated by commas), followed by a right bracket (]), followed by a question mark (?). /C:YN, for example, produces the prompt [Y,N]?

  2. CHOICE returns different exit code values to the batch file, depending on which of the keys in /C:keys is pressed in response to the prompt. Pressing the first key returns 1, pressing the second returns 2, and so on.

  3. If the user presses Ctrl+Break and then does not terminate the batch job, a value of 0 is returned. If DOS detects an error, a value of 255 is returned.

  4. If the user presses a key that is not one of the keys in /C:keys, the computer beeps.

Examples

To ask the user whether to continue with the batch file, issue the following commands:

CHOICE /C:YN "Yes to continue and No to exit "

IF ERRORLEVEL 2 GOTO EXIT

You then see the following line:

Yes to continue and No to exit [Y,N]?

Notice the trailing space at the end of the prompt text specified in the CHOICE command. CHOICE adds the [Y,N]? text to the end of the prompt you specify. Adding a trailing space to your prompt text can make the final prompt more readable onscreen.

To load the mouse driver from your AUTOEXEC.BAT file unless told otherwise within three seconds, issue the following commands:

CHOICE /C:YN /T:3,Y "Load the mouse driver "

IF ERRORLEVEL 2 GOTO NOMOUSE

To provide a menu of choices, enter the following:

@ECHO OFF
CLS
ECHO.
ECHO F First action
ECHO S Second action
ECHO T Third action
ECHO.
CHOICE /C:FST "Choose an action "
IF ERRORLEVEL 255 GOTO ERROR
IF ERRORLEVEL 3 GOTO THIRD
IF ERRORLEVEL 2 GOTO SECOND
IF ERRORLEVEL 1 GOTO FIRST

:ERROR
ECHO GOT AN ERROR OR BREAK
GOTO END

:THIRD
ECHO PRESSED T
GOTO END

:SECOND
ECHO PRESSED S
GOTO END

:FIRST
ECHO PRESSED F
GOTO END

:END

CLS 2.0 and later—Internal

CLS 2.0 and later—Internal
CLS 2.0 and later—Internal

The CLS command clears a text screen and returns the cursor to the upper-left corner. It's very useful for clearing away messages left by other commands or batch files. Normally, CLS is limited to clearing 25-line text mode screens, but if ANSI.SYS is loaded, CLS clears 43- and 50-line text modes as well.

Syntax

CLS

Notes

  1. This command clears all information from the screen and places the cursor at the home position in the upper-left corner.

  2. This command affects only the active video display, not memory.

  3. If you used the ANSI control codes to set the foreground and background, the color settings remain in effect.

  4. If you did not set the foreground/background color, the screen reverts to light characters on a dark background.

See Also

ANSI.SYS

The CLS Command” in Chapter 13

CMOSCLK.SYS

CMOSCLK.SYS
CMOSCLK.SYS

CMOSCLK.SYS replaces the default DOS clock so that any request for the current date and time accesses this device driver instead of the DOS system clock.

Syntax

DEVICE=drive:path CMOSCLK.SYS

Parameters and Switches

drive:path

Location of the CMOSCLK.SYS file.

Notes

This device driver must be loaded by either a DEVICE= or DEVICEHIGH= statement in the CONFIG.SYS file.

CNFIGNAM.EXE

CNFIGNAM.EXE
CNFIGNAM.EXE

PCM Plus uses CNFIGNAM.EXE to specify configuration parameters for a specified setup configuration. The PCM Plus setup utility adds CNFIGNAM to the CONFIG.SYS file.

This device driver must be loaded by a DEVICE= statement in the CONFIG.SYS file. It cannot be loaded high.

Syntax

DEVICE=cnfignam.exe /config_name

Parameters and Switches

config_namePCM Plus configuration to use. PCM Plus can have multiple setup configurations in the PCM.INI file.

Notes

The CNFIGNAM statement in the CONFIG.SYS file is inserted automatically through the PCMSETUP program. Multiple configurations are identified and handled without user intervention.

COMMAND 2.0 and later—External

COMMAND 2.0 and later—External

COMMAND invokes another copy of COMMAND.COM, the command processor. If you write complicated batch files, this command may be useful. Normally, a user gets involved with this command when setting up the SHELL= line in the CONFIG.SYS file.

Syntax

COMMAND  pathcttydevice  /E:size  /K filename  /P  /MSG  /C string

In your CONFIG.SYS file, use the following format:

SHELL=drive:pathCOMMAND.COM  pathcondevice  /E:size  /P  /MSG

Parameters and Switches

drive:pathIndicates the DOS drive and path to the copy of COMMAND.COM that the SHELL= command should load.
pathIndicates the drive and directory location of COMMAND.COM. This path is assigned to the COMSPEC environment variable.
condeviceIndicates the device used for input and output. The default is CON:. The colon is optional. This parameter rarely is used.
/E:sizeSets the size of the environment. size is a decimal number from 160 to 32,768 bytes, rounded up to the nearest multiple of 16 (refer to the SHELL command). The default is 256.
/K filenameRuns filename (a program or batch file) and then displays the DOS command prompt.
/PKeeps this copy permanently in memory (until the next system reset). Generally used only as part of the SHELL command. Do not use the /P parameter from a batch file.
/MSGLoads all error messages into memory. Must be used with /P. Generally useful only if you are running DOS from floppy disks.
/C stringPasses the command and parameters represented by string to the new copy of COMMAND.COM and returns to the primary command processor.

Rules

  1. The string in the /C option is interpreted by the additional copy of COMMAND.COM, just as though you typed the string at the system level. /C must be the last switch used in the line. Do not use the form COMMAND/C string /P.

  2. You can exit from the second copy of the command processor by issuing the command EXIT, unless you used the /P option (permanent).

  3. If you issue the /P and /C switches together, /P is ignored.

  4. Do not use the /K switch in the SHELL command line in your CONFIG.SYS file. This switch can cause problems with applications and installation programs that alter your AUTOEXEC.BAT file.

Notes

  1. COMMAND often is used with the SHELL directive to enable COMMAND.COM to reside in a subdirectory rather than in the root directory.

  2. You can use COMMAND with all versions of DOS to call a second batch file from an originating batch file. Suppose that a batch file named BATCH1.BAT contains the following line:

    COMMAND  /C  BATCH2
    

    BATCH1 calls BATCH2.BAT. BATCH2.BAT executes and, after completing the last line of the batch file, returns to BATCH1 to complete the originating batch file. This method of calling a batch file is similar to the CALL batch subcommand available in DOS version 3.3 and later.

  3. If you use DOS 5.0 or 6.0 with a floppy-disk–only system, you can specify the /MSG switch in the SHELL directive of CONFIG.SYS. This switch loads all error messages in memory. If an error occurs, you do not need a disk with COMMAND.COM in the drive. (The switch uses an additional 1KB of RAM.)

  4. You can use the /K filename switch to specify that the DOS prompt in Microsoft Windows should use a startup file other than AUTOEXEC.BAT. Open the DOSPRMPT.PIF file (using the PIF Editor) and type /K filename in the Optional Parameters box.

See Also

CALL and SHELL=

Loading a Secondary Command Processor” in Chapter 10

COMP 1.0 to 5.0—External

COMP 1.0 to 5.0—External
COMP 1.0 to 5.0—External
COMP 1.0 to 5.0—External
COMP 1.0 to 5.0—External

You can use COMP to compare two sets of disk files of the same name and length. The FC command, which is discussed later in this command reference, provides many of the same capabilities as COMP. COMP is included on the DOS 6 Supplemental Disk, not in the standard DOS 6.0 package.

Syntax

COMP  pathname1  pathname2  /D  /A  /L  /N=x  /C

Parameters and Switches

pathname1Indicates the drive, path, and filename for the primary set of files. Wildcards are allowed. If no filename is specified, all files (*.*) are assumed.
pathname2Indicates the drive, path, and filename for the secondary set of files. Wildcards are allowed. If no filename is specified, all files (*.*) are assumed.
/DDisplays differences in hexadecimal format.
/ADisplays differences as alphanumeric characters.
/LDisplays the line number in which the difference occurred.
/N=xCompares the first x number of lines of a file.
/CPerforms a non–case-sensitive comparison of files.

Notes

  1. If you do not enter a filename, all files for that set, whether primary or secondary, are compared (which is the same as typing *.*). However, only the files in the secondary set with names that match filenames in the primary set are compared.

  2. If you do not enter a drive, path, or filename, COMP prompts you for the primary and secondary file sets to compare. Otherwise, the correct disks must be in the correct drive if you are comparing files on disks. COMP does not wait for you to insert disks if you use both primary and secondary filenames.

  3. After 10 mismatches (unequal comparisons) between the contents of two compared files, COMP ends the comparison and aborts.

  4. A more versatile utility for file comparison is FC, discussed later in this command reference. COMP no longer is distributed with the standard DOS package.

Messages

Compare error at offset xxxxxxxx

Information: The files that you are comparing are not the same. The difference occurs at xxxxxxxx bytes from the start of the file. The number provided is in hexadecimal format, base 16. The values of the differing bytes in the files also are displayed in hexadecimal format.

Files are different sizes

Warning: You asked COMP to compare two files of different lengths. Because COMP compares only files of the same size, COMP skips the comparison.

10 Mismatches - ending compare

Warning: COMP found 10 mismatches between the two files you compared. COMP, therefore, assumes that no reason exists to continue, and the comparison is aborted.

See Also

FC

CONFIG

CONFIG re-creates the STACKER.INI file. It searches for all the STACVOL files on all the Stacker drives, disables the current STACKER.INI file, and creates a new one.

Syntax

CONFIG drive: [-]drivelist /a=drivelist /c=filename /i=filename /s=dirname
/a /a-  /d /d- /?

Parameters and Switches

drive:Specifies the drive in which to update the configuration files.
[-]drivelistSpecifies a list of removable drives with no colons. A minus sign in front of the drive letter removes the automount specification for the drive.
/a=drivelistUpdates automount specifications for these removable drives in the configuration file.
/c=filenameUpdates the named file instead of CONFIG.SYS.
/i=filenameUpdates the named file instead of STACKER.INI.
/s=dirnameUses dirname as the Stacker directory in the new configuration file.
/aUpdates configuration files to turn on automount for removable drives.
/a-Updates configuration files to turn off automount for removable drives.
/dAdds the Stacker DPMS (DOS Protected Mode Services) driver to configuration files.
/d-Removes the Stacker DPMS driver from configuration files.
/?Displays the abbreviated online help.

COPY 1.0 and later—Internal

COPY 1.0 and later—Internal
COPY 1.0 and later—Internal

You can use the COPY command to copy files between disk drives or between drives and devices. COPY enables you to keep or change the filenames and also enables you to combine (concatenate) files.

Syntax

The syntax used to copy files from one place to another is very simple:

COPY  source  destination  /V  /Y  /Y-

You can tell DOS what kinds of files you are copying by using the /A (ASCII) and /B (BINARY) parameters:

COPY  /A  /B  source  /A  /B  destination  /A  /B  /V  /Y  /Y-

By adding plus signs, you can specify more than one source file and have them all combined (concatenated) into one destination file:

COPY  /A  /B  source  /A  /B  +source2  /A  /B  +... /A  /B  destination
/A  /B  /V  /Y  /Y-

Parameters and Switches

sourceSpecifies the file or files that you want to copy. A full pathname (for example, drive:path... filename.ext) can be specified, and wildcards are allowed. This parameter is required and must include a filename (*.* is not assumed). To combine files, specify more than one source pathname and separate them with plus signs (+).
destinationSpecifies the location and optionally the filename you want to copy to. A full pathname can be specified, although normally only a drive and/or path is included. Wildcards are allowed when a filename is specified. If this parameter is omitted, the current drive and subdirectory are used as the destination.
/VVerifies that the copy was recorded correctly. Similar to setting VERIFY ON for this COPY operation.
Parameters and SwitchesparametersCOPY commandswitchesCOPY commandCOPY commandparameters/switchescommandsCOPYparameters/switches /YSpecifies that you want COPY to overwrite files without prompting you for confirmation. Including this parameter overrides any setting specified with the COPYCMD environment variable.
Parameters and SwitchesparametersCOPY commandswitchesCOPY commandCOPY commandparameters/switchescommandsCOPYparameters/switches /-YSpecifies that you want COPY to prompt you for confirmation before overwriting any files, even if the command is run from within a batch file. Including this parameter overrides any setting specified with the COPYCMD environment variable.

The /A and /B switches create different effects on the source and destination files. Normally, you don't have to specify these switches because DOS's default assumptions are correct.

For the source file:

/ATreats the file as an ASCII (text) file. The command copies all the information in the file up to, but not including, the end-of-file marker (Ctrl+Z). Data after the end-of-file marker is ignored. This is the default for copy operations that combine multiple files.
/BCopies the entire file (based on size, as listed in the directory) as though the file were a program file (binary1). All end-of-file markers (Ctrl+Z) are treated as normal characters, and EOF characters are copied. This is the default for copy operations that do not combine multiple files.

For the destination file:

/AAdds an end-of-file marker (Ctrl+Z) to the end of the ASCII text file at the conclusion of the copying process. This is the default for copy operations that combine multiple files.
/BDoes not add the end-of-file marker to this binary file. This is the default for copy operations that do not combine multiple files.

Rules

Adhere to the following rules when you are copying files for which both the source and the destination are given:

  1. These rules apply to the filename:

    • You must provide either a pathname or a filename. Wildcards are allowed in the source filename. If you do not provide a filename but provide a pathname for the source, DOS assumes *.*.

    • If you do not provide a destination filename, the copied file has the same name, creation date, and creation time as the source file.

  2. You can substitute a device name for the complete source or destination name.

  3. When you copy between disk drives, COPY assumes that binary files are copied (as though you used the /B switch).

  4. When you copy to or from a device other than a disk drive, COPY assumes that ASCII files are copied (as though you used the /A switch).

  5. An /A or /B switch overrides the default settings for COPY.

Adhere to the following rules when you are copying files and only one file is specified:

  1. The file specification you use (d1:path1filename1.ext1) is the source. This specification must have one or both of these items:

    • A valid filename. Wildcards are allowed.

    • A drive name, pathname, or both. If you provide only one name, that name must differ from the current drive name or pathname. If you provide both names, at least one name must differ from the current drive name or pathname.

  2. The source cannot be a device name.

  3. The destination is the current drive and current directory.

  4. The copied files use the same names as the source files.

  5. COPY assumes that binary files are copied (as though you used the /B switch).

Adhere to these rules when you concatenate files:

  1. The destination file is the last file in the list unless you add a plus sign (+) before that filename. If you do not specify a destination filename, the first source name becomes the destination name.

  2. If you do not provide a drive name, DOS uses the current drive.

  3. If you do not provide a path, DOS uses the current directory.

  4. These rules apply to source files:

    • You must provide a valid filename. Wildcards are allowed, but using them can be dangerous. If you do not provide a destination filename, DOS uses the first filename as the destination filename.

    • After the first filename, any additional source file specifications must be preceded by a plus sign (+).

  5. These rules apply to the destination file:

    • You can use only one destination file specification. If you provide a destination without wildcards, DOS uses that name for the destination file. If you provide a destination filename with wildcards, DOS uses the first source filename for the destination file.

    • If you do not provide a destination, DOS uses the first source file as the destination. The first file that matches the wildcard filename is used as the destination file if you used a wildcard as part of the first source filename, and the files to be joined are appended to the first source file.

Notes

Notes
  1. The COPY command, when run from the command line, now prompts you for confirmation before overwriting files. However, to avoid forcing you to rewrite all your batch files, COPY does not prompt you before overwriting a file when it is run from a batch file.

    If you don't like the way COPY now behaves, you can change it by defining an environment variable named COPYCMD. Setting COPYCMD equal to /Y forces COPY to act as it has in all previous versions of DOS, never prompting for confirmation before overwriting a file. If you set COPYCMD equal to /-Y, COPY always prompts for confirmation—even when it is run from within a batch file.

  2. The meanings of the /A and /B switches depend on their positions in the line. The /A or /B switch affects the file that immediately precedes the switch and all files that follow the switch until DOS encounters another /A or /B switch. When you use one of these switches before a filename, the switch affects all following files until DOS encounters another /A or /B switch that contradicts the earlier switch.

  3. Use XCOPY to copy zero-length files and all of a directory's files and subdirectories.

  4. To change the time and date of a file to the current time and date, enter the following command:

    COPY  /B  filename.ext+,,
    
  5. You can create a text file by copying what you type to a file. To do so, use the following format:

    COPY CON filename.ext
    

    Everything you type is then copied to filename.ext until you press Ctrl+Z or F6.

Messages

Cannot do binary reads from a device

Error: If you specify a device name such as CON or COM1 as the source in a COPY command, you cannot include the /B switch. These devices operate in character mode only. Try the command again without specifying the /B switch.

Content of destination lost before copy

Error: You may see this message when you are combining files with the COPY command. If the destination file has the same name as any of the source files (except the first) that you've specified, COPY overwrites that source file before it has a chance to read it. When this message appears, at least one of your source files has been overwritten, and the file is gone for good. Be very careful combining files with the COPY command, especially if you are using wildcards in the source or destination parameters.

File cannot be copied onto itself

Error: COPY tried to copy a file onto itself. The destination file must have a different filename or be in a different subdirectory than the source file. Change the destination parameter you specified and try the COPY command again.

See Also

MOVE, REN or RENAME, and VERIFY

Copying Files” in Chapter 8

COUNTRY= 3.0 and later—Internal

COUNTRY= 3.0 and later—Internal
COUNTRY= 3.0 and later—Internal

You can use the COUNTRY= command to instruct DOS to use certain country-specific conventions when it displays or accepts dates, times, numbers, currency, sort ordering, and case conversions. So that transitions from one set of conventions to another can be as painless for the user as possible, application programs are encouraged to use this country-specific information. You can use COUNTRY= only in your CONFIG.SYS file.

Syntax

COUNTRY=country_code,code_page,pathfilename

Parameters and Switches

country_codeA three-digit number that indicates the country whose conventions you want to use. Typically, the number is the international long-distance telephone code for that country. (See Chapter 14, “Understanding the International Features of DOS.”)
code_ pageThe code page (character set) to use for the country that you are specifying. If no code page is specified, the default code page for that country is used. You can switch between the default and alternative code pages by using MODE or CHCP.
pathfilenameThe full path and filename of the file that contains country-specific information; it is usually COUNTRY.SYS. If no filename is specified, COUNTRY= looks for COUNTRY.SYS in the root directory of the startup drive.

Notes

  1. COUNTRY= affects the following items:

    • Date and time formats, both for display and input. DOS commands that use the country setting for date and time include DATE, TIME, RESTORE, DIR, PROMPT, and XCOPY.

    • The thousands separator and decimal character used in numbers. In the U.S., they are a comma and period, respectively (for example, 1,024.45).

    • The location and symbol used for currency.

    • Upper- to lowercase conversions. For each character set (code page), a table of case conversions is maintained by DOS.

    • Alphabetical sorting order for characters in the set. This allows accented characters to sort into their proper places.

    Tip

    Always include the full path to the COUNTRY.SYS file when you use the COUNTRY= command. In this way, you can keep the COUNTRY.SYS file in a more logical place, such as in your C:DOS directory (which is the place Setup puts it, anyway).

  2. The default country code is 001 (United States), code page 437, for versions of MS-DOS sold in the U.S.

  3. Not all application programs are written to support the international features of DOS, and many ignore the COUNTRY= settings.

  4. The MS-DOS distribution disks include a special version of COUNTRY.SYS named COUNTRY.ICE (COUNTRY.IC_ in its compressed form) that contains information supporting an Icelandic keyboard and character set. For details, see the README.TXT file distributed with DOS 6.

  5. Microsoft has special versions of MS-DOS available for other languages and countries not listed in the country codes table, such as Arabic, Israel, Japan, Korea, the People's Republic of China, and Taiwan.

  6. It is often best to leave out the code page argument in the COUNTRY= line and let DOS use the default code page. To do so, just type two commas before you enter the location and name of the COUNTRY.SYS file. (See the first example that follows.)

Examples

To set the country to France, insert the following line in your CONFIG.SYS file:

COUNTRY=033,,C:DOSCOUNTRY.SYS

Notice that two commas are used so that DOS selects the default code page, which in this case is code page 850. Later, you could change to code page 437 by using the CHCP command.

The following line sets the country to the United States with code page 437 active:

COUNTRY=001,437,C:DOSCOUNTRY.SYS

In the U.S., this example is almost the same as not using the COUNTRY= command at all, except that you now have the ability to switch to code page 850 if you want to.

See Also

MODE device CP, CHCP, NLSFUNC, and KEYB

Chapter 14, “Understanding the International Features of DOS”

COUNTRY.SYS (see COUNTRY=)

Despite the .SYS extension, COUNTRY.SYS is not a device driver. It is a file that contains country information—such as code page symbol sets—used by the COUNTRY= command. A similar file, containing information needed for an Icelandic configuration, is located in the file COUNTRY.ICE on the MS-DOS 6 distribution disks. (For details on setting up an Icelandic configuration, see the README.TXT file distributed with DOS 6.)

Note

Do not attempt to load COUNTRY.SYS into memory by placing it in a DEVICE= or DEVICEHIGH= command in your CONFIG.SYS file. Your computer will lock up, and you will have to reboot from a floppy disk.

See Also

COUNTRY= and NLSFUNC

Chapter 14, “Understanding the International Features of DOS”

CPBACKUP

CPBACKUP

CPBACKUP makes a backup copy of data to disks, tape, or a network drive using full, incremental, differential, or unattended methods. Data can be compressed, encrypted, and checked for viruses as it is backed up.

Syntax

CPBACKUP d: setname filespec... /date=mmddyy-mddyy   /exattr=hsr /full|/inc|
/sep|/copy|/fullerase|/dif /drive=tape |/drive=d:n /addr=base-i-d /rate=rate
/no /r setupfilename|filespec /ecc|/noecc /save|/nosave /sf|/nonsf /mtask /?
  /video /video options

Parameters and Switches

d:Specifies the drive to back up or restore to. This setting overrides any drive that is specified in the CPBACKUP.CFG file and the setup file.
setnameLoads the specified setup file. When CPBACKUP is started with a setup file, the directory tree and file list are always visible.
filespec...Accepts any valid DOS filespec.
/date=mmddyy-mmddyySpecifies dates of files to back up.
/exattr=hsrExcludes (h)idden, (s)ystem, and (r)ead-only attributes.
/fullMarks full backup as being backed up.
/copyDoes not mark full backup as backed up.
/fulleraseSpecifies a full backup after the tape is erased.
/incSpecifies an incremental backup and appends to the full backup.
/sepSpecifies a separate incremental backup.
/difSpecifies a differential backup.
/drive=tape |/drive=d:nSpecifies media as tape and drive size to back up to (360, 720, 1200, or 1400).
/addr=base-i-dSpecifies I/O addresses for a tape drive.
 baseHexadecimal base address.
 iInterrupt request (IRQ).
 dDirect memory access (DMA) channel.
/rate=rateSets the data rate (rate=1000KB per second, 500KB per second or 250KB per second) that the controller must support.
/noSpecifies not to use overlapped input and output. Use of this switch turns off the use of simultaneous hard disk and disk DMA.
/rSpecifies that the restore mode is to start automatically using the specifications in the .CFG file.
/r setupfilenameStarts backup in restore mode and loads the settings saved in the setup file. This parameter must be specified before any others.
/r filespecRestores specific files based on the filespec parameter with /r.
/saveSaves history to the hard disk.
/nosaveDoes not save history to the hard disk.
/eccUses error correction.
/noeccDoes not use error correction.
/sfUses standard formatting.
/nonsfUses nonstandard formatting.
/mtaskProtects files from being changed in multitasking modes.
/?Displays help for the DOS command prompt options.
/video optionsDisplays help for the following video and mouse selections:
 /inUses the default color scheme.
 /bwUses black and white.
 /monoUses monochrome color scheme (IBM monochrome).
 /lcdUses an LCD color scheme (for laptops).
 /ffSpeeds up the display.
 /bfSpecifies a BIOS font.
 /nfIndicates no fonts; graphics characters are not to be used.
 /ngmIndicates that a character mouse pointer is used.
 /leSpecifies a left-handed mouse.
 /imIgnores mouse.
 /ps2Resets the mouse hardware on a PS/2.

Notes

Commands used to back up data require a compatible command to restore the data.

See Also

CPSCHED, SCHEDULE

CPBDIR

CPBDIR

CPBDIR determines the number of disks and the correct order of a high-speed or medium-speed disk backup and gives information about how the backup was made.

Syntax

CPBDIR drive: /x /v /?]

Parameters and Switches

drive:Specifies the drive containing the CPBACKUP disk to view.
/xDisplays extended information about the disk.
/vSpecifies that the disk is to be verified.
/?Displays the abbreviated online help.

See Also

CPBACKUP

CPSCHED

CPSCHED
CPSCHED

CPSCHED activates CPSCHED.EXE, which is the memory-resident portion of the Scheduler program. The Scheduler program schedules other DOS programs to run automatically at a preset date and time.

Syntax

CPSCHED /u /low /?

Parameters and Switches

/uRemoves the currently loaded resident version of CPSCHED from memory.
/lowSpecifies that CPSCHED not be loaded into the upper memory blocks.
/?Displays the abbreviated online help.

See Also

SCHEDULE

CRC

CRC

The CRC command gives a Cyclic Redundancy Check (CRC) number for a filename. This number uniquely identifies a file. CRC ensures that a file transfer has been completed without error. It also can be applied to disk copy operations, periodic checks for file corruption, and more.

Syntax

CRC drive:path filespec /s /p /?

Parameters and Switches

drive:path filespecSpecifies the location and name of the file for which the CRC number is required.
/sProcesses files in all directories in the specified path.
/pPauses after each screen of information.
/?Displays the abbreviated online help.

CREATE

CREATE
CREATE

The CREATE command creates an empty Stacker drive using available disk space or a RAM drive.

Syntax

CREATE drive:stacvol.xxx /c=n /r=n.n /s=sss.s /m /?

Parameters and Switches

drive:Specifies the drive letter of the uncompressed drive.
stacvol.xxxIndicates the name of the stacvol file to create. The default is STACVOL.DSK.
/c=nSets cluster size, in kilobytes, for the Stacker drive. n can be 4, 8, 16, or 32.
/r=n.nSets the maximum size of the Stacker drive by using an estimated compression ratio of n.n to 1.
/s=sss.sAllocates the amount of space in megabytes for the stacvol file.
/mSpecifies monochrome display mode be used.
/?Displays the abbreviated online help.

See Also

RAMDRIVE.SYS

CSCRIPT

CSCRIPT

The CSCRIPT command-line tool starts the Windows Scripting Host. It runs batch files written in the Visual Basic Scripting Edition or JScript languages. These batch files can be used to automate common tasks or create macros.

Syntax

CSCRIPT /filename //i //b //h:cscript //:wscript //logo //nologo //s  //t:nn
/arguments //?

Parameters and Switches

/filenameSpecifies the name of the VBScript or JScript file to run.
//iSets interactive mode so that the user can respond to any prompts in the script.
//bSets batch mode, which doesn't display errors or script prompts.
//h:cscript and //h:wscriptChanges the default scripting host to cscript or wscript (the Windows version), respectively.
//logo and //nologoDisplays the scripting host logo or suppresses it from displaying, respectively.
//sSaves the CSCRIPT command-line options for the current Windows user.
//t:nnLimits script running time to nn seconds.
//?Displays abbreviated online help.

Notes

CSCRIPT was unavailable with the first Windows 95 release. It first appeared with Windows 95 OSR2.

CTTY 2.0 and later—Internal

CTTY 2.0 and later—Internal
CTTY 2.0 and later—Internal

You can use the CTTY command to change the standard input and output devices to an auxiliary console or to change the input and output devices back from an auxiliary console to the keyboard and video display.

Syntax

CTTY  device

Parameters and Switches

deviceThe device you want to use as the new standard input and output device. This name must refer to a valid DOS character device. Normally, CON is the standard input and output device, which allows you to enter standard input from the keyboard and view standard output on the display. This parameter is required.

Notes

  1. The device must be a character-oriented device capable of both input and output. DOS supplies several such devices, including AUX, COM1, COM2, COM3, COM4, CON, LPT1, LPT2, LPT3, and PRN.

  2. Typing a colon (:) after the device name is optional. If you don't include a device in the command line for CTTY, an Invalid device message is displayed.

  3. CTTY does not affect any other form of redirected I/O or piping. For example, the < (redirect input symbol), > (redirect output symbol), and | (pipe-between-programs character) work as usual.

  4. The CTTY command is designed so that you can use a terminal or teleprinter—rather than the normal keyboard and video display—for console input and output. This versatility has little effect on most PC users.

  5. To return control to the standard console, type CTTY CON on the auxiliary console. If the auxiliary console isn't working or you don't have one connected to your computer, you must reboot to re-enable the standard console.

  6. The CTTY command does not affect programs that input and output directly to hardware. Most major software applications fall into this category, so the CTTY command is rarely useful with them.

  7. COMMAND also can be used to change the device that DOS uses for standard input and output.

  8. Do not attempt to reconfigure Windows with the CTTY command. Windows can be configured to use devices other than the keyboard and video display, but not with the CTTY command.

See Also

COMMAND

The CTTY Command” in Chapter 13

CURSOR.EXE

CURSOR.EXE

CURSOR.EXE makes a large cursor that is easier to see on LCD screens. You can even change the blink rate.

Syntax

CURSOR /Snn /C OFF /H

Parameters and Switches

/SnnSets the cursor blink interval to nn/20th of a second, where nn can be from 1 to 20.
/CEnsures compatibility with some CGA screens.
OFFReturns to using the built-in hardware cursor.
/HDisplays abbreviated help.

CVT.EXE

CVT.EXE
CVT.EXE

In Windows 95 OSR2 and Windows 98, CVT.EXE converts a drive from FAT16 format to FAT32. The minimum drive size to convert to FAT32 is 512MB.

Syntax

CVT driveletter: /cvt32

Parameters and Switches

driveletterThe letter of the drive to be converted.
/cvt32As a safety measure, this parameter must be included to convert a drive. It helps prevent unintentional conversions.

Notes

When a drive has been converted to FAT32, Windows and DOS cannot convert it back. Some third-party utilities, such as PartitionMagic, can convert from FAT32 to FAT16. In DOS, the only way to do so is to reformat the drive, destroying all the data in the process.

If you use this drive with other operating systems that are not FAT32-compatible, they cannot read the converted drive.

DATAMON

DATAMON

DATAMON provides protection against accidental file deletion. You can choose from two options to track deleted files: Delete Tracker or Delete Sentry. Delete Tracker saves the name of each deleted file and a list of the cluster numbers it occupied in a hidden file called PCTRACKR.DEL. Delete Sentry saves each deleted file in a hidden directory called SENTRY.

Syntax

DATAMON /load /low /u /s /sentry+ /sentry- /tracker+ /tracker- /?

Parameters and Switches

/loadLoads the Data Monitor program using the options in the DATAMON.INI file.
/lowLoads the Data Monitor program into conventional memory even if upper memory is available.
/uRemoves the Data Monitor program from the computer's memory.
/sIndicates which tracking option is active in the Data Monitor program.
/sentry+Activates the Delete Sentry option.
/sentry-Deactivates the Delete Sentry option.
/tracker+Activates the Delete Tracker option.
/tracker-Deactivates the Delete Tracker option.
/?Displays the abbreviated online help.

Notes

Either the Delete Sentry or Delete Tracker option can be used at a time. DATAMON has to be added with one of the options to the AUTOEXEC.BAT file.

To disable the option temporarily, use the following commands:

datamon /sentry-

datamon /tracker-

DATAMON should be turned off before starting the Stacker compression program and before running Stacker uncompression.

DATE 1.0 and later—Internal

DATE 1.0 and later—Internal
DATE 1.0 and later—Internal

The DATE command can display and set the current date for your computer. Normally, DOS and your computer's hardware keep the date set properly for you. If you don't have an AUTOEXEC.BAT file, DOS prompts you to enter the current date each time your computer reboots.

Syntax

DATE  mon-day-year

Parameters and Switches

mon-day-year The current date in a format consistent with the COUNTRY= setting in your CONFIG.SYS file. mon can be any number from 1 to 12. day can be any number from 1 to 31. year can be any number from 80 to 99 or from 1980 to 2099. In the United States, legal delimiters are the hyphen, period, or slash (/). If this parameter is omitted, the current date is displayed, and you are prompted to enter a new date.

Notes

  1. The date entry and display correspond to the COUNTRY setting in your CONFIG.SYS file. If you are unsure of what format to use for the date, enter the DATE command with no parameters. DOS displays the current date in an appropriate format, and you can use it as a guide when entering a new date at the prompt.

  2. When you boot the computer, DOS issues the DATE and TIME commands to set the system clock. If you placed an AUTOEXEC.BAT file on the boot disk, DOS does not display a prompt for the date or time. You can include the DATE or TIME commands in the AUTOEXEC.BAT file to have these functions set when DOS boots.

  3. Most computers contain a real-time clock running on a battery. The date should stay set properly as you turn your computer on and off, but it's a good idea to check the date occasionally.

  4. When you create or update a file, DOS updates the directory using the current date in the computer. This date shows which copy is the latest revision of the file. Several DOS commands (such as XCOPY) can use the date in selecting files.

  5. The day-of-year calendar uses the time-of-day clock. If you leave your system on overnight, the day advances by one at midnight. DOS makes appropriate calendar adjustments for leap years.

See Also

COUNTRY= and TIME

Changing the Date and Time” in Chapter 10

DBLSPACE 6.0 and later—External

DBLSPACE 6.0 and later—External
DBLSPACE 6.0 and later—External
DBLSPACE 6.0 and later—External

DBLSPACE starts the full-screen interface to the DoubleSpace disk-compression utility. DoubleSpace automatically compresses information on hard disks or floppy disks and configures many aspects of the compression process. Compression enables you to put more programs and information on a disk.

With switches and parameters, you can control each aspect of DoubleSpace from the DOS command line. The many combinations are covered in the sections that deal with specific DoubleSpace commands.

MS-DOS 6.2 brought a number of new features to DoubleSpace. DoubleSpace can now share the HMA with MS-DOS, thereby decreasing DoubleSpace's size in memory from 43KB to 33KB (or 37KB if the new automount feature is enabled). A DoubleGuard feature verifies the integrity of your data before writing it to disk. Also added is the Uncompress command, which enables you to uncompress a DoubleSpace drive easily. Finally, removable disks can now be automounted, enabling you to work with compressed floppy and cartridge disks from Windows.

Syntax

DBLSPACE

Notes

  1. The first time you use the DBLSPACE command, DoubleSpace Setup starts. The setup program enables you to compress one or more hard disks and loads DBLSPACE.BIN into memory. (DBLSPACE.BIN is the device driver that provides access to compressed drives.) Subsequent uses of the DBLSPACE command start the full-screen interface. The full-screen interface and the DBLSPACE switches and parameters give you control of all DoubleSpace operations.

  2. DoubleSpace creates a large hidden file, called a compressed volume file (CVF), on one of your drives, called the host drive, and presents that drive as a new drive, called a compressed drive. For example, you might make a CVF on your drive D that results in a compressed drive E; you and your programs then can use the files on the compressed drive without taking any special action.

  3. CVF names use the format DBLSPACE.xxx, where xxx is a number (such as 000 or 001).

  4. Notes

DBLSPACE/AUTOMOUNT 6.2—External

DBLSPACE/AUTOMOUNT 6.2—External
DBLSPACE/AUTOMOUNT 6.2—External

The DBLSPACE /AUTOMOUNT command enables or disables automatic mounting of removable drives such as floppy and cartridge disks. This command changes the automount settings saved in the DBLSPACE.INI file. The default setting is for DoubleSpace to automatically mount removable drives.

Automounting makes it possible for you to change compressed floppy and cartridge disks from Microsoft Windows. You cannot use the DBLSPACE /AUTOMOUNT command while Windows is running.

Syntax

DBLSPACE  /AUTOMOUNT=drives

Parameters and Switches

drivesThe removable drives that you want DoubleSpace to automatically mount. Enter each drive letter—without a colon—and with no spaces in between. You also can specify 0 to disable automatic mounting or 1 to automatically mount all removable drives. The default setting is 1.

Notes

  1. For the automount setting to take effect, you must restart your computer.

  2. Specifying 0 decreases the size of DoubleSpace in memory by approximately 4KB.

  3. The parameters you specify are written to the AUTOMOUNT= line of the DBLSPACE.INI file.

Examples

To enable automounting of only two floppy drives A and B, enter the following command:

DBLSPACE  /AUTOMOUNT=AB

To disable automounting of all removable drives (and save a little memory), enter the following command:

DBLSPACE  /AUTOMOUNT=0

DBLSPACE/CHKDSK 6.0 only—External

DBLSPACE/CHKDSK 6.0 only—External
DBLSPACE/CHKDSK 6.0 only—External

DBLSPACE /CHKDSK checks the structure of a compressed drive. The command reports errors (such as lost clusters and cross-linked files) and can correct some errors. If you are running DOS 6.2, this command is not available; you should use the SCANDISK utility instead.

Syntax

DBLSPACE  /CHKDSK  /F  drive:

or

DBLSPACE  /CHK  /F  drive:

Parameters and Switches

/F DoubleSpace attempts to repair any errors it finds rather than simply report them.
drive: The letter of the compressed drive you want to check. The default is the current drive.

Notes

If you run CHKDSK on a compressed drive, DBLSPACE /CHKDSK is invoked automatically after CHKDSK finishes checking the integrity of the drive's file allocation table (FAT).

See Also

CHKDSK and SCANDISK

Understanding DoubleSpace” in Chapter 6

DBLSPACE/COMPRESS 6.0 and later—External

DBLSPACE/COMPRESS 6.0 and later—External
DBLSPACE/COMPRESS 6.0 and later—External

DBLSPACE /COMPRESS compresses the files on an existing hard disk, floppy disk, or other removable disk, making more space available.

Syntax

DBLSPACE  /COMPRESS  drive:  /NEWDRIVE=host:  /RESERVE=size  /F

or

DBLSPACE  /COM  drive:  /NEW=host:  /RES=size  /F

Parameters and Switches

drive: The uncompressed (host) drive that you want to compress.
/NEWDRIVE=host: The uncompressed (host) drive after compression. This parameter can be abbreviated to /NEW=host:. If you omit the /NEWDRIVE=host: parameter, DoubleSpace uses the next available drive letter. Enter DBLSPACE /LIST to see a list of drive assignments.
/RESERVE=size The amount of space (in megabytes) to be left uncompressed on the host drive. This parameter can be abbreviated to /RES=size. The default is 2MB for hard disks and 0 for floppy disks.
[ic:C9]/F DoubleSpace doesn't display the compression statistics screen when compression is complete but simply returns to the DOS command prompt. Use this switch when you are running DBLSPACE /COMPRESS from a batch file.

Notes

  1. A drive must contain some free space before DoubleSpace can compress it. If you want to compress your boot drive, for example, it must have at least 1.2MB of free space. Other hard disks and floppy disks must have at least 1.1MB of free space (650KB for DOS 6.0).

  2. DoubleSpace cannot compress 360KB floppy disks because they do not have enough free space.

  3. A compressed floppy disk must be mounted before you can use it. (For more information, see the DBLSPACE /MOUNT command.)

  4. If you want to read a compressed floppy disk on another computer, that computer must be running DoubleSpace as well.

  5. Your system probably needs some uncompressed disk space because some files (such as Windows permanent swap files) do not work properly if you store them on a compressed drive.

Examples

To compress drive D so that the compressed part is known as D and the uncompressed (host) part is known as E, and contains 3MB of uncompressed free space, use the following:

DBLSPACE  /COMPRESS  D:  /NEWDRIVE=E:  /RESERVE=3

See Also

DBLSPACE /CREATE, DBLSPACE /LIST, and DBLSPACE /MOUNT

Understanding DoubleSpace” in Chapter 6

DBLSPACE/CREATE 6.0 and later—External

DBLSPACE/CREATE 6.0 and later—External
DBLSPACE/CREATE 6.0 and later—External

DBLSPACE /CREATE creates a new compressed drive by using free space on an uncompressed drive. DBLSPACE /CREATE can be used only on nonremovable media, such as a hard drive.

Syntax

DBLSPACE  /CREATE  drive:  /NEWDRIVE=host:  /RESERVE=size  /SIZE=size

or

DBLSPACE  /CR  drive:  /N=host:  /RE=size  /SI=size

Parameters and Switches

drive:

The uncompressed (host) drive that contains the free space from which the new compressed drive will be created.

/NEWDRIVE=host:

The new compressed drive. The default is the next available drive letter. This parameter can be abbreviated to /N=host:.

/RESERVE=size

The amount of space (in megabytes) to be left uncompressed on the host drive. This parameter can be abbreviated to /RE=size. To make the compressed drive as large as possible, specify a size of 0. If you omit both the /RESERVE and /SIZE parameters, DoubleSpace reserves 1MB of uncompressed space on your disk. You cannot specify /RESERVE if you specify /SIZE.

/SIZE=size

The size (in megabytes) of the compressed volume file (CVF) that will be created on the host drive. This parameter can be abbreviated to /SI=size. Depending on how well your files compress, the CVF can hold approximately twice as much information as you specify for size. You cannot specify /SIZE if you specify /RESERVE.

Notes

  1. The DBLSPACE /CREATE command creates a compressed volume file (CVF) with the name DBLSPACE.001 on the drive specified with the drive: parameter. If this file already exists, the 002 extension is added, and then the 003 extension is added, and so on.

  2. When you use the DBLSPACE /CREATE command, unlike the DBLSPACE /COMPRESS command, the letter with which you refer to the host drive does not change.

  3. You can use the DBLSPACE /CREATE command to create additional CVF files on the host drive of a disk compressed with the DBLSPACE /COMPRESS command. However, after you have created a CVF on a disk drive with the DBLSPACE /CREATE command, you cannot use the DBLSPACE /COMPRESS command on that drive without first deleting the existing CVF files. DBLSPACE /COMPRESS reassigns the drive letter you will use when accessing the host drive; it cannot do so if the host drive contains compressed drives.

  4. You cannot use DBLSPACE /CREATE on removable media such as floppy disk drives or cartridge hard drives. To compress a floppy disk or cartridge hard disk, use the DBLSPACE /COMPRESS command.

  5. Microsoft recommends that you use DBLSPACE /CREATE rather than DBLSPACE /COMPRESS to create a compressed drive on a RAM disk.

  6. Your system probably needs some uncompressed disk space because some files (such as Windows permanent swap files) do not work properly when you store them on a compressed drive.

Examples

To create a compressed drive that has the next available drive letter as its name and uses all the available free space on the uncompressed drive D, use the following:

DBLSPACE  /CREATE  D:  /RESERVE=0

To create a new compressed drive F that uses 20MB of free space on the uncompressed drive D, enter this command:

DBLSPACE  /CREATE  D:  /NEWDRIVE=F:  /SIZE=20

See Also

DBLSPACE /COMPRESS, DBLSPACE /LIST, and DBLSPACE /MOUNT

Understanding DoubleSpace” in Chapter 6

DBLSPACE/DEFRAGMENT 6.0 and later—External

DBLSPACE/DEFRAGMENT 6.0 and later—External
DBLSPACE/DEFRAGMENT 6.0 and later—External

DBLSPACE /DEFRAGMENT defragments a compressed drive by moving all the drive's free space to the end of the drive. This command enables you to get the maximum reduction in the size of the drive when you issue the DBLSPACE /SIZE command.

Syntax

DBLSPACE  /DEFRAGMENT  drive:  /F

or

DBLSPACE  /DEF  drive:  /F

Parameters and Switches

drive: Specifies the compressed drive that you want to defragment. The default is the current drive.
Parameters and SwitchesparametersDBLSPACE /DEFRAGMENT commandswitchesDBLSPACE /DEFRAGMENT commandDBLSPACE /DEFRAGMENT commandparameters/switchescommandsDBLSPACE /DEFRAGMENTparameters/switches /F Specifies that you would like the DoubleSpace drive defragmented more fully.

Notes

Notes
  1. Unlike defragmenting an uncompressed hard disk, defragmenting a DoubleSpace disk does not improve the disk's performance. Defragmenting only moves the free space to the end of the compressed drive so that DBLSPACE /SIZE can be most effective.

  2. You cannot tell how badly fragmented a compressed drive is before you decide to defragment it.

  3. How long defragmenting takes depends on many factors, including the speed of your computer, the size of your compressed drive, and the speed of your disk drive. The process can take a long time—perhaps several hours.

  4. You can stop the defragmentation process at any time by pressing Esc.

  5. To thoroughly defragment a compressed drive, perform the following steps. First, correct any errors on the host and compressed drives by using the ScanDisk utility. Next, defragment the host drive by using the DEFRAG command. Then, defragment the compressed drive by using the DBLSPACE /DEFRAGMENT /F command. Finally, collect all the free space at the end of the compressed drive by entering the DBLSPACE /DEFRAGMENT command. (Don't specify the /F switch.)

See Also

CHKDSK and SCANDISK

Understanding DoubleSpace” in Chapter 6

DBLSPACE/DELETE 6.0 and later—External

DBLSPACE/DELETE 6.0 and later—External
DBLSPACE/DELETE 6.0 and later—External
DBLSPACE/DELETE 6.0 and later—External

The DBLSPACE /DELETE command unmounts a compressed drive and deletes its compressed volume file (CVF) from the host drive. If you simply want to delete all the files on a compressed drive, use the DBLSPACE /FORMAT command.

Syntax

DBLSPACE  /DELETE  drive:

or

DBLSPACE  /DEL  drive:

Parameters and Switches

drive:

The compressed drive that you want to delete. Note that you should specify the compressed drive, not the host drive.

Notes

  1. Deleting a compressed drive deletes all the files in that drive.

  2. If you accidentally delete a compressed drive, you may be able to restore it by using UNDELETE because a compressed drive is a file on one of your uncompressed disks (its host drive). The files corresponding to compressed drives are hidden and have names in the format DBLSPACE.xxx, where xxx is a number such as 000 or 001. If you can undelete the associated file, you can remount it by entering DBLSPACE /MOUNT.

  3. DoubleSpace does not allow you to delete a compressed drive C.

See Also

DBLSPACE /FORMAT and UNDELETE

Understanding DoubleSpace” in Chapter 6

DBLSPACE/DOUBLEGUARD 6.2—External

DBLSPACE/DOUBLEGUARD 6.2—External
DBLSPACE/DOUBLEGUARD 6.2—External

DoubleGuard is a safety feature that monitors the integrity of the memory that DoubleSpace is using to minimize damage by a runaway program. This setting is stored on the DOUBLEGUARD= line in the DBLSPACE.INI file.

Syntax

DBLSPACE /DOUBLEGUARD=zero_one

Parameters and Switches

zero_one Enables (1) or disables (0) the DoubleGuard feature.

Notes

  1. If DoubleGuard is enabled and memory corruption is detected, DoubleSpace halts your computer to minimize damage to data on the disk. DoubleGuard is enabled by default.

  2. Disabling DoubleGuard (/DOUBLEGUARD=0) may speed up your system a little but could lead to a loss of data if an errant program overwrites DoubleSpace's memory.

  3. You must restart your computer for this setting to take effect.

Examples

To turn on DoubleGuard integrity checking, enter the following command and reboot your computer:

DBLSPACE /DOUBLEGUARD=0

To turn on DoubleGuard integrity checking again, enter the following command and reboot your computer:

DBLSPACE /DOUBLEGUARD=1

DBLSPACE/FORMAT 6.0 and later—External

DBLSPACE/FORMAT 6.0 and later—External
DBLSPACE/FORMAT 6.0 and later—External
DBLSPACE/FORMAT 6.0 and later—External

The DBLSPACE /FORMAT command deletes all the files and subdirectories on a compressed drive but leaves the drive itself intact. UNFORMAT cannot restore the files deleted with this command, so be careful when you use it. To delete the drive as well, use the DBLSPACE /DELETE command.

Note

DBLSPACE /FORMAT is a dangerous command. Formatting a compressed drive is a quick operation, and after you have given DoubleSpace the go-ahead, you cannot turn back. You cannot use the UNFORMAT command to recover a formatted compressed drive. Make absolutely sure you don't need anything on the drive before formatting it.

Syntax

DBLSPACE  /FORMAT  drive:

or

DBLSPACE  /F  drive:

Parameters and Switches

drive: The compressed drive that you want to format. Note that you should specify the compressed drive, not the host drive.

Notes

  1. Formatting a compressed drive deletes all the files on that drive.

  2. You cannot unformat a compressed drive after performing a /FORMAT operation on it.

  3. DoubleSpace does not allow you to format drive C.

See Also

DBLSPACE /DELETE

Understanding DoubleSpace” in Chapter 6

DBLSPACE/INFO 6.0 and later—External

DBLSPACE/INFO 6.0 and later—External
DBLSPACE/INFO 6.0 and later—External

The DBLSPACE /INFO command displays the following information about the specified compressed drive: its host drive, used and free space, actual and estimated compression ratio, and total size. DBLSPACE /INFO can be handy for monitoring the compression ratio on the drive.

Syntax

DBLSPACE  /INFO  drive:

Parameters and Switches

/INFO This parameter can be omitted. If /INFO is included and drive: is omitted, information about the current drive is displayed. If both /INFO and drive: are omitted, the full-screen DoubleSpace program is run.
drive: The compressed drive that you want information about. Note that you should specify the compressed drive, not the host drive. If drive: is omitted and /INFO is specified, information about the current drive is displayed.

See Also

DBLSPACE /LIST

Understanding DoubleSpace” in Chapter 6

DBLSPACE/LIST 6.0 and later—External

DBLSPACE/LIST 6.0 and later—External
DBLSPACE/LIST 6.0 and later—External

The DBLSPACE /LIST command displays information about all the local drives connected to your computer, whether or not they are compressed drives. For each drive, the letter, type, free space, total size, and compressed volume file (CVF) filename are displayed. DBLSPACE /LIST can be handy for finding out the host drive for a compressed drive because the host drive is included in the CVF filename. DBLSPACE /LIST cannot display information about network or CD-ROM drives attached to your computer.

Syntax

DBLSPACE  /LIST

or

DBLSPACE  /L

See Also

DBLSPACE /INFO

Understanding DoubleSpace” in Chapter 6

DBLSPACE/MOUNT 6.0 and later—External

DBLSPACE/MOUNT 6.0 and later—External
DBLSPACE/MOUNT 6.0 and later—External

The DBLSPACE /MOUNT command associates a drive letter with a compressed volume file (CVF) so that you can access the files in the CVF as though they were on a disk. Normally, DoubleSpace mounts CVFs for you, so you must mount a CVF only if you have explicitly unmounted it or if the CVF is on a removable (floppy) disk.

Syntax

DBLSPACE  /MOUNT=nnn  host:  /NEWDRIVE=drive:

or

DBLSPACE  /MO=nnn  host:  /NEW=drive:

Parameters and Switches

=nnn Mounts the CVF named DBLSPACE.nnn on host:. This parameter can be abbreviated to /MO=nnn. If nnn is not specified, DBLSPACE.000 is assumed.
host: The uncompressed (host) drive containing the CVF that you want mounted.
/NEWDRIVE=drive: If you are mounting a CVF file created with the /COMPRESS parameter (nnn=000), drive: specifies the drive letter you want to use for the host drive after the CVF is mounted. If you are mounting a CVF file created with the /CREATE parameter (nnn>000), drive: specifies the drive letter you want to use for the compressed drive after the CVF is mounted. This parameter can be abbreviated to /NEW=drive:. The default is the next available drive letter.

Notes

You cannot mount a compressed drive from Microsoft Windows. If you are running MS-DOS 6.2, you can get around this restriction by using the new automount feature, which works while Windows is running. If you are using MS-DOS 6.0, you must exit Windows before mounting a compressed floppy or removable cartridge disk.

Examples

To mount CVF D:DBLSPACE.001 as the next available drive letter, use the following:

DBLSPACE  /MOUNT=001  D:

To mount a DoubleSpace compressed floppy disk in A as the next available drive letter, enter the following:

DBLSPACE  /MOUNT  A:

See Also

DBLSPACE /UNMOUNT

Understanding DoubleSpace” in Chapter 6

DBLSPACE /RATIO 6.0 and later—External

DBLSPACE /RATIO 6.0 and later—External
DBLSPACE /RATIO 6.0 and later—External

DoubleSpace uses the estimated compression ratio to estimate how much free space a compressed drive contains. By using the DBLSPACE /RATIO command, you can change the estimated compression ratio that DoubleSpace is using for a compressed drive. You might want to change the estimated ratio if you are about to copy to the compressed drive files that differ significantly from those that already are on the drive.

Syntax

DBLSPACE  /RATIO=ratio  drive:  /ALL

or

DBLSPACE  /RA=ratio  drive:  /ALL

Parameters and Switches

=ratio Specifies the new estimated compression ratio from 1.0 to 16.0. ratio must be entered with one decimal place (for example, 2.0, not 2). The default is the actual compression ratio for the drive.
drive: Specifies the compressed drive for which you want to change the estimated compression ratio. DOS uses the current drive unless you specify /ALL. You cannot specify both drive: and /ALL.
/ALL Changes the estimated compression ratios for all mounted compressed drives. You cannot specify both drive: and /ALL.

Notes

To view the actual compression ratio for a compressed drive, use the DBLSPACE /INFO command.

Examples

To change all your mounted compressed drives so that their estimated compression ratios equal their actual compression ratios, use the following:

DBLSPACE  /RATIO  D:  /ALL

To change the estimated compression ratio of compressed drive E to 1.7, enter the following:

DBLSPACE  /RATIO=1.7  E:

See Also

DBLSPACE /INFO

Understanding DoubleSpace” in Chapter 6

DBLSPACE/SIZE 6.0 and later—External

DBLSPACE/SIZE 6.0 and later—External
DBLSPACE/SIZE 6.0 and later—External

The DBLSPACE /SIZE command changes the size of a compressed drive. You might want to make a compressed drive smaller if you need more free space on its host drive. Alternatively, you might want to make a compressed drive larger if its host drive has a great deal of free space.

Syntax

DBLSPACE  /SIZE=size  /RESERVE=size  drive:

or

DBLSPACE  /SI=size  /RES=size  drive:

Parameters and Switches

=size The space (in megabytes) that the CVF on drive: should take up on its host (uncompressed) drive. You cannot specify both =size and /RESERVE=size. The default is to make the host drive as small as possible.
/RESERVE=size The space (in megabytes) to be left free on the host (uncompressed) drive after drive: is resized. This parameter can be abbreviated to /RES=size. You cannot specify both =size and /RESERVE=size. The default is to make the host drive as small as possible.
drive: The compressed drive that you want to make larger or smaller.

Examples

To change the size of compressed drive E so that its CVF takes up 30MB on its host (uncompressed) drive, use the following:

DBLSPACE  /SIZE=30  E:

To make compressed drive E as large as possible so that its host drive contains no uncompressed free space, enter the following:

DBLSPACE  /SIZE  /RESERVE=0  E:

Notice that when you specify the amount of space to reserve with the /RESERVE=0 parameter, you cannot specify a size with the /SIZE parameter.

DBLSPACE/UNCOMPRESS 6.2—External

DBLSPACE/UNCOMPRESS 6.2—External
DBLSPACE/UNCOMPRESS 6.2—External

The DBLSPACE /UNCOMPRESS command uncompresses a compressed DoubleSpace drive. If you uncompress all the compressed drives in your system, DoubleSpace removes itself from memory.

Syntax

DBLSPACE  /UNCOMPRESS  drive:

Parameters and Switches

drive: The compressed drive that you want to uncompress.

Notes

  1. You should always back up all the files on a compressed drive before uncompresssing it. (If anything can go wrong, it will.)

  2. You can uncompress a drive only if the files in the compressed drive will fit on the host drive in their uncompressed state.

  3. If files in the root directories of both the host and compressed drives have the same names, DoubleSpace cannot uncompress the drive. When this happens, DoubleSpace displays an error message and saves to the DBLSPACE.LOG file a list of the duplicate files involved. After you have resolved all the duplicate root directory filenames by renaming, moving, or deleting the files listed in DBLSPACE.LOG, you can try to uncompress the drive again.

  4. After the last compressed drive in your system has been uncompressed, DoubleSpace removes DBLSPACE.BIN from memory. Removing this file can free 40KB to 50KB of memory in your system. The next time you mount a compressed volume file, DBLSPACE.BIN must be loaded back into memory before you can access the compressed drive.

See Also

DBLSPACE /COMPRESS and DBLSPACE /CREATE

Understanding DoubleSpace” in Chapter 6

DBLSPACE/UNMOUNT 6.0 and later—External

DBLSPACE/UNMOUNT 6.0 and later—External
DBLSPACE/UNMOUNT 6.0 and later—External

The DBLSPACE /UNMOUNT command breaks the association between a drive letter and a compressed volume file (CVF), temporarily making a compressed drive unavailable.

Syntax

DBLSPACE  /UNMOUNT  drive:

or

DBLSPACE  /U  drive:

Parameters and Switches

drive: The compressed drive that you want to unmount. The default is the current drive.

Notes

  1. You cannot unmount drive C.

  2. Use DBLSPACE /MOUNT to regain access to the compressed drive.

See Also

DBLSPACE /MOUNT

Understanding DoubleSpace” in Chapter 6

DBLSPACE.SYS (device driver) 6.0 and later— External

DBLSPACE.SYS (device driver) 6.0 and later— External
DBLSPACE.SYS (device driver) 6.0 and later— External

To allow DoubleSpace to perform its compression magic, DOS loads the DBLSPACE.BIN file into memory early in the boot process. Initially, DBLSPACE.BIN is placed at the top of conventional memory. The DBLSPACE.SYS device driver enables you to move DBLSPACE.BIN to its final location in conventional or upper memory. Moving DBLSPACE.BIN to upper memory can save as much as 43KB of conventional memory for your DOS programs to use. To move DBLSPACE.BIN, DBLSPACE.SYS must be loaded in a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file.

In MS-DOS 6.2, DoubleSpace can share the high memory area (HMA) with DOS, decreasing the size of DoubleSpace in upper or lower memory to 33KB or to 37KB if the automounting feature is enabled.

Syntax

To relocate the DBLSPACE.BIN driver to the bottom of conventional memory, load the DBLSPACE.SYS device driver by using the DEVICE= command as follows:

DEVICE=drive:pathDBLSPACE.SYS  /MOVE  /NOHMA

To relocate the DBLSPACE.BIN driver into upper memory, load the DBLSPACE.SYS device driver by using the DEVICEHIGH= command like this:

DEVICEHIGH=drive:pathDBLSPACE.SYS  /MOVE  /NOHMA

Parameters and Switches

drive:path Specifies the full path to the DBLSPACE.SYS file on your system. Setup places the DBLSPACE.SYS file in the C:DOS subdirectory by default. If the full path to DBLSPACE.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
/MOVE Makes DBLSPACE.SYS move the DBLSPACE.BIN driver in memory. This parameter is required.
/NOHMA Prevents DoubleSpace from locating a portion of itself in the HMA with DOS.

Notes

  1. When DBLSPACE.BIN is first loaded into memory, it locates itself at the top of conventional memory. If you let DBLSPACE.BIN remain in that position, a device driver that requires access to this area in memory may overwrite it, crashing your computer. If you are using DoubleSpace, you should always use the DBLSPACE.SYS device driver to relocate DBLSPACE.BIN to a more permanent, safe location.

  2. To relocate DBLSPACE.BIN to the bottom of conventional memory, load DBLSPACE.SYS by using the DEVICE= command. To relocate DBLSPACE.BIN to upper memory, load DBLSPACE.SYS by using the DEVICEHIGH= command. Note that you must specify the /MOVE parameter either way. If you do not load the DBLSPACE.SYS driver, DBLSPACE.BIN is moved to the bottom of conventional memory after all other CONFIG.SYS processing is complete.

  3. Moving DBLSPACE.BIN to upper memory by using DEVICEHIGH= frees approximately 43KB of conventional memory. If not enough room is available in upper memory, DBLSPACE.BIN is moved to the bottom of conventional memory instead.

  4. (DOS 6.2 only) DoubleSpace can share the HMA with DOS, thereby decreasing the amount of upper or lower memory it requires to 33KB or to 37KB if the automounting feature is enabled. You can prevent DoubleSpace from loading into the HMA by using the /NOHMA parameter.

  5. If DOS and DoubleSpace are sharing space in the HMA and you are using a disk cache (for example, SMARTDrive), you might want to decrease the BUFFERS= setting to 10. With DoubleSpace in the HMA, there is room for about 10 buffers, so specifying more than this number may cause DOS to locate all its buffers in conventional memory instead.

  6. MemMaker optimizes the placement of DBLSPACE.BIN in memory if it finds the DBLSPACE.SYS driver being loaded in CONFIG.SYS. Specifying the /L and /S options with DEVICEHIGH= causes DBLSPACE.SYS to move DBLSPACE.BIN to the specified region(s). Therefore, to MemMaker, optimization for this device driver works just like any other.

  7. Unlike most device drivers, DBLSPACE.SYS doesn't remain in memory. After it has moved DBLSPACE.BIN into upper or lower memory, it unloads itself. Therefore, you can install DBLSPACE.SYS more than once in your CONFIG.SYS file without wasting memory. DoubleSpace may insert more than one DEVICE=DBLSPACE.SYS statement in your CONFIG.SYS file to avoid certain problems with network device drivers.

  8. You should load DBLSPACE.SYS before loading INTERLNK.EXE in your CONFIG.SYS file. If you load INTERLNK.EXE first, you might not be able to access all the drives on the client computer. In general, INTERLNK.EXE should be the last block device driver loaded in CONFIG.SYS.

  9. If DBLSPACE.BIN is relocated after certain network drivers are loaded in memory, your system may begin rebooting when certain DBLSPACE commands are run. If this happens, make sure that the device line for DBLSPACE.SYS comes before all network drivers loaded from CONFIG.SYS.

  10. The placement of the DEVICE=DBLSPACE.SYS line in your CONFIG.SYS file may affect the drive letters used in your system. In general, to allow device drivers to allocate letters that follow the physical drives in the system, load them before the DBLSPACE.SYS driver. After DBLSPACE.BIN has been moved, it allocates extra drive letters for host drives. Any device drivers loaded after this are assigned drive letters that follow DoubleSpace's drive letters.

Caution

Having drive letters change simply because you added a device driver to your CONFIG.SYS file can result in time-consuming chores. Batch files often have to be edited to reflect the new drive letters. All references to drives that have changed must be corrected in your CONFIG.SYS and AUTOEXEC.BAT files. Microsoft Windows is sensitive to drive letter changes, and some Windows applications will fail if they are suddenly located on a different drive.

Before you add or rearrange DEVICE= lines in your CONFIG.SYS file, think through the changes you may be making to drive letter assignments. You often can accomplish what you need without changing drive letter assignments.

Examples

The following lines install a RAM disk and relocate the DBLSPACE.BIN driver in upper memory if enough space is available:

DEVICEHIGH=C:DOSRAMDRIVE.SYS  1450  512  224  /E

DEVICEHIGH=C:DOSDBLSPACE.SYS  /MOVE

Because the RAM drive was loaded before DBLSPACE.BIN was moved, RAMDRIVE.SYS allocates drive letters before DoubleSpace. In a typical system with one or two floppy drives and a hard disk (with a CVF), the RAM drive would be D, and DoubleSpace, which normally saves four letters for later use, would use I as the host drive for C.

In the next example, the order is reversed, and the DEVICE= command is used to relocate DBLSPACE.BIN to the bottom of conventional memory instead of upper memory:

DEVICE=C:DOSDBLSPACE.SYS  /MOVE

DEVICEHIGH=C:DOSRAMDRIVE.SYS  1450  512  224  /E

This time, DoubleSpace uses H for the host drive, and the RAM drive will become drive I.

See Also

DBLSPACE, DEVICE=, and DEVICEHIGH=

Understanding DoubleSpace” in Chapter 6

DCONVERT

DCONVERT
DCONVERT

Converts a DoubleSpace- or SuperStor/DS-compressed removable or unmounted disk to a Stacker drive.

Syntax

DCONVERT source target /c compressed-volume-name /g compressed-volume-name
stacvol-filename /m /?

Parameters and Switches

source Indicates the name of the DBL/DRVSPACE to convert.
target Indicates the name of the STACVOL file to create when using the /g switch.
/c compressed-volume-name Converts the named compressed DoubleSpace volume to the new Stacker format.
/g compressed-volume-name Generates a STACVOL file in the new format by copying stacvol-filename the named compressed volume as a Stacker volume.
/m Use with either /c or /g on a monochrome monitor.
/? Displays the abbreviated online help.

Notes

DCONVERT needs some working space on a disk to convert it, as much as 1MB depending on the situation. If it runs out of space and a WRITE ERROR is displayed, use /g instead to make a converted copy of the compressed volume file on a different disk. Then, use COPY to transfer the resulting STACVOL file to the disk needed.

The attributes of the original file must be changed in order to delete it.

See Also

ATTRIB

DEBUG 1.0 and later—External

DEBUG 1.0 and later—External
DEBUG 1.0 and later—External

The DEBUG utility tests and edits programs. You can use DEBUG to view and change the state of your computer at the hardware level. Be very careful when using DEBUG because, with just a few keystrokes, you can wipe out your hard drive, destroy files, disable your mouse, lock up the keyboard, and cause all sorts of nasty problems. However, you can also learn a lot about your computer by poking around with DEBUG. This program is a programmer's tool and is rarely used by anyone else.

Syntax

DEBUG  pathname  parameters

Parameters and Switches

pathname The program file that you would like DEBUG to load into memory. If this parameter is omitted, DEBUG starts with no file loaded.
parameters Any parameters that you want to pass to the program file you specified with the pathname parameter. You cannot specify parameters if you do not specify pathname. This parameter is useful only if you are loading program files that accept arguments on their command line.

Notes

  1. The DEBUG utility enables you to load a program into memory and then edit, test, and save the edited program back to the disk. You also can use DEBUG to create small assembly language programs.

  2. Most people come in contact with DEBUG only when they are given explicit instructions on patching a particular file. In most cases, this involves creating a text file and then redirecting the input to DEBUG. The SPATCH.BAT file on the DOS 6 distribution disks uses this technique to patch (change) the Windows SWAPFILE.EXE program.

  3. Details on using the DEBUG program are beyond the scope of this book. If you want to learn about using DEBUG, check the MS-DOS online help system or the DOS 6 Technical Reference manual.

Examples

To start DEBUG, simply enter the following:

DEBUG

To start DEBUG and load PROGRAM.EXE from C:UTILS for editing, enter this:

DEBUG  C:UTILSPROGRAM.EXE

After you start the DEBUG program, it displays its prompt (the hyphen) and waits for you to enter commands. To quit DEBUG, enter the Q (quit) command.

DEFRAG 6.0 and later—External

DEFRAG 6.0 and later—External
DEFRAG 6.0 and later—External
DEFRAG 6.0 and later—External

Files become fragmented because of the way MS-DOS stores them on the disk. If parts of a single file are scattered over the disk, your disk drive requires more time to find and load all the pieces into memory. DEFRAG rearranges the files on your disk so that each is located in a series of contiguous clusters. Rearranging the files this way makes file access more efficient.

Syntax

DEFRAG  drive:  /F  /Q  /U  /S:order  /B  /H  /SKIPHIGH  /LCD  /BW  /G0

Parameters and Switches

drive: Specifies the drive to be optimized. If this parameter is omitted, DEFRAG assumes that you want to defragment the current drive.
/F Performs the full optimization method, which provides the best optimization but takes the most time. It defragments all your files, moves them to the front of the disk, and puts all the empty space at the end of the disk. You cannot specify the /U or /Q parameters with /F.
/Q (Undocumented) Performs the quick optimization method. This method moves all your files to the beginning of the disk and maximizes the amount of contiguous free space on the disk, but your files are still fragmented. You cannot specify the /F, /U, or /S parameters with /Q. This parameter is not documented by Microsoft and may not be available in all versions.
/U Performs the unfragment-only optimization method. This method defragments all your files but does not rearrange them on the disk. The empty space is left spread over the disk. You cannot specify the /F, /Q, or /S parameters with /U.
/S:order Controls the order of files in their directories. If you omit this switch, the current order of files on your disk is unchanged. The colon (:) is optional. Use any combination of the following values for order, without separating them with spaces:
 N Sorts in alphabetical order by name (A to Z)
N- Sorts in reverse alphabetical order by name (Z to A)
E Sorts in alphabetical order by extension (A to Z)
E- Sorts in reverse alphabetical order by extension (Z to A)
D Sorts by date and time (newest to oldest)
D- Sorts by date and time (oldest to newest)
S Sorts by size (smallest to largest)
S- Sorts by size (largest to smallest)
/B Restarts (reboots) your computer after the files have been reorganized. Make sure you use this switch if you use the FASTOPEN utility.
/H Allows DEFRAG to move a file even if it has the hidden attribute set. (Normally, DEFRAG does not move files with hidden attributes.) Note that even when /H is specified, DEFRAG still does not move files with the system attribute.
/SKIPHIGH Normally, DEFRAG uses upper memory if it is available. Specifying the /SKIPHIGH switch forces DEFRAG not to use any upper memory.
/LCD Uses screen colors suited to a liquid crystal display. You cannot specify the /BW parameter with /LCD.
/BW Uses screen colors suited to a monochrome display. You cannot specify the /LCD parameter with /BW.
/G0 Disables the graphic mouse and graphic character set on EGA and VGA screens. (Note that this switch is G and a zero.) By combining /G0 with the /BW or /LCD parameter, you should be able to run DEFRAG on any DOS display.

Exit Codes

ERRORLEVEL Value Meaning
0 Disk was defragmented successfully
1 An internal error occurred
2 No free clusters (DEFRAG requires at least one)
3 Operation halted by the user (Ctrl+C)
4 Operation halted by a general error
5 Operation halted by a disk read error
6 Operation halted by a disk write error
7 Operation halted by an error in the FAT; use CHKDSK /F
8 Operation halted by a memory allocation error
9 Not enough free memory to defragment this disk

Notes

  1. DOS starts DEFRAG in interactive mode if you omit one or more required parameters from the command line.

  2. DEFRAG takes over the entire screen to show what it is doing.

  3. By default, DEFRAG is loaded into upper memory if enough memory is free.

  4. Do not use DEFRAG to optimize network drives or drives created with INTERLNK.

  5. If you are using FASTOPEN when you defragment, specify DEFRAG /B so that out-of-date buffers kept by FASTOPEN are not used after the defragmenting operation.

  6. Do not run DEFRAG when any other program is running, including Microsoft Windows. If you have any programs resident in memory that might try to access the disk being defragmented, you should disable or remove them from memory before running DEFRAG. An exception is the SMARTDRV disk cache. (You don't have to remove it because DEFRAG disables it for you automatically.) If a program accesses a disk while it is being defragmented, data may be lost.

  7. It is a good idea to run a utility such as CHKDSK or SCANDISK before running DEFRAG to correct any logical errors on the drive before defragmenting its files.

See Also

CHKDSK and SCANDISK

Defragmenting Your Disk” in Chapter 7

DEL or ERASE 1.0 and later—Internal

DEL or ERASE 1.0 and later—Internal
DEL or ERASE 1.0 and later—Internal

The DEL command deletes one or more files from the drive and directory you specify. ERASE is an alternative name for this command. Many times, you can restore an accidentally deleted file by using the UNDELETE command—if you use the command soon enough.

Syntax

DEL  pathname  /P

or

ERASE  pathname  /P

Parameters and Switches

pathname The file or files that you want to delete. If no drive is specified, the current drive is used. If no subdirectory path is specified, the current subdirectory is used. If only a path (with or without a drive) is specified, all files (*.*) are assumed. Wildcards are allowed.
/P DOS prompts you before deleting each file. This can make it easier to delete a group of files that are difficult to specify with wildcards.

Notes

  1. If you provide a drive name, pathname, or both, and specify either *.* or no name for the filename, the DEL command prepares to delete all the files in the specified directory. Before it deletes them, DOS displays the following message:

    All files in directory will be deleted. Are you sure (Y/N)?
    

    If you type Y, DOS erases all files in the specified directory (but not in the subdirectories). If you type N, no files are erased.

  2. If you specify the /P parameter, DEL prompts you before deleting each file by displaying a line such as the following:

    MYFILE.TXT     Delete (Y/N)?
    

    If you type Y, DOS erases the file. If you type N, the file is skipped.

  3. You may be able to recover an erased file by using the special DOS 5.0 and 6.0 UNDELETE utility program. Use UNDELETE immediately after accidentally erasing a file.

  4. The DOS RECOVER utility does not recover erased files. RECOVER is designed only to repair a file that contains bad sectors or that has a bad directory entry.

Messages

Access denied

Error: You attempted to erase a file that is marked as read-only or that is being used by another program or computer and is temporarily marked as read-only. If the file that you intend to erase has the read-only, system, or hidden attribute set, use the ATTRIB command to turn off these attributes before attempting to erase the file again.

See Also

DELTREE and UNDELETE

Deleting Files” in Chapter 8

DELOLDOS 5.0 and later—External

DELOLDOS 5.0 and later—External

DELOLDOS deletes from the hard disk all files from a previous version of DOS after a DOS 5.0 or 6.0 installation.

Syntax

DELOLDOS  /B

Parameters and Switches

/B Forces DELOLDOS to use black-and-white screen mode. You might want to use this switch if you have an LCD display screen or a one-color monitor attached to a CGA adapter.

Notes

  1. When you upgrade to DOS 5.0 or 6.0, the old version of DOS is preserved in part on your hard disk in the directory OLD_DOS.1 and on the Uninstall disks that the DOS Setup program creates. After you are sure that the upgrade works correctly and is compatible with the programs that you normally use, you can delete the old DOS from the hard disk, thereby freeing additional storage space.

  2. After you start DELOLDOS, you can exit without deleting the old version of DOS by pressing any key except Y.

  3. Be sure that all your programs are compatible with the new DOS before you delete the old version.

  4. After running DELOLDOS, you cannot use the Uninstall disks created by DOS 5.0 or 6.0 Setup to restore your previous DOS version.

  5. After DELOLDOS deletes the previous version of DOS from your disk, it deletes itself. It really is a one-shot utility.

See Also

SETUP

DELPURGE.EXE

DELPURGE.EXE

DELPURGE.EXE permanently deletes deleted files being saved by DELWATCH.

Syntax

DELPURGE drive:pathfilespec /A /D:mm-dd-yy /T:hh:mm:ss /D:-nnn /L /P /S /H

Parameters and Switches

drive:pathfilespec Indicates the drive and directory to delete files from according to filespec filename parameters.
/A Purges matching files without prompting.
/D:mm-dd-yy Purges only files deleted before specified date.
/T:hh:mm:ss Purges only files deleted before specified time.
/D:-nnn Purges only files deleted more than nnn days ago.
/L Lists matching files without purging.
/P Pauses after each page is displayed.
/S Includes files in subdirectories.
/H Displays abbreviated help.

DELWATCH.EXE

DELWATCH.EXE
DELWATCH.EXE

DELWATCH is a TSR that monitors file deletions on a drive and saves information about them to allow the UNDELETE command to function in restoring deleted files.

Syntax

DELWATCH /MPmemtype /MRmemtype /MBX- /U drive:.. /B:nnn /E:ext... /F:nnn|All
/MBmemtype /0:ext... /D /S /H /HI /HD

Parameters and Switches

/MPmemtype Specifies the type of memory that the TSR is to be loaded into, where memtype can be X for extended DPMS memory, U for upper memory, or C for conventional memory. /MPmemtype- specifies that DELWATCH must not use the specified memory type.
/MRmemtype Specifies the type of memory that the real mode code is to be loaded into, where memtype can be the same options listed for /MPmemtype. /MRmemtype- specifies that DELWATCH real mode code must not use the specified memory type.
/MBX- Specifies not to use XMS memory.
/U Uninstalls DELWATCH. Allowed only if no drives are enabled.
drive:.. Specifies the drive or drives to use.
/B:nnn Specifies how many files in the same directory with the same name can be saved, where nnn can be from 1 to 65,535.
/E:ext... Excludes saving files with the extension ext for up to 10 ext.
/F:nnn Specifies the maximum number of files to save. ALL saves all files until the disk is full and overrides the /B setting.
/MBmemtype Specifies the type of memory to be used for drive data, where memtype can be X for extended DPMS memory, U for upper memory, or C for conventional. /MBmemtype- specifies that the specified memory type cannot be used for drive data buffers. Extended memory may not be used if /MBX- is specified.
/0:ext... Saves only files with the extension ext for up to 10 ext.
/D Disables DELWATCH on the specified drive or drives.
/S Shows the status of DELWATCH.
/H Displays an abbreviated help message.
/HI Displays an abbreviated help message on install switches.
/HD Displays an abbreviated help message on drive-enabled switches.

See Also

UNDELETE and DELPURGE

DELQ or ERAQ

DELQ or ERAQ

DELQ or ERAQ deletes a file or files but prompts you before deleting each file.

Syntax

DELQ drive:pathfilespec /S /?

ERAQ drive:pathfilespec /S /?

Parameters and Switches

drive:pathfilespec Specifies the drive, path, and filename or file specification using standard wildcards to be deleted.
/S Includes system files if they match the filespec to be deleted.
/? Displays abbreviated help.

DELTREE 6.0 and later—External

DELTREE 6.0 and later—External
DELTREE 6.0 and later—External
DELTREE 6.0 and later—External

By using DELTREE, you can delete an entire branch of your subdirectory tree. Unlike RD (or RMDIR), DELTREE deletes subdirectories that contain files. Because you can delete so many files so quickly with this command, you should always be careful when using it.

Syntax

DELTREE  drive:path  /Y

Parameters and Switches

drive: Specifies the drive that contains the subdirectory you want to delete.
path Specifies the subdirectory to be deleted. All subdirectories and files contained in the specified subdirectory are deleted as well. You are allowed to use wildcards in the path parameter, but you must use extreme caution if you do.
/Y Suppresses prompting for permission to delete each directory specified by path. Do not use this switch. A typographical error could wipe out too many files.

Exit Codes

ERRORLEVEL Value Meaning
0 Subdirectory was successfully deleted

Notes

  1. This command deletes all files, including hidden, read-only, and system files.

  2. DOS prompts you for permission to delete each directory specified by path, unless you specify /Y.

Caution

Use great care with the DELTREE command, particularly if you specify wildcards. You easily can delete more files than you intend.

See Also

DEL or DELETE, and RD or RMDIR

Using DELTREE to Delete Directories” in Chapter 5

DEVICE= 2.0 and later—Internal

DEVICE= 2.0 and later—Internal

The DEVICE= command loads device drivers into conventional memory. Through the use of installable device drivers, DOS can be expanded to support many features and devices that aren't supported in the DOS kernel. Installation programs often add device drivers to your CONFIG.SYS file for you. DEVICE= can be used only in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathfilename  parameters

Parameters and Switches

drive:path Although this parameter is optional, you should always include the full drive and path to the device driver file. If you omit it, the device driver file is assumed to be in the root directory of the startup drive.
filename The full filename, with extension, of the device driver to be loaded. Although many device drivers use a SYS extension, this isn't assumed, and the driver file's extension must always be specified. No wildcards are allowed. This parameter is required.
parameters Any parameters that the device driver may require are included after its name. DOS passes these parameters directly to the driver when it is loaded into memory. Some device drivers use case-sensitive or position-sensitive parameters. See the instructions provided with the device driver for details.

Notes

  1. If MS-DOS cannot find the specified device driver file, it displays a Bad or missing filename message and continues processing CONFIG.SYS. (See the first message in the “Messages” section for the DEVICE= command.)

  2. Device drivers are often sensitive to the order in which they are loaded. DOS executes each DEVICE= or DEVICEHIGH= command in the order in which it appears in CONFIG.SYS.

  3. The following device drivers are provided with MS-DOS:

    ANSI.SYS
    CHKSTATE.SYS*
    DBLSPACE.SYS
    DISPLAY.SYS
    DRIVER.SYS
    EGA.SYS
    EMM386.EXE
    HIMEM.SYS
    INTERLNK.EXE
    POWER.EXE
    PRINTER.SYS**
    RAMDRIVE.SYS
    SETVER.EXE
    SMARTDRV.EXE
    SMARTDRV.SYS***
    

*CHKSTATE.SYS is used by MemMaker and shouldn't be installed in your CONFIG.SYS file.

**PRINTER.SYS is not distributed with DOS 6 but is available on the supplemental disk.

***SMARTDRV.SYS was replaced by SMARTDRV.EXE in MS-DOS version 6.

All the device drivers in this list can be installed with the DEVICE= command.

Caution

DOS 6 includes two files with the SYS extension that are not device drivers: COUNTRY. SYS and KEYBOARD.SYS. If you attempt to load these files by using the DEVICE= or DEVICEHIGH= commands, your computer may lock up, forcing you to reboot. COUNTRY.SYS and KEYBOARD.SYS are data files used by COUNTRY= and KEYB, respectively.

  1. You cannot load normal executable files into memory by using the DEVICE= command. Entering CHKDSK.EXE or even DOSKEY.COM on a DEVICE= line generates an error message (see the first message in the “Messages” section) or lock up your computer. Device drivers are in a special format, and only files conforming to that format can be successfully loaded with the DEVICE= command. If an executable program can be loaded during the processing of the CONFIG.SYS file (not all can), it can be placed in memory by the INSTALL= command.

    External commands that load in a DEVICE= command line and run from the DOS prompt as well (such as EMM386, INTERLNK, POWER, and SETVER) are hybrid files that conform to both formats. When loaded from a DEVICE= command in CONFIG.SYS, the device driver portion of the file is loaded into memory. Executing the same command from the DOS prompt runs the executable portion of the file, which typically sets operating parameters or displays the status of the device driver already in memory.

Examples

Normally, the following two DEVICE= lines appear in CONFIG.SYS somewhere near the beginning of the file:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE  RAM  MIN=0
DOS=HIGH,UMB

The DEVICE= lines load HIMEM.SYS and EMM386.EXE into memory, and provide the services necessary for DOS to load into the HMA with the DOS=HIGH,UMB command. Note that the DEVICE= line for HIMEM.SYS must appear before the line for EMM386.EXE because EMM386 requires memory provided by HIMEM to operate.

Messages

Bad or missing filename

Error in CONFIG.SYS line number

Warning: DOS displays this message if it can't find the file you specified in the DEVICE=, DEVICEHIGH=, or INSTALL= command in your CONFIG.SYS file. filename is the name of the file that DOS was looking for, and number is the line in CONFIG.SYS where the command is located. Edit the line so that the path and filename are correct and then restart your computer.

Unrecognized command in CONFIG.SYS

Error in CONFIG.SYS line number

Warning: A line in your CONFIG.SYS file contains an illegal command. Usually, this message indicates that you have mistyped the name of a CONFIG.SYS command or have placed the ? in an illegal position.

See Also

DEVICEHIGH= and INSTALL=

Chapter 19, “Configuring Your Computer”

DEVICEHIGH= 5.0 and later—Internal

DEVICEHIGH= 5.0 and later—Internal

With the DEVICEHIGH= command, DOS can load device drivers into upper memory space, saving conventional memory for your application programs. To do so, DOS must have a UMB provider, such as EMM386, available. Also, the driver must be small enough to fit into the available UMB space. If DOS cannot load a driver specified with the DEVICEHIGH= command into upper memory, it loads the driver into conventional memory instead. Not all device drivers can run in upper memory. DEVICEHIGH= can be used only in your CONFIG.SYS file.

Caution

Before you begin inserting DEVICEHIGH= commands in CONFIG.SYS, you should have a bootable floppy disk available. That way, you can always start DOS from a floppy disk if changes you make in CONFIG.SYS prevent DOS from booting. Alternatively, with DOS 6, you can press the F5 (Clean boot) key to bypass CONFIG.SYS completely or F8 (Interactive) to choose which lines in CONFIG.SYS to execute when problems arise.

Syntax

In its simplest form, which follows, the DEVICEHIGH= command works just like the DEVICE= command:

DEVICEHIGH=drive:pathfilename  parameters

(DOS 6 only) DEVICEHIGH= has two additional switches that MemMaker uses to specify the placement and size of the device driver in memory:

DEVICE  /L:region,min;region,min;... /S  =drive:pathfilename  parameters

The following alternative syntax is used with DOS 5. Although the following is supported under DOS 6, you are advised to switch to the new syntax whenever possible:

DEVICE  SIZE=hexsize  drive:pathfilename  parameters

Parameters and Switches

drive:path Although this parameter is optional, you should always include the full drive and path to the device driver file. If you omit it, the device driver file is assumed to be in the root directory of the startup drive.
filename The full filename, with extension, of the device driver to be loaded. Although many device drivers use a SYS extension, this isn't assumed, and the driver file's extension must always be specified. No wildcards are allowed. This parameter is required.
parameters Any parameters that the device driver may need are included after its name. DOS passes these parameters directly to the driver when it is loaded into memory. Some device drivers use case-sensitive or position-sensitive parameters. See the instructions provided with the device driver for details.
/L:region,min (DOS 6 only) The region in upper memory, and optionally the minimum size in bytes, that the device driver should be loaded into. You can specify more than one region by separating each region from the previous one with a semicolon. For instance, /L:1;2 gives the driver access to UMB regions 1 and 2. /L:1,4096;2,512 further specifies that the minimum size of regions 1 and 2 should be 4,096 bytes and 512 bytes, respectively. This parameter must precede the device driver filename. MemMaker sets these values for you.
/S (DOS 6 only) If the /L parameter is specified with a minimum size, /S instructs DOS to shrink the UMB to the specified size and create a new UMB from the remainder. /S must precede the device driver filename. This switch is best left to MemMaker's use.
SIZE=hexsize (DOS 5) The minimum size block, in hexadecimal notation, into which DOS should attempt to load the driver. (MEM /D can provide the hexadecimal value needed for this syntax.) This parameter must precede the device driver filename.

Notes

  1. Before using the DEVICEHIGH= command, you must install a UMB provider and then execute a DOS=UMB command. Typically, this means that you must load HIMEM.SYS and EMM386.EXE with UMB support enabled and then specify DOS=UMB (or DOS=HIGH,UMB) before using the DEVICEHIGH= command.

    Caution

    You must install a UMB provider and add the DOS=UMB command before using the DEVICEHIGH= command in your CONFIG.SYS file. That way, you can always start DOS from a floppy disk if changes you make in CONFIG.SYS prevent DOS from booting. Alternatively, with DOS 6, you can press the F5 (Clean) and F8 (Interactive) boot keys to bypass completely or choose which lines in CONFIG.SYS to execute when problems arise.

    Caution

    If you use other memory managers, such as 386MAX, BLUEMAX, QEMM, or CEMM, use their versions of DEVICEHIGH= and LOADHIGH may be better than using the ones DOS provides. Sometimes, simply specifying DOS=UMB is a mistake. Follow the instructions and recommendations that came with the product you purchased.

  2. If DOS is unable to load the device driver into upper memory, it loads the driver into conventional memory instead. No error messages are displayed when this happens. To see what device drivers have been loaded into upper memory, use the MEM /C command.

  3. If MS-DOS cannot find the specified device driver file, it displays a Bad or missing filename message and continues processing CONFIG.SYS. (See the first message in the DEVICEHIGH= command's “Messages” section.)

  4. Device drivers are often sensitive to the order in which they are loaded. DOS executes each DEVICE= or DEVICEHIGH= command in the order in which it appears in CONFIG.SYS.

  5. The following device drivers provided with MS-DOS can be loaded into UMB space with the DEVICEHIGH= command:

    ANSI.SYS
    DBLSPACE.SYS
    DISPLAY.SYS
    DRIVER.SYS
    EGA.SYS
    PRINTER.SYS*
    RAMDRIVE.SYS
    SETVER.EXE
    

    *PRINTER.SYS is not distributed with DOS 6 but is available on the supplemental disk.

    INTERLNK.EXE, POWER.EXE, and SMARTDRV.EXE all use UMB space automatically if it is available, so you don't need to load them with a DEVICEHIGH= command. CHKSTATE.SYS is best left for MemMaker to handle. HIMEM.SYS and EMM386.EXE minimize their use of conventional memory when they load.

    Caution

    DOS 6 includes two files with the .SYS extension that are not device drivers: COUNTRY.SYS and KEYBOARD.SYS. If you attempt to load these files with the DEVICE= or DEVICEHIGH= command, your computer may lock up, forcing you to reboot. COUNTRY.SYS and KEYBOARD.SYS are data files used by COUNTRY= and KEYB, respectively.

  6. MemMaker can optimize your CONFIG.SYS file for you, inserting DEVICEHIGH= and LOADHIGH commands as needed to load as many device drivers and resident programs into upper memory space as possible. MemMaker also takes care of specifying the correct parameters for EMM386.EXE, ensuring that you have the maximum amount of UMB space available. This can be a big timesaver.

  7. Before you start optimizing memory in your system, look at the resident software you're loading to see whether you need it all. For instance, the setup program for DOS 6 installs SETVER.EXE whether or not you use any software that needs to be fooled into working with DOS 6. The cardinal rule is Less is More. Fewer drivers and TSRs mean fewer complicated interactions and fewer problems with load orders and “RAM cram.” Look for the balance of features and free memory that enables you to use your system efficiently. Trim your system to the essentials and then let MemMaker optimize it.

  8. By default, DOS loads a driver into the largest free UMB and makes the other UMBs available to that driver. The /L switch can be used to fine-tune your configuration by forcing small drivers to be loaded into small UMBs. However, loading a driver with the /L switch gives the driver access to only the UMB specified. Therefore, if the driver requires more than one UMB, you must specify multiple regions by using the /L switch (for example, /L:1;2). To see how a driver uses memory and get a better idea of what values to use with the /L switch, use the MEM /M driver_name command.

  9. MEM can be an enormous help when you're trying to understand memory usage in your computer. If you redirect the output of MEM to a file with the line

    /C  >  MEM_USE.TXT
    

    and then load that file into EDIT, you can page back and forth through MEM's report. With the information MEM supplies, you can easily see how your computer's memory has been divided and which drivers and TSRs are responsible for your “RAM cram” problems.

  10. DOS doesn't load a driver in a UMB if the UMB is smaller than the driver's load size. (Usually, the device driver's file size is equal to its load size.) If the driver requires more memory to run, you must specify one or more min parameters, which are the sizes of the UMBs that the driver requires when it runs. This procedure forces DOS to load the driver into a larger than normal UMB. Specify min in bytes after the corresponding region parameter, with a comma between (for example, /L:1,4096;2,512).

  11. Caution

Examples

Before you can use the DEVICEHIGH= command to load device drivers into upper memory, UMB space must be available to DOS. The following lines set the stage for using DEVICEHIGH= on a typical 80386 or 80486 computer system:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE  RAM
DOS=HIGH,UMB

First, the DEVICE= lines load HIMEM.SYS and EMM386.EXE into memory. These drivers provide the services necessary for the DOS=HIGH,UMB command, which comes next. Without these three lines at the beginning of your CONFIG.SYS file, the DEVICEHIGH= and LOADHIGH commands cannot access upper memory, so they use conventional memory instead. Note that the DEVICE= line for HIMEM.SYS must come before the line for EMM386.EXE because EMM386 requires memory provided by HIMEM. Neither of these device drivers can be loaded with the DEVICEHIGH= command, but both drivers do attempt to minimize their impact on conventional memory when they load.

Now that everything is ready, use the DEVICEHIGH= command to load device drivers into upper memory just as you would use the DEVICE= command to load them into conventional memory. For instance, the following lines load the ANSI.SYS and SETVER.EXE device drivers into UMBs:

DEVICEHIGH=C:DOSANSI.SYS

DEVICEHIGH=C:DOSSETVER.EXE

When MemMaker optimizes your CONFIG.SYS file for you, the DEVICEHIGH= command lines start looking more complicated with the inclusion of the /L and /S switches:

DEVICEHIGH  /L:1,4096  /S=C:DOSANSI.SYS

DEVICEHIGH  /L:1,1024  /S=C:DOSSETVER.EXE

At this point, if you want DOS to prompt you before loading ANSI.SYS and SETVER.EXE, add question marks directly after DEVICEHIGH on each command line:

DEVICEHIGH?  /L:1,4096  /S=C:DOSANSI.SYS

DEVICEHIGH?  /L:1,1024  /S=C:DOSSETVER.EXE

Note that making these drivers optional defeats the purpose of optimizing their placement in memory, but it does clearly show that the question mark must be placed directly after the command name, not with the equal sign.

Messages

Bad or missing filename

Error in CONFIG.SYS line number

Warning: DOS displays this message if it can't find the file you specified in a DEVICE=, DEVICEHIGH=, or INSTALL= command in your CONFIG.SYS file. filename is the name of the file that DOS is looking for, and number is the line in CONFIG.SYS where the command is located. Edit the line so that the path and filename are correct and then restart your computer.

Unrecognized command in CONFIG.SYS

Error in CONFIG.SYS line number

Warning: A line in your CONFIG.SYS file contains an illegal command. Usually, this message indicates that you have mistyped the name of a CONFIG.SYS command or have placed ? in an illegal position.

See Also

DEVICE=, DOS=, EMM386.EXE, HIMEM.SYS, LH or LOADHIGH, MEM, and MEMMAKER

Loading Device Drivers and TSRs into Upper Memory” in Chapter 19

DEVLOAD

DEVLOAD
DEVLOAD

The DEVLOAD command can be used outside CONFIG.SYS to load some device drivers that should usually be loaded in CONFIG.SYS. Not all device drives can be loaded from the command line with this command.

Syntax

DEVLOAD drive:pathdriver.ext arguments

Parameters and Switches

drive:pathdriver.ext The full drive, path, and filename for the device driver to be loaded.
arguments Any arguments or parameters specific to the device driver being loaded.

DIR 1.0 and later—Internal

DIR 1.0 and later—Internal
DIR 1.0 and later—Internal

The DIR command displays information about files on your disks. It is one of the most commonly used DOS commands. DIR is very handy for trying out complicated pathnames with wildcards to see whether they match the files you wanted.

Syntax

DIR  pathname  /P  /W  /A:attributes  /O:sortorder  /S  /B  /L  /C  /CH

Parameters and Switches

pathname Specifies the file or group of files that you want to display information about. Wildcards are permitted in the filename portion. If no drive is specified, the current drive is used. If no subdirectory path is specified, the current subdirectory is used. If no filename is specified, all files (*.*) are assumed.
/P Pauses when the screen is full and waits for you to press any key.
/W Generates a wide (80-column) display of the filenames; the file size, date, and time are not displayed.
/A:attributes (DOS 5 and later) Displays only files with the attributes you specify. If the /A:attributes parameter is omitted, DOS displays all files except hidden and system files. The colon is optional. For attributes, you can use any combination of the following, but do not separate them with spaces:
 A Displays files that are ready for archiving (backup)
-A Displays files that have not changed since the last backup
D Displays only directories (no files)
-D Displays only files (no directories)
H Displays hidden files
-H Displays all files that are not hidden
R Displays read-only files
-R Displays files that are not read-only
S Displays only system files
-S Displays all files except system files
/O:sortorder (DOS 5 and later) Controls the order in which DOS displays the information about the files and directories. If you omit the /O:sortorder parameter, DOS displays directories and files in the order in which they occur on the disk. The colon is optional. sortorder can be any combination of the following, but do not separate them with any spaces:
 N Sorts alphabetically by name (A to Z)
-N Sorts by name in reverse alphabetical order (Z to A)
E Sorts alphabetically by extension (A to Z)
-E Sorts by extension in reverse alphabetical order (Z to A)
D Sorts by date and time (earliest to latest)
-D Sorts by date and time in reverse order (latest to earliest)
S Sorts by size (smallest to largest)
-S Sorts by size (largest to smallest)
C (DOS 6.0 only) Sorts by DoubleSpace compression ratio (lowest to highest)
-C (DOS 6.0 only) Sorts by DoubleSpace compression ratio (highest to lowest)
G Groups directories before files
-G Groups directories after files
/S (DOS 5 and later) Lists all the specified files in the specified directory and any subdirectories below it.
/B (DOS 5 and later) Lists only filenames with no header or trailer information. This switch overrides /W. When it is combined with /S, the drive and path are included with each filename, but no date, time, or size information is displayed.
/L (DOS 5 and later) Displays directory names and filenames in lowercase.
/C (DOS 6.0 and later) Displays the compression ratios of files on a DoubleSpace volume, assuming an 8KB cluster size. /C is suppressed by /W or /B. This parameter cannot be combined with the /CH parameter.
/CH (DOS 6.0 and later) Displays the compression ratios of files on a DoubleSpace volume, assuming the cluster size of the host drive. /CH is suppressed by /W or /B. This parameter cannot be combined with the /C parameter.

Notes

Notes
  1. DIR now displays numbers with embedded commas, making them much easier to read.

  2. By default, the list displayed by the DIR command includes the following information:

    • Volume label and serial number

    • One directory or filename per line

    • File size (in bytes)

    • Date and time of the last modification

    • Number of files listed

    • Total bytes listed

    • Number of available bytes remaining on the disk

  3. When more than one sortorder value is specified, the filenames are sorted from the left value to the right value.

  4. You cannot use the DIR command for a drive in which you used the ASSIGN or JOIN command. You must break the assignment before you view the directory for a drive in which you used ASSIGN. You cannot use the DIR command on the guest disk drive involved in a JOIN command.

  5. DIR does not report statistics for disk drives in which you used the ASSIGN or JOIN command. For disk drives in which you used JOIN, DIR reports the free space of the host disk drive (the disk drive to which the second disk drive is joined) but does not report the total of the two disk drives. You can remove ASSIGN or JOIN from the drive to find its amount of free space.

  6. In DOS 5.0 or 6.0, you can use SET DIRCMD to set DIR switches in the AUTOEXEC.BAT file. If you want DIR to display files and directories a page at a time, enter the following command in your AUTOEXEC.BAT file:

    SET  DIRCMD=/P
    

    To override the preset switch, use the following format:

    DIR  /-P
    

    To view the options set with the DIRCMD variable, type the following command:

    SET
    

See Also

SET

Appendix B, “DOS Environment Variables,” and “Searching for Files with the DIR Command” in Chapter 8

DISKCOMP 1.0 and later—External

DISKCOMP 1.0 and later—External
DISKCOMP 1.0 and later—External

DISKCOMP compares two floppy disks on a track-for-track, sector-for-sector basis to see whether their contents are identical.

Syntax

DISKCOMP  source:  destination:  /1  /8

Parameters and Switches

source: Indicates the source drive to use for the comparison. If this parameter is omitted, the current drive is used. The source drive must be a DOS floppy disk drive.
destination: Indicates the destination drive to use for the comparison. If this parameter is omitted, the current drive is used. The destination drive must be a DOS floppy disk drive and can be the same as the source drive.
/1 Compares only the first side of the floppy disk, even if the disk or disk drive is double-sided.
/8 Compares only eight sectors per track, even if the first disk has a different number of sectors per track.

Exit Codes

ERRORLEVEL Value Meaning
0 Disks are the same (success)
1 Disks are not the same
2 Operation halted by the user (Ctrl+C)
3 Operation halted by a fatal disk error
4 Operation halted by an internal error

Notes

  1. If you provide only one valid floppy drive name, DOS uses the current drive for the comparison.

  2. If source: and destination: are the same, DISKCOMP prompts you when disks must be swapped.

  3. Compare only compatible floppy disks formatted with the same number of tracks, sectors, and sides. Other types of comparisons will fail or give misleading results.

  4. Do not use DISKCOMP for a network drive or a drive in which you used the ASSIGN, JOIN, or SUBST command.

  5. Two disks containing the same files do not compare the same with DISKCOMP if the information in the files is arranged differently. For that reason, DISKCOMP is useful only when you're comparing floppy disks that were duplicated with the DISKCOPY command.

Messages

Compare error on
Track track, side side

Warning: The disks you are comparing are different at the indicated track and side. DISKCOMP does not specify which sectors are different. If you just used DISKCOPY on these disks and DOS reported no problem, the second disk probably has a flaw. Reformat the disk and try DISKCOPY again. Otherwise, assume that the disks are different.

Compare OK

Information: DISKCOMP compared the two floppy disks and found that they match.

Drive types or diskette types not compatible

or

Incompatible disks

Error: The disk drives are of different types (3 1/2- or 5 1/4-inch disks), or the floppy disks are different. The first disk was successfully read on both sides. DOS noticed the discrepancy when it tried to read the second disk.

Unrecoverable read error on drive x
Track track, side side

Warning: DOS made four attempts to read the data from the floppy disk in the specified drive. The error is on the indicated track and side. If drive x is the disk that holds the destination (copied) disk, the copy probably is bad. (The disk has a hard, or unrecoverable, read error.) If drive x holds the original disk, a flaw existed when the disk was formatted, or a flaw developed during use.

Run CHKDSK on the original disk and look for the line bytes in bad sectors. Even if this line is displayed, the original disk and copy may be good. (The bad sectors may not be used by any of the files on the disk.) When you format a disk, FORMAT detects bad sectors and “hides” them. DISKCOMP, however, does not check for bad sectors; it tries to compare the tracks, even if bad sectors exist. For safety's sake, retire the original disk soon.

Invalid drive specification
Specified drive does not exist or is non-removable

Error: One (or both) of the specified drives does not exist or is a hard disk. This error can result if you specify only one drive to DISKCOMP and the current drive is a hard disk.

See Also

DISKCOPY

Comparing Disks with DISKCOMP” in Chapter 8

DISKCOPY 1.0 and later—External

DISKCOPY 1.0 and later—External
DISKCOPY 1.0 and later—External

DISKCOPY copies the contents of one floppy disk to another on a track-for-track basis, making an exact copy. DISKCOPY works only with floppy disks.

Syntax

DISKCOPY  source:  destination:  /1  /8  /V

Parameters and Switches

source: Indicates the source drive to use for the copy. If this parameter is omitted, the current drive is used. The source drive must be a DOS floppy disk drive.
destination: Indicates the destination drive on which the copy will be made. If this parameter is omitted, the current drive is used. The destination drive must be a DOS floppy disk drive and can be the same as the source drive.
/1 Compares only the first side of the floppy disk, even if the disk or disk drive is double-sided.
/8 (DOS 1.0 to 5.0 only) Compares only eight sectors per track, even if the first disk has a different number of sectors per track.
/V Verifies that the copy is correct by reading back all information written to the destination disk. This verification slows the copy process. The /V switch is similar to VERIFY set ON.

Exit Codes

ERRORLEVEL Value Meaning
0 Diskcopy operation successful
1 Operation halted by a nonfatal disk read/write error
2 Operation halted by the user (Ctrl+C)
3 Operation halted by a fatal disk error
4 Operation halted by an internal error

Notes

Notes
  1. DISKCOPY now uses the directory that the TEMP environment variable points to if it runs out of memory while reading the source disk. Therefore, if you make single drive copies (for example, DISKCOPY A: A:), you no longer have to swap disks two or three times to make those copies. As long as your hard drive has enough space, DISKCOPY reads the entire source disk before asking for the destination disk.

  2. The source and destination disk drives must be floppy disk drives—not hard or networked disk drives, RAM disks, or disk drives in which you used the JOIN or SUBST command. Defaulting to or specifying a nonreal source or destination disk drive causes DOS to return an error message and abort the copy operation.

  3. If you do not provide a source disk drive name, DISKCOPY uses the default disk drive. If you provide an improper source disk drive, DISKCOPY issues an error message and aborts.

  4. If your system has a single floppy disk drive and you provide only one valid floppy disk drive name, DOS uses that drive as both the source and destination disk drive for the copy. If your system uses two floppy disk drives and you provide only one valid disk drive name, DOS displays the Invalid drive specification error message.

  5. DISKCOPY destroys any information recorded on the destination disk. Do not use as the destination disk one that contains information you want to keep.

  6. To ensure that the copy is correct, run DISKCOMP on the two disks.

  7. DISKCOPY ignores the effects of an ASSIGN command.

  8. DISKCOPY recognizes unformatted destination disks and automatically formats them as part of the copying process.

  9. Write-protecting the source disk is important when you use only one floppy disk drive to make a copy of a disk. DOS periodically prompts you to change the disk. You cannot damage a write-protected source disk if you inadvertently insert that disk when DOS asks for the destination disk.

  10. When you use DISKCOPY, DOS reads into memory as much information as possible from the source disk. DOS then copies this information to the destination disk and reads the next batch of information from the source disk. The more free memory is available, the less time you need to copy a disk.

  11. DISKCOPY copies whatever level of file fragmentation is on the source disk to the destination disk. To avert this problem, you might want to run DEFRAG on the source disk before copying it or use FORMAT on the destination disk and then use XCOPY to copy files to it.

Messages

Drive types or diskette types not compatible

Error: The drive types or disk capacities that you tried to use are different and cannot handle the operation, or the destination disk is the wrong capacity. DOS read the first disk, but the drive specified as the destination is not the right type. DISKCOPY cannot create a high-density copy in a double- or single-density disk drive, or a double-sided copy in a single-sided disk drive. Additionally, most high-density drives cannot make a high-density copy using double-density disks.

Read error on drive d:
Write error on drive d:

Warning: DISKCOPY cannot accurately read or write the disk in drive d. The disk is not properly inserted, the source disk is not formatted (or is a non-DOS disk), or the drive door is open. Check these possibilities.

SOURCE diskette bad or incompatible
TARGET diskette bad or incompatible

Warning: DISKCOPY detected errors while reading the source disk (first message) or writing to the destination, or target, disk (second message). Bad sectors may exist on either disk, or the disk may be in the wrong type of drive.

Determine whether either floppy disk has bad sectors. If so, do not use DISKCOPY on either disk. If the source disk is bad, use COPY *.* to copy files from the source disk. If the destination disk is bad, try a different disk or try to reformat the disk and then use DISKCOPY.

Invalid drive specification
Specified drive does not exist or is non-removable

Error: One or both of the two specified drives do not exist or are hard disks.

See Also

DISKCOMP and VERIFY

Copying Entire Disks with DISKCOPY” in Chapter 8

DISKMAP.EXE

DISKMAP.EXE

DISKMAP.EXE creates a backup FAT that may aid UNDELETE in restoring deleted files. It is not as reliable as DELWATCH, but it uses less memory.

Syntax

DISKMAP drive:... /D

Parameters and Switches

drive:... Indicates the drive or drives to run DISKMAP on. Specifying a drive overwrites any existing DISKMAP file. Without this switch, the existing file is updated.
/D Overwrites any existing DISKMAP file with a new one.

DISKOPT.EXE

DISKOPT.EXE

DISKOPT.EXE optimizes drive performance by defragmenting files and free space and organizing files in a directory in contiguous space.

Syntax

DISKOPT drive: /Sx /Mx /B /O /N /RESTORE=drive:STACVOL.EXT

Parameters and Switches

drive: Indicates the drive to optimize.
/Sx Selects directory sort order, where x can be any of the following:
 
  • aSort by name

  • eSort by extension

  • dSort by date

  • sSort by file size

  • nNo sort

/Mx Selects the disk optimization method, where x can be any of the following:
 
  1. Full Optimization

  2. Full with File Reordering

  3. File Defragment Only

  4. Free Space Defragment Only

  5. Sort Directories Only

  6. Full Optimization with Restack

/B Uses a monochrome display.
/O Starts optimization immediately without user intervention.
/N Does not redefine characters of EGA or VGA systems.
/RESTORE=drive: STACVOL.EXT Restores an unmounted Stacker drive if optimization was interrupted.

DISPLAY.SYS (device driver) 3.3 and later— External

DISPLAY.SYS (device driver) 3.3 and later— External
DISPLAY.SYS (device driver) 3.3 and later— External
DISPLAY.SYS (device driver) 3.3 and later— External

The DISPLAY.SYS device driver adds international code page switching to the DOS console device. When combined with the other international utilities that DOS provides, it enables you to display one of six international character sets (code pages) on your EGA, VGA, or LCD screen. DISPLAY.SYS must be loaded in a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathDISPLAY.SYS  CON:=(type,hard_cp,num_cp)

DEVICEHIGH=drive:pathDISPLAY.SYS CON:=(type,hard_cp,num_cp)

To specify the number of subfonts that the display hardware can support, use the following format:

DEVICE=drive:pathDISPLAY.SYS  CON:=(type,hard_cp,(num_cp,subfonts))

DEVICEHIGH=drive:pathDISPLAY.SYS  CON:=(type,hard_cp,(num_cp,subfonts))

Parameters and Switches

drive:path Specifies the full path to the DISPLAY.SYS file on your system. Setup places the DISPLAY.SYS file in the C:DOS subdirectory by default. If the full path to DISPLAY.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
CON:= Specifies that the CON device is being described. The colon is optional, but the parameter itself is required.
type Indicates the type of display being used. It must be one of the type codes from the following display type table. This parameter must be enclosed in parentheses.
 Display Type type num_cp subfonts
Color Graphics Adapter CGA 0 0
Monochrome Display Adapter MONO 0 0
EGA, VGA, or Super VGA EGA 0 to 6 2
IBM PC Convertible LCD LCD 0 to 1 1
 Note that although CGA and MONO display types are allowed, neither of these displays supports code page switching. Loading DISPLAY.SYS for a CGA or MDA display is a waste of memory.
hard_cp Specifies the hardware code page built into the display, normally 437 in the United States. As long as you specify this parameter, you can always switch back to the default hardware code page built into your display adapter. See Chapter 14, “Understanding the International Features of DOS,” for a list of the code pages that MS-DOS supports.
num_cp Specifies the number of software code pages to allow space for in mem ory. Valid values for num_cp are shown in the previous display type table. If this parameter is omitted, a default value of 1 is used. Specifying 0 reserves no memory for display code pages, which effectively disables code page switching.
subfonts Indicates the number of subfonts that your display hardware supports for each code page. The default values for this parameter are shown in the previous display type table. If subfonts is specified, it and the num_cp parameter must be enclosed in a second set of parentheses.

Notes

  1. Load the DISPLAY.SYS driver after any other device drivers that affect the DOS console device. For instance, you should load DISPLAY.SYS after you load ANSI.SYS in your CONFIG.SYS file. Otherwise, the other console driver is likely to disable DISPLAY.SYS.

  2. When DISPLAY.SYS is loaded, it reserves memory for itself and for num_cp code pages. DISPLAY.SYS itself uses about 5KB of memory, the first code page adds 13KB, and each additional code page requires about another 10KB. In total, DISPLAY.SYS needs 18KB of RAM for one code page, 28KB of RAM for two code pages, and so on.

  3. If you do not specify the hardware code page that the display supports, you cannot switch back to it after you activate an alternative software code page. For this reason, you should always specify a value for hard_cp.

  4. Although you are allowed to specify num_cp equal to zero, doing so defeats the purpose of loading DISPLAY.SYS. With no additional code pages in memory, you can't switch to a different one, which is the only reason for using DISPLAY.SYS in the first place. CGA and MDA displays do not support code page switching, so the maximum num_cp you can specify for these displays is zero, which once again is a pointless configuration.

  5. To display a software code page, you need to perform a number of additional steps. You use the MODE command to prepare and load the code page information into the memory set aside by DISPLAY.SYS. Then, you can use MODE to select the display code page, or you can load NLSFUNC and use the CHCP command to change the active code page for all your devices at once. Additionally, you might want to add the COUNTRY= command to your CONFIG.SYS file to make case conversion and sort order information available.

  6. The KEYB utility provides code page support for the input side of the DOS console device. By using KEYB, you can remap your keyboard to conform with various international conventions.

  7. PRINTER.SYS performs a similar function for certain IBM printers that support code page switching. It is available on the DOS 6 Supplemental disk.

Examples

The following line enables an EGA or a VGA display, which uses hardware code page 437, to load and switch to an alternative code page:

DEVICE=C:DOSDISPLAY.SYS  CON:=(EGA,437,1)

If you want to load DISPLAY.SYS into upper memory with room for two code pages, use the following line:

DEVICEHIGH=C:DOSDISPLAY.SYS  CON=(EGA,437,2)

Notice that you can use the CON= or the CON:= format. Two subfonts are available in both of these examples because a display type of EGA defaults to two subfonts.

If you have an IBM Convertible LCD display that uses hardware code page 865 (Nordic) and you want to enable code page switching on it, add the following line to your CONFIG.SYS file:

DEVICE=C:DOSDISPLAY.SYS  CON=(LCD,865,1)

Only one subfont is available because that is the default (and maximum) for LCD displays.

See Also

CHCP, COUNTRY=, MODE device CP, NLSFUNC, and PRINTER.SYS

Chapter 14, “Understanding the International Features of DOS”

DOS= 5.0 and later—Internal

DOS= 5.0 and later—Internal

The DOS= command offers two options that enable you to adjust the way DOS loads and uses upper memory. If you specify DOS=HIGH, DOS attempts to load itself into the high memory area (HMA). The DOS=UMB command enables DOS to load resident programs into upper memory blocks (UMBs) with the DEVICEHIGH= and LOADHIGH commands. DOS= can be used only in your CONFIG.SYS file.

Syntax

DOS=high_low,umb_noumb

Parameters and Switches

high_low Specifies whether DOS should attempt to load itself in the high memory area (DOS=HIGH) or in conventional memory (DOS=LOW). To load HIGH, DOS requires an extended memory (XMS) manager such as HIMEM.SYS. The default value is LOW.
umb_noumb Specifies whether DOS should manage upper memory blocks created by a UMB provider such as EMM386.EXE (DOS=UMB) or not (DOS=NOUMB). The default value is NOUMB.

Notes

  1. If you include a DOS= command in your CONFIG.SYS file, you must include at least one parameter with it. To include more than one parameter, separate them with commas (for example, DOS=HIGH,UMB).

    Tip

    Always specify DOS=HIGH in CONFIG.SYS if your computer supports it. Few programs use the HMA, and loading DOS high can easily free 45KB to 55KB of conventional memory. This is a rare opportunity to get something valuable without losing anything.

  2. Although you can enter more than one DOS= line in your CONFIG.SYS file, it's better not to do so. In general, if the combination of parameters specified with more than one DOS= line would be legal on the first DOS= line in the file, you are okay. Sometimes you can specify DOS=UMB after using the DEVICEHIGH= command, but you should avoid doing so when possible. All the load order interactions are too confusing and aren't guaranteed to remain the same from one version of DOS to the next. Use one DOS= line, located directly after the line that loads your memory manager software.

  3. You must load HIMEM.SYS (or another extended memory manager) before specifying DOS=HIGH in your CONFIG.SYS file. DOS loads itself into the HMA after all other CONFIG.SYS processing is complete. If the HMA is unavailable or in use at that time, DOS displays an error message (see the first message in the “Messages” section) and loads itself into conventional memory. The HMA is not available on 8088 and 8086 processors, but is available on 80286 computers with A20 line support and at least 1MB of RAM.

  4. To allow DOS to load resident programs into upper memory blocks, you must load a UMB provider (such as EMM386.EXE) and specify DOS=UMB in your CONFIG.SYS file. No error message is displayed if DOS is unable to access the upper memory blocks.

Examples

A typical entry for DOS= in your CONFIG.SYS file follows:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE  RAM
DOS=HIGH,UMB

This entry loads DOS into the HMA and enables the use of the LOADHIGH and DEVICEHIGH= commands. Note that HIMEM.SYS and EMM386.EXE must be loaded before the DOS=HIGH,UMB command. The following series of commands uses an alternative syntax to do the same thing:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE  RAM
DOS=HIGH
DOS=UMB

Because you can split the DOS=HIGH and DOS=UMB commands, you may be tempted to add other commands between them. The following series of commands is legal, but you should avoid chaotic arrangements like this in your CONFIG.SYS file:

DEVICE=C:DOSHIMEM.SYS
DOS=HIGH
FILES=50
BUFFERS=20
DEVICE=C:DOSEMM386.EXE  RAM
LASTDRIVE=Z
SWITCHES=/W
DEVICEHIGH=C:DOSANSI.SYS
DEVICEHIGH=C:DOSRAMDRIVE.SYS
DOS=UMB

The use of DEVICEHIGH= before the DOS=UMB command is misleading. Also, if a future version of DOS executes the UMB portion of the DOS= command with the first DOS=HIGH line, UMB support may not be present yet, and the command could fail without displaying an error message. Although this particular series of commands seems to work, other arrangements and commands may cause problems. Because you gain nothing from this type of arrangement, avoid it. Use one DOS= line in your CONFIG.SYS file, located directly after the lines that load HIMEM.SYS and EMM386.EXE, and insert blank lines to make logical groups of commands stand out, as shown here:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE  RAM
DOS=HIGH,UMB

BUFFERS=20
FILES=50
LASTDRIVE=Z
SWITCHES=/W

DEVICEHIGH=C:DOSANSI.SYS
DEVICEHIGH=C:DOSRAMDRIVE.SYS

You probably will agree that this example is much easier to read and understand than the one before it.

Messages

HMA not available: Loading DOS low

Warning: You specified DOS=HIGH, but DOS was unable to load into the HMA. Typically, it cannot load into this area because the DEVICE=C:DOSHIMEM.SYS line in your CONFIG.SYS file is not present or is after the DOS=HIGH line. Less likely causes are that the HMA is already in use or that HIMEM was unable to gain control of the A20 line.

See Also

DEVICEHIGH=, EMM386.EXE, HIMEM.SYS, and LH (or LOADHIGH)

Chapter 19, “Configuring Your Computer”

DOSBOOK

DOSBOOK

DOSBOOK starts the full-screen help utility and online documentation for DR DOS. Normally, you would just enter DOSBOOK at the command line and choose from topics in the menu system. However, you can jump directly to topics using the following syntax.

Syntax

DOSBOOK topic

Parameters and Switches

topic The name of a DR DOS command

DOSDATA

DOSDATA

DOSDATA loads the system tables into upper memory or conventional memory.

Syntax

DOSDATA=umb|noumb

Parameters and Switches

umb|noumb Specifies whether the system tables are loaded into upper memory or conventional memory. The umb parameter loads the system tables (FILES, FCBS, BUFFERS, LASTDRIVE, STACKS) into upper memory if available. The noumb parameter loads the system tables into conventional memory. The default setting is noumb.

DOSDOCK

DOSDOCK

DOSDOCK enables mobile computer users to use hot or warm docking. The command specified must be any DOS executable format (for example, .EXE, .COM, or .BAT files).

DOSDOCK loads and remains resident waiting for a DOCK or UNDOCK event. You can set the DOCK or UNDOCK environment variable in the AUTOEXEC.BAT file by using the SET command. DOSDOCK can run the SET DOCK= or SET UNDOCK= command only when no other applications, including Windows, are running.

Syntax

DOSDOCK /?

Parameters and Switches

/? Displays the abbreviated online help.

DOSKEY 5.0 and later—External

DOSKEY 5.0 and later—External
DOSKEY 5.0 and later—External
DOSKEY 5.0 and later—External

DOSKEY enhances the usability of the DOS command line. It adds standard editing capabilities and the capability to recall recently used command lines. It also has fairly extensive macro capabilities, with which you can create command aliases or fast batch files. When DOSKEY is first run, it loads itself into memory and remains there until you reboot your computer.

Syntax

DOSKEY  /REINSTALL  /BUFSIZE=size  /MACROS  /HISTORY  /INSERT  /OVERSTRIKE
macroname=text ...

or

DOSKEY  /REINSTALL  /BUFSIZE=size  /M  /H  /INSERT  /OVERSTRIKE
macroname=text ...

Parameters and Switches

/REINSTALL Installs a new copy of DOSKEY even if a copy already is installed. This is the only way to resize the DOSKEY buffer without restarting your computer, but the memory used by the previous copy of DOSKEY will be wasted. This clears the DOSKEY buffer.
/BUFSIZE=size Indicates the size of the buffer, in bytes, that DOSKEY uses to store macros and command lines. The default is 512, and the minimum is 256. Increasing or decreasing the buffer size affects how much memory DOSKEY requires when loaded.
/MACROS Displays a list of the DOSKEY macros you have defined. You can redirect output by using the redirection symbol, >. This switch can be abbreviated as /M.
/HISTORY Displays a list of all commands currently stored by DOSKEY. You can redirect output by using the redirection symbol, >. This switch can be abbreviated as /H.
/INSERT Inserts new text into the command line (insert mode on). The default is /OVERSTRIKE. Pressing the Insert key toggles between insert and overstrike modes.
/OVERSTRIKE Makes new text overwrite old text on the command line (overstrike mode on). This is the default setting. Pressing the Insert key toggles between insert and overstrike modes.
macroname Specifies the name of the macro that you want to define.
text Specifies the commands that you want DOS to execute when you type macroname at a DOS command prompt. If text is null, the definition of macroname is deleted.
... Indicates that you can enter as many macroname=text definitions as will fit into the current command line. (DOS is limited to 127 characters in a single command line.)

Notes

  1. Ordinarily, DOS remembers the last command you typed at the command line. With DOSKEY, however, DOS can store a history of commands in memory. The number of commands retained in memory depends on the size of the buffer (normally 512 bytes). When the buffer is full, DOSKEY eliminates the oldest command to make room for the new command. The buffer contains macros and the history of commands.

  2. You can press several keys to recall a command in the history. In addition, you can use many keys and key combinations to edit a command on the command line. These keys and their functions are listed in Appendix D,“DOS and DOS Utility Programs' Keyboard Commands.”

  3. DOSKEY enables you to create macros. A macro, like a batch file, performs one or more DOS commands assigned to a specific name. After you type the name of a macro and press Enter, the macro executes the commands assigned to the macro name. When you create a macro, you can use the following special symbols:

    Code Description
    $g or $G Redirects output; use instead of >
    $g$g or $G$G Adds to an output file; use instead of >>
    $l or $L Redirects input; use instead of <
    $b or $B Indicates piping; use instead of |
    $t or $T Separates macro commands
    $$ Places the dollar sign in the command line
    $1 through $9 Replaceable parameters; same as %1 through %9 in a batch file
    $* Replaceable parameter that represents everything typed in the command line after the macro name

    When you create a macro, you can include any valid DOS command, including the name of a batch file. You can start a batch file from a macro, but you cannot start a macro from a batch file.

Examples

With DOSKEY installed, you can easily turn the last few DOS commands that you typed into a batch file. Simply ask DOSKEY to display the contents of the command-line history buffer and redirect the output to a file as follows:

DOSKEY /HISTORY > MYHIST.BAT

Next, load MYHIST.BAT into an ASCII editor such as EDIT and remove any command lines that you don't need.

To define a macro, enter the name of the macro followed by the commands you want executed. Separate the macro name from the commands with an equal sign. For example, the following creates a macro named CDD that changes the current drive and current directory:

DOSKEY CDD=$1: $T CD $2

After the CDD macro is defined, you could enter the following command at the DOS prompt to make drive D the current drive and MYSTUFF the current directory on drive D:

C:>CDD D MYSTUFF

When the preceding command is executed, the CDD macro runs and executes the following DOS commands:

C:>D:

D:>CD MYSTUFF

D:MYSTUFF>

Messages

Cannot change BUFSIZE

Error: You cannot change the DOSKEY buffer unless you also use the /REINSTALL switch, which clears the buffer.

Insufficient memory to store macro.
Use the DOSKEY command with the /BUFSIZE switch to increase available memory.

Warning: Your DOSKEY macros have filled the total space set aside for them. You must enlarge the memory area for macros (the default is 512 bytes) by using the BUFSIZE switch (and the /REINSTALL switch) before you can enter any new macros. Using REINSTALL clears the buffer.

Invalid macro definition

Error: You entered an illegal character or command with DOSKEY or attempted to create a DOSKEY macro with an illegal definition. This message appears, for example, if you use a GOTO command in a DOSKEY macro. Correct any errors and carefully retype the macro.

See Also

Chapter 18, “Mastering DOSKEY and Macros” and Appendix D, “DOS and DOS Utility Programs' Keyboard Commands”

DOSSHELL 4.0 to 6.0—External

DOSSHELL 4.0 to 6.0—External
DOSSHELL 4.0 to 6.0—External

The DOSSHELL command starts the DOS Shell program, which is a full-screen graphical shell program that provides an alternative to using the traditional DOS command line. DOSSHELL is not included in the standard DOS 6.22 package but is available on the DOS 6.22 Supplemental disk.

Syntax

DOSSHELL  /B  /T:screen  /G:screen

Parameters and Switches

/B Starts the DOS Shell in black-and-white mode rather than in color.
/T:screen Displays the DOS Shell in text mode, using the resolution described by screen. (See the screen table below.) You cannot specify /T:screen with /G:screen.
/G:screen Displays the DOS Shell in graphics mode, using the resolution described by screen. (See the following table.) You cannot specify /G:screen with /T:screen.
 Switch Monochrome or CGA EGA VGA
/T:L 25 lines 25 lines 25 lines
/T:M  43 lines 43 lines
/T:M1  43 lines 43 lines
/T:M2  43 lines 50 lines
/T:H  43 lines 43 lines
/T:H1  43 lines 43 lines
/T:H2  43 lines 50 lines
/G:L 25 lines 25 lines 25 lines
/G:M  43 lines 30 lines
/G:M1  43 lines 30 lines
/G:M2  43 lines 34 lines
/G:H  43 lines 43 lines
/G:H1  43 lines 43 lines
/G:H2  43 lines 60 lines

Notes

  1. When you start the DOS Shell without parameters, it uses the display and color settings from the last time DOSSHELL was run. To use a different display mode, specify a /T:screen or /G:screen parameter when you start the program. DOS Shell records these settings in the DOSSHELL.INI file.

  2. At least 384KB of free conventional memory are required to start the DOS Shell.

  3. Each time you start the DOS Shell, it searches the disk for directories and files to display up-to-date listings in file and tree windows. If you have a large hard disk or a complicated directory structure, this search may take a few seconds.

  4. Do not start Microsoft Windows from the DOS Shell. If you need to run both programs, start Microsoft Windows first and then run the DOS Shell from Windows.

  5. Your DOSSHELL settings are preserved in your DOSSHELL.INI file. The DOS 6.0 installation does not overwrite or modify this file if it exists, which may produce inconsistencies on your system (references to BACKUP rather than to MSBACKUP, for example). You can avoid these inconsistencies by renaming DOSSHELL.INI before you install DOS 6.0 and then manually editing changes from the renamed DOSSHELL.INI into the new DOSSHELL.INI.

    When the DOS 6.0 Setup program installs DOSSHELL, it expands one of three files (CGA.IN_ for CGA monitors, EGA.IN_ for EGA and VGA monitors, or MONO.IN_ for monochrome monitors) from the DOS 6.0 distribution disks and renames it DOSSHELL.INI. To restore your DOS Shell configuration to its defaults, you can expand one of these three files (by using EXPAND) and replace your present copy of DOSSHELL.INI with it.

  6. By defining an environment variable named DOSSHELL, you can specify where you would like DOSSHELL.INI to be located. For instance, to store the DOSSHELL.INI file in the C:DOSMSDOSDATA subdirectory, you could add the following SET command to your AUTOEXEC.BAT file.

    SET DOSSHELL=C:DOSMSDOSDATA
    

    If no environment variable named DOSSHELL is defined, DOS Shell searches for its settings file in the directory that contains DOSSHELL.EXE. If DOSSHELL.INI cannot be found, a new one is created.

  7. DOS Shell creates any temporary files, including task swapping files, in the subdirectory pointed to by the TEMP environment variable if it is defined. If TEMP isn't defined, temporary files are created in the subdirectory that contains DOSSHELL.EXE.

  8. If you are running POWER, the clock displayed in the DOS Shell program may slow down or stop completely. DOS Shell uses a timer to update the onscreen clock, and POWER slows down the timer. Note that only the onscreen clock displayed by DOS Shell is affected. The MS-DOS system clock continues to reflect the correct time.

  9. In DOS 4.0, DOS Shell was started by a batch file that recorded all the configuration information needed to run DOS Shell on your system. This version of the DOS Shell was very different from later versions, and most of the information presented here doesn't apply to it.

Examples

To start the DOS Shell in the default screen mode, enter the following:

DOSSHELL

To start the DOS Shell in black-and-white mode, enter the following:

DOSSHELL  /B

Use this command if you have a black-and-white monitor or a laptop or notebook computer with an LCD screen.

Messages

Not enough memory to run DOSSHELL

Error: Not enough conventional memory is available to start DOSSHELL. The DOS Shell program requires 384KB of free conventional RAM to load into memory. You may have too many resident programs (TSRs) loaded into memory, in which case you should attempt to remove any that you don't need. You may be trying to start DOSSHELL from a secondary copy of the command processor launched from another program, in which case you should type EXIT to return to your program, quit the program, and then run DOSSHELL.

Not enough free conventional memory to run program

or

Not enough free extended memory to run program

Either of these messages can appear when you try to start a program from the DOS Shell without sufficient available memory. Remove TSRs from memory to free conventional memory. If you are short of extended memory, use MEM /C to see what programs are using extended memory in your computer. Often you can make more extended memory available by decreasing the size of your SMARTDRV disk cache or by allocating less memory to use as expanded memory with EMM386.

Unable to run specified program.
Too many tasks running.

Error: You have already opened the maximum number of tasks for your configuration. Close one or more of the open tasks.

Unable to run specified program.

Error: The program that you tried to start cannot be started correctly. You may have specified the program name incorrectly.

You cannot quit MS-DOS Shell with programs in the Active Task List; quit those
programs first.

Error: You tried to exit the DOS Shell while at least one program was switched. Exit the switched program and then quit the DOS Shell.

See Also

Chapter 4, “Using the DOS Shell”

DPMI

DPMI

DPMI temporarily loads or unloads DOS Protected Mode Interface support for the EMM memory manager. DPMI is normally handled through a switch on the EMM386 drive in the CONFIG.SYS file. This enables you to unload or load it from the command line.

Syntax

DPMI ON|OFF /H

Parameters and Switches

ON|OFF ON loads DPMI support; OFF unloads it.
/H Displays abbreviated help.

DPMS.EXE

DPMS.EXE

DPMS.EXE allows most of the Stacker driver to be stored in extended memory, freeing conventional and upper memory for other programs.

Syntax

DEVICE=c:stackerdpms.exe /?

Parameters and Switches

/? Displays the abbreviated online help.

Notes

DPMS requires at least a 386 computer with more than 1MB of RAM and a memory manager that provides Virtual Control Program Interface (VCPI) services.

DPMS does not work unless the DPMS.EXE file is stored on the hard disk and referenced by a DEVICE= line in the CONFIG.SYS file.

Examining the CONFIG.SYS file and messages shown when the computer is started helps determine whether DPMS is used.

Stacker Setup automatically uses DPMS when possible. However, if STACKER.INI contains an /EMS, /UM, or /-DPMS switch, Stacker does not use DPMS. Stacker Setup adds the EMS switch only if DPMS cannot be used and if a large drive (more than 400MB) is compressed.

To use EMS, delete any switches that enable DPMS. Using expanded memory (EMS) requires a special memory manager, such as EMM386.

DRIVER.SYS (device driver) 3.2 and later— External

DRIVER.SYS (device driver) 3.2 and later— External
DRIVER.SYS (device driver) 3.2 and later— External

The DRIVER.SYS device driver can be used to create an additional drive letter for a floppy disk drive or set the characteristics of a floppy disk drive. For instance, if an external floppy drive is attached to your computer, you can use DRIVER.SYS (or DRIVPARM=) to tell DOS to assign a drive letter to the drive. A more common use is to create a new drive letter— perhaps one with different characteristics—for a drive.

Syntax

DEVICE=drive:pathDRIVER.SYS  /D:num  /C  /F:type  /H:heads  /S:sectors
/T:tracks

or

DEVICEHIGH=drive:pathDRIVER.SYS  /D:num  /C  /F:type  /H:heads
/S:sectors  /T:tracks

Parameters and Switches

drive:path Specifies the full path to the DRIVER.SYS file on your system. Setup places the DRIVER.SYS file in the C:DOS subdirectory by default. If the full path to DRIVER.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
/D:num Specifies the physical drive number (num). Valid numbers are 0 to 127. DOS assigns floppy drive numbers sequentially, with the first floppy drive as 0, the second as 1, the third as 2, and so on. Note that if you have only one floppy disk drive installed, DOS assigns it both letters A and B, but it is still drive 0, not drive 1. This parameter is required, and must be the first parameter specified after the name and location of the DRIVER.SYS file.
/C Specifies that the drive has change line support. This means that the drive can signal DOS that the medium in it may have been changed. Most newer floppy disk drives have change line support built in. Specifying the /C parameter can speed up access to your floppy drive.
/F:type Indicates the type of drive that is being accessed, where type is one of the values in the following table. If you omit this value, a default value of 2 (720KB 3 1/2-inch) is assumed.
 type Floppy Drive Specifications Heads (Sides) Sectors per Track Tracks per Head (Side)
0 Double-density 360KB 5 1/4-inch floppy disk drive; includes 160KB, 180KB, 320KB, and 360KB formatted media sizes 2 9 40
1 High-density 1.2MB 5 1/4-inch floppy disk drive 2 15 80
2 Double-density 720KB 3 1/2-inch floppy disk drive 2 9 80
7 High-density 1.44MB 3 1/2-inch floppy disk drive 2 18 80
9 Super high-density 2.88MB 3 1/2-inch floppy disk drive 2 36 80
/H:heads Specifies the number of read/write heads (sides) that the drive has. Valid values are 1 to 99. The default value is 2.
/S:sectors Specifies the number of sectors per track for the drive's media. Valid values are 1 to 99. The default value depends on the /F:type setting or is 9 if /F:type is omitted. See the preceding table.
/T:tracks Specifies the number of tracks per side (head) for the drive's media. Valid values are 1 to 999. The default value depends on the /F:type setting or is 80 if /F:type is omitted. See the preceding table.

Notes

  1. DOS assigns drive letters in a specific order. A and B always refer to the first one or two floppy drives in the system. If the system has a hard disk, the primary partition is assigned the letter C. Next, any remaining hard disk partitions are assigned letters. After that, each DOS-accessible block device driver listed in CONFIG.SYS is assigned a letter on a first-come, first-served basis. (If DoubleSpace is loaded, it modifies this assignment order by skipping four letters and then working backward. See DBLSPACE for more information.)

    For instance, if you have two floppy drives and one hard disk (with a single partition) and you include a single DRIVER.SYS line in your CONFIG.SYS file, the letter D would be assigned. DRIVER.SYS displays a message informing you of the letter assigned when it is installed. (See the first message in the “Messages” section.)

  2. Most newer floppy disk drives can signal the computer when their drive door has been opened. Because opening the door implies that the disk in the drive may have been changed, this feature is referred to as change line support. Unless you are installing a 360KB 5 1/4-inch disk drive, the chances are good that your new floppy drive has change line support built in. Specifying the /C parameter can speed up DOS access to the drive.

  3. MS-DOS 6 seems to have problems recognizing that the medium in a drive has changed when the medium does not have a volume serial number. Disks most likely to not have serial numbers are ones formatted by DOS versions before 4.0, preformatted disks, and disks formatted with some third-party utilities. This is a good reason to make sure that the hardware change line is working for your disk drive. If DOS is unaware that you have changed the disk in a floppy disk drive, it may write the wrong file allocation table (FAT) to the disk, destroying any data that was previously stored on it.

  4. If you specify the /F:type parameter, you can omit the /H:heads, /S:sectors, and /T:tracks parameters, and vice versa. You can use any combination of these parameters; the last ones entered have precedence.

  5. Many times, the DRIVER.SYS device driver is simpler and more flexible to use than DRIVPARM=, although both often achieve the same results. They can both configure logical drives, but only DRIVER.SYS can create a new one. DRIVPARM=, however, uses no additional memory in your system.

  6. You cannot use DRIVER.SYS to reconfigure an existing drive to support a format it was not made for. For instance, DRIVER.SYS cannot be used to allow an older 360KB 5 1/2-inch disk drive to read the newer 1.2MB disks. DRIVER.SYS can instruct DOS to make use of only the capabilities that both DOS and the drive support.

Examples

Suppose that your system has two 5 1/4-inch disk drives and a hard disk. To configure an external 1.44MB 3 1/2-inch floppy disk drive that you have attached to your system, enter a line such as the following in your CONFIG.SYS file:

DEVICE=C:DOSDRIVER.SYS  /D:2  /F:7

After loading, DRIVER.SYS displays the following message: Loaded External Disk Driver for Drive D.

Or, if your system has a single 1.44MB 3 1/2-inch floppy and a hard drive, you might want to create an alias for the floppy drive so that you can format 720KB disks without specifying any switches for FORMAT. To create a 720KB alias for it, you might enter the following line in your CONFIG.SYS file:

DEVICEHIGH=C:DOSDRIVER.SYS  /D:0  /F:2

As far as DOS is concerned, drive D refers to a 720KB 3 1/2-inch floppy drive. Drives A and B are unchanged and refer to a 1.44MB 3 1/2-inch floppy drive. All three drive letters refer to the same physical drive, but D has different characteristics from A and B.

Messages

Loaded External Disk Driver for Drive letter

Information: After installing DRIVER.SYS, DOS displays this message to tell you which drive letter has been assigned.

See Also

DRIVPARM=

DRIVPARM= 3.2 and later—Internal

DRIVPARM= 3.2 and later—Internal

DRIVPARM is an advanced command that defines the characteristics of an existing block device, such as a disk drive, and associates a drive letter with it. Normally, you use this command only when instructed to do so by the manufacturer of the drive you are installing. DRIVPARM= can be used only in your CONFIG.SYS file.

Syntax

DRIVPARM=/D:num  /C  /F:type  /H:heads  /I  /N  /S:sectors  /T:tracks

Parameters and Switches

/D:num Specifies the physical drive number (num). Valid numbers are 0 to 255, where drive A is 0, drive B is 1, drive C is 2, and so on. This parameter is required and must be the first parameter on the command line.
/C Specifies that the drive has change line support. This means that the drive can signal DOS that the medium in it may have been changed. Most newer floppy disk drives have change line support built in. Specifying the /C parameter can speed up access to your floppy drive.
/F:type Indicates the type of drive that is being accessed, where type is one of the values in the following table. If you omit this value, a default value of 2 (720KB 3 1/2-inch) is used.
 type Drive Specifications
0 A double-density 360KB 5 1/4-inch floppy disk drive; includes 160KB, 180KB, 320KB, and 360KB formatted media sizes
1 A high-density 1.2MB 5 1/4-inch floppy disk drive
2 A double-density 720KB 3 1/2-inch floppy disk drive
5 A hard disk
6 A tape drive
7 A high-density 1.44MB 3 1/2-inch floppy disk drive
8 A read-write optical disk drive
9 A super high-density 2.88MB 3 1/2-inch floppy disk drive
 Note that types 3 and 4, which formerly specified single-density and double-density 8-inch floppy disk drives, respectively, are no longer supported by MS-DOS.
/H:heads Specifies the number of read/write heads (sides) that the drive has. Valid values are 1 to 99. The default value depends on the /F:type setting.
/I Indicates that a 3 1/2-inch disk drive, which the ROM BIOS doesn't support, is attached to a standard floppy disk drive controller.
/N Indicates that this drive uses nonremovable media. This switch is assumed if /F:5 (hard disk) is specified.
/S:sectors Specifies the number of sectors per track for the drive's media. Valid values are 1 to 99. The default value depends on the /F:type setting.
/T:tracks Specifies the number of tracks per side (head) for the drive's media. Valid values are 1 to 999. The default value depends on the /F:type setting.

Notes

  1. In many cases, the DRIVER.SYS device driver is simpler and more flexible to use than DRIVPARM=, although both often achieve the same results. They can both configure logical drives, but only DRIVER.SYS can create a new one. However, DRIVPARM= uses no additional memory in your system.

  2. In most cases, the DRIVPARM= line should come immediately after the line that loads the device driver for the drive you are configuring. Normally, the instructions for installing the drive's device driver tell you which parameters to use with DRIVPARM=. An exception occurs when you are adding support for a 3 1/2-inch floppy drive attached to a standard floppy controller, which requires no device driver.

  3. Most newer floppy disk drives can signal the computer when their drive door has been opened. Because opening the door implies that the disk in the drive may have been changed, this feature is referred to as change line support. Unless you are installing a 360KB 5 1/4-inch disk drive, the chances are good that your new floppy drive has change line support built in. Specifying the /C parameter can speed up DOS access to the drive.

  4. MS-DOS 6 seems to have problems recognizing that the medium in a drive has changed when the medium does not have a volume serial number. Disks most likely to not have serial numbers are ones formatted by DOS versions before 4.0, preformatted disks, and disks formatted with some third-party utilities. This is a good reason to make sure that the hardware change line is working for your disk drive. If DOS is unaware that you have changed the disk in a floppy disk drive, it may write the wrong file allocation table (FAT) to the disk, destroying any data that was previously stored on it.

  5. Do not use DRIVPARM= unless the installation instructions for the hardware or software you are installing in your system tells you to do so. Normally, DRIVPARM= can be used only to support additions to your system rather than reconfigure existing hardware or software.

  6. You cannot use DRIVER.SYS to reconfigure an existing drive to support a format it was not made for. For instance, DRIVER.SYS cannot be used to allow an older 360KB 5 1/2-inch disk drive to read the newer 1.2MB disks. DRIVER.SYS can instruct DOS to make use of only the capabilities that both DOS and the drive support.

Examples

Probably the most common use of the DRIVPARM= command is to create a drive letter for a 3 1/2-inch floppy disk drive that is not supported by the ROM BIOS in that computer. The following line defines the 3 1/2-inch 1.44MB floppy disk drive as drive D (3), using the default values for heads, sectors, and tracks:

DRIVPARM=/D:3  /F:7  /I

If the floppy disk drive were the second one in your system and supported only 720KB media, you would use the following line:

DRIVPARM=/D:1  /I

Note that you can omit the /F:2 because, in this case, the default value is correct. If you run the preceding command on a system in which the second floppy drive is a 1.44MB 3 1/2-inch drive, you can read only 720KB disks; you cannot read 1.44MB disks.

See Also

DRIVER.SYS

DRMOUSE

DRMOUSE

The DRMOUSE driver detects a serial or PS2 mouse and loads support for it.

Syntax

DRMOUSE /P /C /L /Rnm /U /H

Parameters and Switches

/P Forces PS2 port.
/C Forces the COM port to automatically detect the mouse.
/L Changes the mouse direction for left-hand use instead of the right-hand default.
/Rnm Sets the resolution manually, where n and m are the horizontal and vertical resolution in numbers from 1 to 9. /R0 specifies to use the hardware's default resolution.
/U Unloads the mouse driver.
/H Displays abbreviated help.

DRVLOCK

DRVLOCK

DRVLOCK locks or unlocks the specified drive or socket. When used to lock a drive, it secures the medium. When used to lock a socket, it prevents PCMCIA PC Card removal.

Syntax

DRVLOCK drive:|socket: /on |/off /?

Parameters and Switches

drive: Specifies a drive to lock or unlock. If no drive or socket is specified, DRVLOCK defaults to the current drive.
socket: Specifies a PCMCIA socket to be locked or unlocked. If no drive or socket is specified, DRVLOCK defaults to the current drive.
/on Turns lock on.
/off Turns lock off.
/? Displays the abbreviated online help.

DYNALOAD

DYNALOAD

DYNALOAD enables you to dynamically load a device driver from the DOS command prompt.

Syntax

To load the device driver into low memory, use the following syntax:

DYNALOAD device_driver parm1 parm2 ...  /?]

To load the device driver into high memory, use the following syntax:

LOADHIGH DYNALOAD device_driver parm1 parm2 ...  /?]

Parameters and Switches

device_driver Specifies the drive, path, and filename of the device driver to be loaded.
parm1 parm2 .... Specifies any command-line parameters required by the device driver for proper execution.
/? Displays the abbreviated online help.

Notes

DYNALOAD cannot be run in a Windows Virtual DOS Machine (VDM) when task swapping is active or when DESQview is active.

DYNALOAD works with the following DOS device drivers:

ANSI.SYS SETVER.EXE
CMOSCLK.SYS SMARTDRV.EXE
CNFIGNAM.EXE STACHIGH.SYS
DISPLAY.SYS UMBCGA.SYS
DRIVER.SYS UMBEMS.SYS
EMM386.EXE UMBHERC.SYS
HIMEM.SYS UMBMONO.SYS
SCREATE.SYS  

E

E

The E command starts the PC DOS E Editor, a full-screen editor used to create, edit, save, and print ASCII text files.

Syntax

E /q /b /s /d /i /c /a /dm /80|/132 drive:pathfilename =filename /?

Parameters and Switches

drive:pathfilename Specifies the drive, directory, and file to edit. Multiple files can be edited at one time. Each file requires its drive and path specification.
/q Turns off the display of the Loading... message.
/b Displays files in browse (read-only) mode.
/s Uses EMS (or hardfile if no EMS is available) to edit files too large for conventional memory.
/d Forces a file to be loaded from disk.
/i Opens the STACKER.INI file for editing.
/c Opens the CONFIG.SYS file for editing.
/a Opens the AUTOEXEC.BAT file for editing.
/dm Disables the mouse.
/80 Enables 80-column, 16-color text video (CGA/EGA/MCGA/VGA/SVGA/XGA).
/132 Enables 132-column, 16-color text video (XGA). Using this switch disables the mouse.
=filename Specifies use of the same path as last specified at the DOS command prompt or “same as current file's” at the editor command line.
/? Displays the abbreviated online help.

Notes

The four switches /s, /dm, /80, and /132 can be preset in the E environment variable. You type them on the same line in the AUTOEXEC.BAT file as follows:

SET E=/s /dm /80

ECHO 2.0 and later—Internal

ECHO 2.0 and later—Internal

The ECHO command has two functions. First, you can use it to display messages onscreen from a batch file. Second, you can use ECHO to control whether DOS displays onscreen each command line from the batch file before executing the command line.

Syntax

To display a message, use the following format:

ECHO message

To turn on or off the display of commands and other batch-command messages, use the following format:

ECHO onoff

To see the status of ECHO, use the following format:

ECHO

Parameters and Switches

message Specifies the text of the message to be displayed onscreen.
onoff Specifies whether or not each command line in the batch file is displayed before being executed. ECHO ON turns on the display of command lines. ECHO OFF turns off the display of command lines. Note that this setting has no effect on the output generated by a command, only on the display of the command line that DOS is about to execute.

Notes

  1. Setting ECHO ON or OFF controls only the display of command lines from the batch file before they are executed. It has no effect on the output generated by a DOS command. The message generated by the PAUSE command, Press any key to continue..., and the message generated by the COPY command, 1 file(s) copied, are examples of output generated by a command. They are not suppressed by ECHO OFF.

  2. When ECHO is ON, DOS displays each command line before executing it. This capability can be handy when you are debugging a batch file. After the batch file is working correctly, you generally want to include an ECHO OFF command at the beginning of the batch file to suppress echoing command lines. Using ECHO OFF can speed up the batch file a little as well.

  3. You can suppress the display of a single batch file line by typing @ as the first character in the line. The command itself is executed, but the command line is not displayed. For example, when you type the line @ECHO OFF, the command line ECHO OFF is not displayed, but the ECHO flag is set to OFF.

  4. To display a blank line onscreen, enter the command ECHO followed by a period (with no intervening spaces) in your batch file. This is a special use for the ECHO command and can make your batch file screen output more attractive and readable.

  5. You cannot display pipe characters (|) or redirection symbols (< or >) in an ECHO message. Redirection symbols are intercepted by the parser and are acted on.

  6. DOS starts every batch file with ECHO ON. The ECHO setting (ON or OFF) remains in effect until DOS completes batch processing or encounters another ECHO ON or ECHO OFF command. If one batch file invokes another, the ECHO setting from the first batch file remains in effect. When DOS returns control to the command line, ECHO is restored to the ON state.

  7. If you issue an ECHO OFF command at the DOS prompt, the DOS prompt is not displayed. You can still see the commands you are entering, however. To restore the DOS prompt, enter ECHO ON.

  8. You can use ECHO to send ANSI commands to your screen. If ANSI.SYS is active in memory and the message displayed by ECHO contains legal ANSI commands, they are acted on rather than displayed. You can use this technique to display very complex, multicolored screens from a batch file. To enter ANSI commands into your batch file, you need an editor that enables you to enter Escape characters (ASCII 27) into the text.

  9. To suppress the output of a command, use I/O redirection to the null device (NUL). For example, to suppress the 1 file(s) copied message generated by the COPY command, use the following format:

    COPY  file1.ext  file2.ext  >  NUL
    

    The command output is sent to the null device instead of to the console, so it is not displayed onscreen.

Caution

If you redirect the output of a program that is going to remain resident in memory (TSR), you may waste one of the file handles that DOS has available for programs to use. When you redirect the output of a program to the NUL device, the NUL device is assigned a file handle that isn't released until the program terminates. In the case of resident programs, this file handle often remains unavailable until you restart DOS. This can cause problems if you are in the habit of suppressing the output of resident programs loaded in your AUTOEXEC.BAT file.

Examples

Batch files commonly begin with the following line:

@ECHO  OFF

This command turns ECHO OFF at the beginning of the batch file, and the at sign (@) tells DOS not to display the ECHO OFF command itself. If you start a batch file with this command, no unnecessary screen output is displayed.

Another very common use for ECHO is to explain the inclusion of a PAUSE command in a batch file. For example, to instruct the user to insert a particular floppy disk in drive B, include the following lines in a batch file:

ECHO Insert the Working Backup disk in drive B:
ECHO.
ECHO Press Ctrl-Break to abort the backup, or
PAUSE

Assuming that ECHO is OFF when these commands are executed, the following messages are displayed:

Insert the Working Backup disk in drive B:

Press Ctrl-Break to abort the backup, or
Press any key to continue...

Note that the PAUSE message is anticipated in the ECHO messages. If you use the CHOICE command instead, you can control all the text that is displayed onscreen.

To display a menu, you can use ECHO to display a screenful of messages. Then, you can let the user pick an item from the list by using the CHOICE command, as the following lines demonstrate:

@ECHO OFF
CLS
ECHO.
ECHO F  First action
ECHO S  Second action
ECHO T  Third action
ECHO.
CHOICE /C:FST "Choose an action "

The CLS command is often used with ECHO to control the amount of distracting information that is left behind on the screen by other commands. Note that the ECHO. (ECHO period) command is used to display blank lines. (Blank lines included in a batch file are ignored by DOS and are not displayed onscreen.)

See Also

@, ANSI.SYS, CHOICE, CLS, and PAUSE

Chapter 16, “Understanding Batch Files”

EDIT 5.0 and later—External

EDIT 5.0 and later—External

The EDIT command activates the DOS full-screen ASCII text-file editor. EDIT is very handy for writing batch files or making changes to your AUTOEXEC.BAT or CONFIG.SYS file. Although limited to working on one file at a time, EDIT offers block copy and move operations as well as search and replace features. EDIT uses the editor built into QBASIC.EXE; so to use EDIT, QBASIC.EXE must be in one of the subdirectories listed in your PATH variable.

Syntax

EDIT  pathname  /B  /G  /H  /NOHI

Parameters and Switches

pathname Specifies the file you want EDIT to load. If no drive is specified, the current drive is assumed. If no subdirectory path is specified, the current directory is assumed. Wildcards are not allowed.
/B Specifies that EDIT should use colors more appropriate for a black-and-white (monochrome) or LCD display.
/G Specifies that EDIT should use the fastest screen-updating method for a CGA monitor. Don't specify the /G switch if you see “snow” on your monitor.
/H Specifies that EDIT should display 43 lines on an EGA monitor or 50 lines on a VGA monitor.
/NOHI Specifies that EDIT should limit itself to 8 colors rather than 16.

See Also

Chapter 15, “Using the DOS Editor”

EDLIN 1.0 to 5.0—External

EDLIN 1.0 to 5.0—External
EDLIN 1.0 to 5.0—External
EDLIN 1.0 to 5.0—External

EDLIN is an old-fashioned, line-oriented text editor that is much more awkward to use than EDIT. If you have anything else to use for editing ASCII text files, you probably should avoid using EDLIN. The only good thing about EDLIN is that the program file is small. EDLIN is no longer distributed with the standard DOS package but is available on the DOS 6 Supplemental Disk. Instructions for using EDLIN are in the COMMANDS.TXT file included on the Supplemental Disk.

See Also

EDIT

EGA.SYS (device driver) 5.0 and later—External

EGA.SYS (device driver) 5.0 and later—External
EGA.SYS (device driver) 5.0 and later—External

Because of the way EGA display adapters are made, they present certain problems for task-switching software. EGA.SYS attempts to solve these problems. If you have an EGA display and use the task-switching functions of the DOS Shell program, you need to load EGA.SYS. You must load EGA.SYS in either a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathEGA.SYS

or

DEVICEHIGH=drive:pathEGA.SYS

Parameters and Switches

drive:path The full path to the EGA.SYS file on your system. Setup places the EGA.SYS file in the C:DOS subdirectory by default. If the full path to EGA.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.

Notes

  1. You can use EGA.SYS only if your system uses an EGA display. With any other type of display, EGA.SYS does not load into memory.

  2. In addition to being required by the task swapper in DOS Shell, EGA.SYS may be required by Microsoft Windows. Third-party task-switching software often requires the assistance of EGA.SYS or a similar driver that it provides. You can have (and need) only one EGA.SYS type driver loaded at a time.

  3. If you have an EGA display and you use the Microsoft Mouse driver, you may be able to save some memory by loading EGA.SYS before loading your mouse driver into memory. Many of the functions in EGA.SYS are duplicated in the Microsoft Mouse driver, and if it finds EGA support already in place, the mouse driver doesn't load those functions.

Examples

To load the EGA.SYS device driver into upper memory, you might add the following line to your CONFIG.SYS file:

DEVICEHIGH=C:DOSEGA.SYS

See Also

DOSSHELL and MOUSE

EJECT

EJECT

The EJECT command ejects the medium from a drive. If no drive is specified, the medium is ejected from the current drive.

Syntax

EJECT drive: /?

Parameters and Switches

drive: Specifies the drive letter of the drive from which to eject the medium.
/? Displays the abbreviated online help.

Remarks

The medium cannot be ejected from the drive specified when the drive is locked.

EMM386 5.0 and later—External

EMM386 5.0 and later—External
EMM386 5.0 and later—External

The EMM386 command enables you to control the use of expanded memory (EMS) and upper memory blocks (UMBs) in a computer with an 80386SX or higher CPU. Before you can run EMM386 from the DOS command line, you must load the EMM386.EXE device driver into memory by adding a DEVICE= statement in your CONFIG.SYS file. After the EMM386.EXE device driver is loaded into memory, you can use EMM386 from the DOS command line to view the status of EMS and UMB memory and turn various features on and off.

Syntax

EMM386  onoffauto  W=onoff

Parameters and Switches

onoffauto Enables EMM386.EXE (ON), disables it (OFF), or enables it to provide expanded memory and upper memory block support only when a program requests it (AUTO). The default is ON.
W=onoff Enables (W=ON) or disables (W=OFF) support for the Weitek coprocessor. The default is W=OFF.

Notes

  1. Before you can use EMM386.EXE from the command line, you must install EMM386 as a device driver in CONFIG.SYS.

  2. Entering EMM386 with no parameters causes a status report of EMS and UMB memory use to be displayed.

  3. EMM386 honors a request to be turned off only when no EMS or UMB memory is in use. In other words, you can't use the OFF parameter if you are loading any programs into upper memory.

  4. The high memory area (HMA) must be available to enable a Weitek coprocessor. If DOS is loaded into HMA by a DOS=HIGH statement in your CONFIG.SYS file, you might not be able to enable the Weitek coprocessor.

EMM386.EXE (device driver)5.0 and later—External

EMM386.EXE (device driver)5.0 and later—External
EMM386.EXE (device driver)5.0 and later—External

The EMM386.EXE device driver can convert extended memory (XMS) into LIM 4.0–compatible expanded memory (EMS) on a computer with an 80386SX or higher CPU. EMM386.EXE can also create upper memory blocks (UMBs), which DOS can use to load other device drivers and programs into when you add the DEVICEHIGH= and LOADHIGH commands, respectively. EMM386.EXE requires that an XMS-compatible memory manager, such as HIMEM.SYS, be present before EMM386.EXE will load into memory. EMM386.EXE must be loaded in a DEVICE= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathEMM386.EXE  onoffauto  ramval  MIN=size  W=onoff  Ms
FRAME=xxxx  /Pyyyy  /Pn=yyyy  X=mmmm-nnnn  I=mmmm-nnnn  B=zzzz  L=xmsmem
A=regs  H=hhh  D=nnn  RAM=mmmm-nnnn  NOEMS  NOVCPI  HIGHSCAN  VERBOSE
WIN=mmmm-nnnn  NOHI  ROM=mmmm-nnnn  NOMOVEXBDA  ALTBOOT

Parameters and Switches

drive:path Specifies the full path to the EMM386.EXE file on your system. By default, Setup places the EMM386.EXE file in the C:DOS subdirectory. If the full path to EMM386.EXE isn't specified, DOS looks for the file in the root directory of the startup drive.
onoffauto Enables EMM386.EXE (ON), disables it (OFF), or enables it to provide expanded memory and upper memory block support only when a program requests it (AUTO). The default is ON.
ramval Represents the maximum amount of RAM, in kilobytes, to be assigned as EMS 4.0/Virtual Control Program Interface (VCPI) memory. Enter a value ranging from 64 to 32768 or the amount of extended memory available when EMM386.EXE is loaded. Any number that you enter is rounded down to the nearest multiple of 16. The default is 0 if NOEMS is specified. Otherwise, all available extended memory is used as EMS/VCPI memory.
MIN=size (DOS 6 and later) Specifies the minimum amount of RAM (in kilobytes) that EMM386 is guaranteed to provide. Enter a value ranging from 0 to the value of ramval. The default is 0 if NOEMS is specified; otherwise, it is 256. If size is greater than ramval, size is used.
W=onoff Enables (W=ON) or disables (W=OFF) support for the Weitek coprocessor. The default is W=OFF.
Ms Indicates the beginning address of the EMS page frame. s is a number that represents the beginning address. You cannot combine the Ms parameter with the /FRAME=xxxx or /Pyyyy parameters. The numbers and associated hexadecimal addresses are as follows:
 Ms Memory Address Ms Memory Address
M1 C000 M8 DC00
M2 C400 M9 E000
M3 C800 M10[*] 8000
Ms Memory Address Ms Memory Address
M4 CC00 M11[*] 8400
M5 D000 M12[*] 8800
M6 D400 M13[*] 8C00
FRAME=xxxx Specifies a hexadecimal address from 8000 through 9000, and C000 through E000 in increments of 400 hexadecimal or NONE. The latter disables the page frame and may cause programs that require expanded memory to fail. You cannot combine the FRAME=xxxx parameter with the Ms or /Pyyyy parameters.
/Pyyyy Specifies a hexadecimal address from 8000 through 9000, and C000 through E000 in increments of 400 hexadecimal. You cannot combine the /Pyyyy parameter with the Ms or FRAME=xxxx parameters.
Pn=yyyy Defines an address for a page segment. n represents the page and can have a value of 0 through 255. yyyy is a hexadecimal address from 8000 through 9000, and C000 through E000 in increments of 400 hexadecimal. To remain compatible with EMS 3.2, P0 through P3 must be contiguous addresses. You cannot specify P0 through P3 with this option if you use the Ms, FRAME=xxxx, or /Pyyyy parameters.
X=mmmm-nnnn Specifies a range of memory that should not be used for an EMS page frame or UMB space. mmmm and nnnn can have values ranging from A000H through FFFFH and are rounded down to the nearest 4KB boundary. The X switch overrides the I switch if their ranges overlap.
I=mmmm-nnnn Specifies a range of memory that can be used for an EMS page frame or UMB space. mmmm and nnnn can have values ranging from A000H through FFFFH and are rounded down to the nearest 4KB boundary. The X switch overrides the I switch if their ranges overlap.
B=zzzz Indicates the lowest address to use for bank switching (swapping of 16KB pages). zzzz can have a value from 1000H through 4000H. The default is 4000H.
L=xmsmem Specifies the number of kilobytes that must remain as extended memory instead of being converted to EMS memory. The default is 0. For 1MB of memory to remain as extended memory, use L=1024.
A=regs Allocates the number of fast alternative register sets that EMM386.EXE may use (for multitasking). regs can have a value from 0 through 254. The default is 7. Each alternative register set adds about 200 bytes to the size of EMM386.EXE in memory.
H=hhh Enables you to change the number of handles EMM386.EXE can use. hhh can have a value from 2 to 255. The default is 64.
D=nnn Specifies the amount of memory (in kilobytes) reserved for DMA (buffered direct-memory access). This value should cover the largest nonfloppy transfer. nnn can have a value from 16 through 256. The default is 32.
RAM=mmmm-nnnn Specifies a range of memory to be used for UMBs. If you specify RAM without a value, EMM386.EXE allocates all available extended memory, an EMS page frame is established in upper memory, and all remaining upper memory space is converted to UMBs.
NOEMS Specifies that access to UMBs be provided, but not for expanded memory; that is, an EMS page frame is prohibited.
NOVCPI (DOS 6.0 and later) Disables support for VCPI applications. Must be used with NOEMS, in which case ramval and MIN are ignored.
HIGHSCAN (DOS 6.0 and later) Causes EMM386.EXE to be more aggressive in scanning upper memory for UMBs. Your computer may stop responding if you use this switch.
VERBOSE (DOS 6.0 and later) Directs EMM386.EXE to display status and error messages when DOS boots. This switch can be abbreviated as V. (You can also get status and error messages by holding down the Alt key while DOS boots.)
V (DOS 6.0 and later) Same as VERBOSE (see preceding entry).
WIN=mmmm-nnnn (DOS 6.0 and later) Reserves the specified memory address range for Microsoft Windows and prevents EMM386.EXE from using that area of memory. mmmm and nnnn can have values ranging from A000H through FFFFH and are rounded down to the nearest 4KB boundary. The X switch overrides the WIN switch if their ranges overlap. The WIN switch overrides the RAM, ROM, and I switches if their ranges overlap.
NOHI (DOS 6.0 and later) Prevents EMM386.EXE from loading any part of itself into upper memory. Normally, EMM386.EXE uses about 5KB of upper memory for itself. Specifying this switch makes more UMB space available but increases the size of EMM386.EXE in conventional memory.
ROM=mmmm-nnnn (DOS 6.0 and later) Specifies a range of memory for shadow RAM, which is read-only memory (ROM) copied into faster RAM. mmmm and nnnn can have values ranging from A000H through FFFFH and are rounded down to the nearest 4KB boundary.
NOMOVEXBDA (DOS 6.0 and later) Prevents EMM386.EXE from moving the extended BIOS data from conventional memory to upper memory.
ALTBOOT (DOS 6 and later) Directs EMM386.EXE to use a different method of restarting your computer when you press Ctrl+Alt+Del. Specify this parameter only if your computer stops responding or exhibits other unusual behavior when EMM386.EXE is loaded into memory and you press Ctrl+Alt+Del.

[*] Use only in computers with at least 512KB of memory.

Notes

  1. EMM386.EXE works only on 80386, 80386SX, and higher systems.

  2. HIMEM.SYS must be installed as a device driver in CONFIG.SYS before EMM386.EXE.

  3. You cannot use the DEVICEHIGH= command to load EMM386.EXE into memory. EMM386.EXE is required to provide the UMBs that the DEVICEHIGH= command loads device drivers into. EMM386.EXE does attempt to minimize its impact on conventional memory when it loads, using only about 3KB in most cases. To prevent EMM386.EXE from loading parts of itself into upper memory, specify the NOHI parameter.

  4. To create UMBs, you must include the RAM or NOEMS parameters, and you must include at least DOS=UMB in CONFIG.SYS.

  5. Before you can use EMM386 from the command line, you must install EMM386.EXE as a device driver in CONFIG.SYS.

  6. Any DEVICEHIGH= commands in CONFIG.SYS must come after the DEVICE=HIMEM.SYS and DEVICE=EMM386.EXE RAM (or NOEMS) commands.

  7. When EMM386.EXE is used with Microsoft Windows 3.1, the I, X, NOEMS, Ms, FRAME, and Pyyyy switches override the EMMINCLUDE, EMMEXCLUDE, and EMMPAGEFRAME settings in the Windows SYSTEM.INI file.

  8. SMARTDRV double-buffering may be required before DEVICEHIGH= commands, which load installable device drivers that use expanded memory.

  9. When EMM386.EXE is not supplying expanded memory, non–VCPI-compliant programs can run (for example, Microsoft Windows 3.0 in Standard mode).

  10. The high memory area (HMA) must be available to enable a Weitek coprocessor. If DOS is loaded into HMA by a DOS=HIGH statement in your CONFIG.SYS file, you might not be able to enable the Weitek coprocessor.

See Also

DEVICE= and HIMEM.SYS

Using Expanded Memory and EMM386.EXE” in Chapter 19

ERASE (see DEL)

ERASE is an alternative name for the DEL command. For information on using the DEL or ERASE command, see the entry for DEL in this command reference.

ERAQ (see DELQ)

ERAQ (see DELQ)

ERAQ is an alternative command for the DR DOS DELQ command. See the detailed description under DELQ.

EXE2BIN 1.1 to 5.0—External

EXE2BIN 1.1 to 5.0—External
EXE2BIN 1.1 to 5.0—External
EXE2BIN 1.1 to 5.0—External

The EXE2BIN command changes appropriately formatted .EXE files to .BIN or .COM files. EXE2BIN is a programmer's utility; it is provided as a courtesy for those who have compilers that cannot create a memory-image file directly. Most people never find an occasion to use this program. EXE2BIN is included with the DOS 6.0 Supplemental Disk, not in the standard DOS 6.0 package.

Syntax

EXE2BIN  exe_file  binary_file

Parameters and Switches

exe_file The .EXE file to be converted into a memory image file. If no drive is specified, the current drive is assumed. If no subdirectory path is specified, the current subdirectory is assumed. A filename is required, but if you don't specify an extension, .EXE is assumed. Wildcards are not allowed.
binary_file The name of the memory image file to be created. If no drive is specified, the current drive is assumed. If no subdirectory path is specified, the current subdirectory is assumed. If no filename is specified, the filename designated in exe_file is used. If no extension is specified, a .BIN extension is added.

Notes

  1. EXE2BIN is a programming utility that converts .EXE (executable) program files to .COM or .BIN (memory-image) files. The resulting program consumes less disk space and loads slightly faster. Unless you use a compiler-based programming language, you probably will never use this command.

  2. Before EXE2BIN converts an .EXE file to memory-image format, a number of requirements have to be met. In most cases, a program has to be written with this transformation in mind. You cannot convert the typical .EXE program file by using EXE2BIN.

EXIT 2.0 and later—Internal

EXIT 2.0 and later—Internal

You can use EXIT to remove a temporary copy of COMMAND.COM from memory. Typically, you use this command to return to an application program that gives you access to the DOS prompt while it's running. EXIT can remove only temporary copies of COMMAND.COM; it cannot accidentally remove the permanent copy that is loaded when your computer starts up.

Syntax

EXIT

Notes

  1. EXIT has no effect on a copy of COMMAND.COM loaded with the /P switch. Normally, you load COMMAND.COM with the /P switch only in the SHELL= command in your CONFIG.SYS file. Any additional copies that you run (from a batch file, for example) can be removed from memory with the EXIT command.

  2. EXIT is used to close a DOS window in Microsoft Windows. It terminates the temporary copy of COMMAND.COM that Windows launched to create the DOS window.

EXPAND 5.0 and later—External

EXPAND 5.0 and later—External
EXPAND 5.0 and later—External

You can use the EXPAND command to copy a compressed, unusable file from the DOS distribution disks to an uncompressed, usable form.

Syntax

EXPAND  source1  source2  ...  destination

Parameters and Switches

source1 The name of the compressed source file. If no drive is provided, the current drive is assumed. If no subdirectory path is provided, the current subdirectory is assumed. If this parameter is omitted, you are prompted for the source and destination. Wildcards are not allowed.
source2 Additional compressed source files. You can designate as many as can fit in the 127-character limit for a DOS command line. You cannot specify additional source parameters without also specifying a destination parameter.
destination If only one source file is specified, destination can be the full name and location of the destination file, with normal default assumptions. If more than one source file is specified, only a drive and/or path can be specified for the destination. If destination is omitted, DOS prompts you for the name and location to use for expanded files.

Rules

  1. You can use EXPAND to decompress files from the DOS distribution disks only.

  2. If you specify more than one compressed file, you can specify only a destination drive or path (not a filename).

  3. If you don't specify a compressed file or a destination, EXPAND prompts you for the missing information.

  4. If you use EXPAND on a file that is not compressed, an error message appears (see the first item in the following “Messages” section). Despite the error message, the file is still copied to the destination; it just isn't expanded.

Notes

  1. Files stored on the original DOS 5.0 and 6.0 disks are compressed files. This compression enables more data to be stored on fewer disks. Before you can use a file on these disks, however, you must decompress the file.

  2. When you use SETUP to install DOS, the files are decompressed as they are transferred to the subdirectory you chose to install DOS into. If you delete a file accidentally or if a file becomes corrupted, you must retrieve the file again from the original DOS disk. EXPAND transfers the file and decompresses it in the process. Consider EXPAND to be a kind of “one-way” COPY command.

  3. Refer to the file PACKING.LST for a list of which files are included on each of the DOS distribution disks. Microsoft marks the compressed files by replacing the last letter of the extension with an underscore (_). Setup copies the PACKING.LST file into your DOS subdirectory when it installs MS-DOS 6.

Examples

To expand MOVE.EXE from DOS distribution disk #1 to the C:DOS subdirectory, enter the following line:

EXPAND  A:MOVE.EX_  C:DOSMOVE.EXE

Messages

Input file 'filename' already in expanded format

Error: You attempted to expand an uncompressed file. Verify that you specified the correct compressed file.

Error in compressed input file format: filename

Error: The compressed file was corrupted. Use a different copy of the compressed file.

See Also

SETUP

EXTRACT

EXTRACT

EXTRACT extracts files from compressed cabinet, or .CAB, files. Microsoft uses .CAB files to compress all the installation files for Windows 95 and Windows 98.

Syntax

EXTRACT /Y /A /D|/E /L drive:path cabinet filename ...

EXTRACT /Y source newname

EXTRACT /Y /C source destination

Parameters and Switches

cabinet Specifies the name of the cabinet, or .CAB, file to extract files from.
filename Specifies the filename of the file or files to be extracted. Standard wildcards can be used.
source Extracts a compressed file consisting of a cabinet file with only one file in it.
newname Specifies a newname to give the extracted file a name other than the original name.
/A Extracts all cabinet files in the set beginning with the specified file.
/C Copies a source file from Microsoft's proprietary DMF format disks to destination.
/D Displays a cabinet directory.
/E Extracts all files.
/L drive:path Specifies the location to place extracted files.
/Y Does not prompt before overwriting an existing file.

FASTHELP 6.0 and later—External

FASTHELP 6.0 and later—External

The FASTHELP command provides a brief description and the syntax of a DOS command. This is the same help you get by including the /? switch when you issue a DOS command.

Syntax

FASTHELP  command

Parameters and Switches

command The DOS command for which you want help. If you do not provide a command name, DOS provides short, one-line descriptions of all DOS commands.

Notes

The information FASTHELP provides about a command is the same as that provided by the following:

command /?

For more extensive information on DOS commands, type HELP command.

See Also

HELP

Getting Help” in Chapter 3

FASTOPEN 3.3 and later—External

FASTOPEN 3.3 and later—External
FASTOPEN 3.3 and later—External
FASTOPEN 3.3 and later—External
FASTOPEN 3.3 and later—External

FASTOPEN keeps directory information in memory so that DOS can quickly find and open the files you use most. FASTOPEN remains in memory (TSR), so be careful not to run it more than once. If you use FASTOPEN, you should add it to your AUTOEXEC.BAT file.

Syntax

FASTOPEN  drive:=num  ...  /X

Parameters and Switches

drive: Specifies the name of the drive for which directory information should be held in memory.
=num Specifies the number of directory entries to be held in memory (10 to 999). The default is 48. The equal sign is optional.
... Specifies the number of additional drive:=num parameters you need.
/X Tells DOS to use expanded memory to store the information buffered by FASTOPEN.

Rules

  1. You must specify the name of at least one drive for which entries are to be kept in memory. The drive cannot be a floppy drive.

  2. You can use FASTOPEN for up to 24 nonfloppy drives, for a total of 999 files. In the command line, simply type the additional drive names, separated by spaces.

  3. Do not use FASTOPEN from the DOS Shell or when you are running Windows or a disk defragmentation program, such as DEFRAG.

  4. If you provide nnn, the value must be between 10 and 999, inclusive. The minimum value for FASTOPEN is 10, or the maximum level of your deepest directory plus 1—whichever is greater.

  5. You cannot run more than one copy of FASTOPEN. If you want to change FASTOPEN settings, you must reboot your computer.

  6. Each FASTOPEN entry you specify increases the size of FASTOPEN by approximately 48 bytes.

Notes

  1. FASTOPEN works by keeping directory information in memory. Because disk buffers already hold FAT information, FASTOPEN enables DOS to search memory for a file or subdirectory entry, to locate the corresponding FAT entry quickly, and to open the file. If you have many files and use FASTOPEN effectively, you can increase DOS's performance.

  2. As is true of BUFFERS, no predetermined best number exists. The default value of 48 works well in many installations. If your subdirectories run many levels deep or if you use many files, specifying a larger number can improve performance. Using too large a value for nnn (greater than 200), however, slows the system. DOS spends more time examining in-memory directory entries than rereading the entries from the disk.

  3. Alternatively, FASTOPEN can be loaded from your CONFIG.SYS file with the INSTALL= command rather than in your AUTOEXEC.BAT file. With DOS 6, there is no advantage to either placement. Just make sure that you do not attempt to load FASTOPEN from both your CONFIG.SYS and your AUTOEXEC.BAT files.

  4. In most cases, you should use the SMARTDRV disk cache instead of FASTOPEN. SMARTDRV has fewer dangerous interactions with other programs and can speed up your computer even more than FASTOPEN. If you don't have enough memory to use SMARTDRV effectively, consider using the BUFFERS= command to optimize disk-access time.

See Also

BUFFERS= and SMARTDRV

Using FASTOPEN” in Chapter 7

FC 3.3 and later—External

FC 3.3 and later—External
FC 3.3 and later—External

The FC command enables you to compare files for differences. Using the FC switches, you can configure it to do a strict byte-for-byte comparison (as COMP does) or to attempt to resynchronize after differences are detected.

Syntax

For ASCII text files, use the following syntax:

FC  pathname1  pathname2  /A  /C  /L  /LBbuffer  /N  /T  /W  /resync

For binary files, use the following syntax:

FC  pathname1  pathname2  /B

Parameters and Switches

pathname1 Specifies a file or group of files to compare. Normal drive and subdirectory defaults apply, and wildcards are permitted. This parameter must match at least one existing file.
pathname2 Specifies the file or group of files that should be compared to pathname1. Normal drive and subdirectory defaults apply, and wildcards are permitted. Wildcards used with FC are interpreted the same way they are with COPY and REN:. Missing characters in the filename are replaced with the corresponding characters in pathname1. If this file isn't found, FC moves on to the next set of files.
/A Abbreviates the display of an ASCII comparison to the first and last lines of each group of differences.
/B Forces a binary file comparison, which involves a byte-by-byte comparison with no synchronization after a mismatch. This switch is the default for files with .EXE, .COM, .SYS, .OBJ, .LIB, and .BIN extensions.
/C Causes DOS to ignore the case of letters.
/L Compares files in ASCII mode, which involves a line-by-line comparison with resynchronization attempted after a mismatch. This switch is the default for files without .EXE, .COM, .SYS, .OBJ, .LIB, and .BIN extensions.
/LBbuffer Sets the internal buffer to the number of lines specified by buffer. A comparison is terminated if the files have more than this number of consecutive differing lines.
/N Displays line numbers for ASCII comparisons.
/T Suppresses expansion of tabs to spaces.
/W Compresses tabs and spaces to a single space and causes tabs and spaces to be ignored if those characters are at the beginning or end of a line.
/resync Sets the number of lines (1 through 9) that must match before the files are considered to be resynchronized. The default is 2.

Notes

  1. A difference in a binary file comparison is displayed as follows:

    aaaaaaaa: xx yy
    

    aaaaaaaa represents the hexadecimal address of a mismatching pair of bytes, xx is the mismatching hexadecimal byte from the first file, and yy is the mismatching hexadecimal byte from the second file.

  2. If you use a wildcard in the first filename, DOS compares all the specified files with the second filename. If you use a wildcard in the second filename, DOS uses the corresponding value from the first filename in the second filename.

Examples

To compare every text file in the current directory with C:README.TXT, use the following command:

FC  *.TXT  C:README.TXT

To compare README.TXT in the current directory with C:README.TXT, use the following command:

FC  README.TXT  C:*.TXT

To compare every text file in the current directory with the file of the same name in C:, use this command:

FC  *.TXT  C:*.TXT

See Also

DISKCOMP

Comparing Files with FC” in Chapter 8

FCBS= 3.1 and later—Internal

FCBS= 3.1 and later—Internal

File handles were added in DOS 2.0. Most programs written since that time use file handles, not file control blocks (FCBs), to open files. The FCBS= command sets the maximum number of open files a program using DOS 1.0 FCBs can have. With newer programs, you usually don't need this command. FCBS= can be used only in your CONFIG.SYS file.

Syntax

FCBS=maxopen

Parameters and Switches

maxopen The maximum number of open FCBs that a program can use. Any value in the range of 1 to 255 is allowed. The default value is 4.

Notes

  1. Not many programs use FCBs anymore. Include the FCBS= command in your CONFIG.SYS file only if a program asks you to, or if an old utility starts mysteriously failing. Otherwise, accept DOS's default setting of four FCBs. If you set maxopen to 1, you might find that certain small command-line utilities begin to fail.

  2. Be aware that FCBs are ancient history. If you depend on any programs that require them, you are living on borrowed time, and you should start looking for replacements. If you receive a new program that asks you to use the FCBS= command, complain (loudly) to the manufacturer. Microsoft has carried this legacy from CP/M for several years now, and with every release of DOS comes the chance that FCBs will no longer be supported.

  3. If a program attempts to open more than maxopen FCBs, DOS automatically closes some of them.

  4. Each FCB that is available to programs increases the size of DOS by approximately 60 bytes.

  5. For newer programs, set the maximum number of open files by using the FILES= command.

  6. Some older versions of DOS supported a second argument, neverclose, for FCBS=. DOS 5 and 6 have no need for the neverclose argument and will ignore it.

FDISK 2.0 and later—External

FDISK 2.0 and later—External
FDISK 2.0 and later—External

FDISK is a full-screen program that prepares a hard disk to accept an operating system, such as DOS. It sets up partitions on a hard disk as well as designates which partitions are used to start up the computer if no floppy disk is in drive A. On a new hard drive, you must run FDISK before you can use the FORMAT command on the drive.

Caution

FDISK is an extremely dangerous command. Making any changes with FDISK effectively deletes all the information on your hard drive. MS-DOS 6 does not include any utilities with which you can recover information lost through the use of FDISK.

Syntax

FDISK  /STATUS

Parameters and Switches

/STATUS (DOS 6.0 and later) Displays some partition information without starting FDISK.

Rules

  1. You must use FDISK to create a partition on a hard disk before you can use FORMAT to format the hard disk.

  2. You can change the size of a partition only by deleting existing partitions and creating new ones. This procedure deletes all data in the partitions.

  3. FDISK does not work with SUBST aliases, Interlnk drives, network drives, CD-ROM drives, or removable drives of any kind. FDISK works only with hard drives that are supported by the ROM BIOS in your computer. FDISK does not work with hard drives that require you to load a device driver in your CONFIG.SYS file to operate.

Notes

  1. Although Setup places FDISK in the C:DOS subdirectory by default, consider copying FDISK.EXE to a floppy disk and deleting it from your hard drive. If FDISK.EXE isn't on your hard disk, no one can run it, thus avoiding the possible data loss that could result from someone's curiosity.

  2. If you need to use FDISK, back up your hard disk; make sure that you have a bootable floppy disk with at least the FORMAT command and your backup software on it. After FDISK has finished with your hard drive, you cannot boot from it (or even read it) until you have reformatted the drive.

  3. The MIRROR command can save partition information into a file, which can be used by the UNFORMAT command to restore a damaged partition table. Although this capability is still a part of UNFORMAT, the MIRROR command is no longer distributed with DOS and is available only on the Supplemental Disk. Before you use FDISK, you might want to get a copy of MIRROR and save your partition information so that you can restore it if you have problems.

  4. Starting with DOS 3.3, you can use FDISK to create multiple logical partitions on a single drive. In DOS 4.0, FDISK and DOS were upgraded to handle partitions larger than 32MB. The maximum size of a single partition for the DOS 6 version of FDISK is 2GB.

  5. If you plan to use more than one operating system, use FDISK to partition part of the hard disk for DOS and another part of the hard disk for the other operating system.

See Also

MIRROR, UNDELETE, and UNFORMAT

Dividing a Hard Disk with FDISK” in Chapter 7

FILELINK

FILELINK

FILELINK is a utility to transfer files between two computers via a serial or parallel port connection. The FILELINK command with no parameters starts the FILELINK utility in full-screen mode. This command has so many command-line parameters that it is highly recommended you run it without any parameters to start the full-screen utility rather than use it via the command line.

FILES= 2.0 and later—Internal

FILES= 2.0 and later—Internal

When a program tries to open a file, DOS assigns that file a handle, which is just a fancy name for an ID number. The FILES= command sets the maximum number of file handles that DOS has available for programs to use. FILES= can be used only in your CONFIG.SYS file.

Syntax

FILES=maxopen

Parameters and Switches

maxopen The maximum number of open file handles that DOS allows. Any value in the range of 8 to 255 is allowed. The default value is 8.

Notes

  1. Always specify a value for FILES= in your CONFIG.SYS file. DOS's default value of 8 is much too low for today's software programs. You typically need around 30 to 40 file handles, perhaps more if you are running programs such as Microsoft Windows. A good minimum setting is 20.

  2. If a program attempts to open a file when DOS has no more file handles available, it is denied access to the file. DOS does not close open file handles, unlike FCBs, while a program is running.

    Tip

    If you are in the habit of redirecting the output to the NUL device when you load resident software in your AUTOEXEC.BAT file, you may be wasting file handles. Each such redirection unnecessarily ties up one file handle until you restart your computer.

  3. Each file handle available to programs increases the size of DOS by approximately 60 bytes.

  4. Most programs display a meaningful message if they run out of file handles. If this happens, increase the FILES= setting in your CONFIG.SYS file by 5 and restart your computer.

  5. Many software installation programs inspect the setting you are using for FILES= and may even increase it without telling you. Always look through your CONFIG.SYS and AUTOEXEC.BAT files after installing new software, and make sure that any modifications they've made are acceptable to you.

Examples

The following line sets the maximum number of open file handles to 30:

FILES=30

See Also

FCBS=

Using the FILES Command” in Chapter 19

FILEUP

FILEUP

FILEUP starts the File Update System application to maintain duplicate files in two locations.

Syntax

FILEUP /?

Parameters and Switches

/? Displays the abbreviated online help.

Notes

Using the File Update program with floppies requires that the File Update program reside on both systems. For INTERLNK or a LAN, the File Update program files need to reside in only one system.

See Also

INTERLNK

FIND 2.0 and later—External

FIND 2.0 and later—External
FIND 2.0 and later—External

The FIND command displays all the lines of the designated files that match (or do not match, depending on the switches used) the specified string.

Syntax

FIND  /V  /C  /N  /I  "string"  pathname  ...

Parameters and Switches

"string" Represents the characters you want to find. The characters must be enclosed in quotation marks.
pathname Indicates the file that you want to search. All the normal drive and subdirectory defaults apply, but you cannot use wildcards. If you omit pathname, FIND acts as a filter, searching input that has been redirected to it.
... Indicates that you can enter as many pathname parameters as necessary.
/C Displays a count of the total number of lines that contain "string".
/I Specifies that the search is not case sensitive (DOS 5.0 and later versions).
/N Displays lines that contain "string", preceded by the file line number.
/V Displays lines that do not contain "string".

Exit Codes

ERRORLEVEL ValueMeaning
0 FIND completed successfully and found at least one match.
1 FIND completed successfully but found no matches.
2 FIND aborted due to an error and cannot report whether any matches were found.

Rules

  1. You can use more than one file specification. All file specifications must appear after the string and must be separated by spaces.

  2. If you do not provide any file specifications, FIND expects information from the keyboard (standard input).

  3. If you use switches with FIND, you must place them between FIND and the string. Most DOS commands require that you place switches at the end of the command line.

  4. You must enclose the string in double quotation marks. To use the double–quotation mark character itself in the string, use two double quotation marks in a row.

  5. Wildcards are not allowed in file specifications. You can get the effect of wildcards by using FIND in a FOR command.

Notes

  1. FIND is one of several filters provided with DOS 3.0 and later versions. The command can find lines that contain strings and those that do not. FIND also can number and count lines of text, instead of simply displaying them.

  2. This filter is useful when it is combined with DOS I/O redirection. You can redirect the FIND command's output to a file by using the > redirection symbol. Because FIND accepts a sequence of files to search, you do not have to redirect the input to FIND.

Examples

To search README.TXT for "Microsoft", use the following command:

FIND  "Microsoft"  C:DOSREADME.TXT

To search all batch files in the current directory for "default", use the following command:

FOR  %%A  IN  (*.BAT)  DO  FIND  "default"  %%A

To determine the path and filenames for all batch files on the current disk, use this command:

DIR  /S  /B  |  FIND  ".BAT"

See Also

MORE and SORT

The FIND Filter” in Chapter 13

FOR 2.0 and later—Internal

FOR 2.0 and later—Internal
FOR 2.0 and later—Internal

You can use the FOR command to repeat a single command, executing it once for each member of a list or group of files. Unlike most of the other batch commands, FOR can be very useful from both the command line as well as in a batch file.

Syntax

When used in a batch file, the syntax is as follows:

FOR  %%variable  IN  (set)  DO  command  parameters

When used on the DOS command line, the syntax is as follows:

FOR  %variable  IN  (set)  DO  command  parameters

Parameters and Switches

variable Specifies a single character DOS uses to represent the current value of set. You can use any character for variable except the digits 0 through 9, the redirection symbols (<, >, and |), and the slash (/). In a batch file, variable must be preceded by two percent signs (%%), but on the DOS command line only one is used.
set Specifies one or more words or pathnames separated by spaces or commas. Wildcards are allowed in the filename.ext portion of any pathname specified. None of the members of set can include embedded spaces. The enclosing parentheses are required.
command Represents the DOS command to be executed for each word or file in the set. Almost all DOS internal or external commands can be used, with the notable exception of the FOR command itself.
parameters Represents any parameters you would like to pass to the command being executed. Normally, one or more occurrences of variable are used in the command parameters to pass the current value of set to the command.

Notes

  1. You can use more than one word or file pathname in the set. Use spaces or commas to separate each word or file pathname from the next. Any or all parts of a pathname may be used, but wildcards are allowed only in the filename and extension portions.

  2. No member of the set can include embedded spaces. In other words, you can't use variable to replace more than a single “word.”

  3. You must precede every occurrence of variable with two percent signs in a batch file and one percent sign at the DOS prompt. The reason for this difference is that each line in a batch file is passed through a routine called a parser, which fills in any replaceable parameters before DOS executes each command. The parser removes any single percent signs it finds; if two percent signs in a row are encountered, however, one will remain after the parser is finished. By the time DOS executes the command, only one of the two percent signs you typed remains. When you execute the FOR command from the DOS prompt, the line isn't parsed, and no percent signs are removed.

  4. variable becomes each literal word or filename in set. If wildcards are used, each file matched becomes a member of the set. The DO command executes once for each value in the set.

  5. variable can be used in the command portion of the FOR command as well as in the parameters portion. This capability can be useful if you want to execute a series of commands. You can use the variable as many times as you need to after the DO keyword. It will be replaced with the current member of set every time it appears.

  6. You cannot nest FOR..IN..DO commands. That is, you cannot use FOR as the command executed in the DO portion of a FOR..IN..DO loop. All other DOS internal and external commands are legal.

  7. If you execute a batch file directly in the DO portion of the FOR loop, batch file processing ends when that batch file terminates, and control never is returned to the FOR loop. To avoid this situation, use the CALL or COMMAND /C commands to execute batch files in FOR..IN..DO loops.

  8. If you use a variable name that is more than one character long or if you omit IN, the parentheses around set, or DO, DOS displays a syntax error message.

  9. Avoid using redirection symbols (<, >, and |) with the FOR command. In general, DOS ignores output redirection, and most redirected input will fail.

  10. Do not attempt to use the “at” sign (@) to suppress the display of the command in the DO loop. DOS does not interpret the @ correctly and searches for an executable file that begins with an “at” sign. To accomplish the same thing, use ECHO OFF before executing the FOR command.

  11. Although doing so is legal, you can't use the GOTO command to jump to a series of labels in a batch file from the DO portion of a FOR command. The GOTO command works just fine, but there is no mechanism available that enables you to return to the FOR loop when the section of the batch file that you jumped to is finished. To accomplish this task, you have to use the CALL command to call separate batch files instead of jumping to sections in the same batch file.

  12. Be very careful if you are using destructive commands such as DEL or DELTREE in a FOR loop. Although you are debugging the FOR command, you might want to substitute the DIR command, which does not do any harm if anything goes wrong. Make sure that you think through every possible situation. Also, make sure that the wrong files won't be deleted before putting any batch file with a destructive FOR loop into use.

Examples

Suppose that you want to back up all settings files that Windows uses from a batch file. By combining the COPY command with FOR, you could accomplish this with the following line in your batch file:

FOR  %%A  IN  (INI  GRP  PAR  DAT)  DO  COPY  C:WINDOWS*.%%A  A:

Assuming that you had previously prompted to insert the backup disk in drive A, the FOR command would execute the COPY command once for each type of file (.INI, .GRP, .PAR, and .DAT) in which Windows typically saves configuration information.

To execute the same command from the DOS prompt, use single percent signs rather than double ones, as shown here:

FOR  %A  IN  (INI  GRP  PAR  DAT)  DO  COPY  C:WINDOWS*.%A  A:

You can use the FOR command to execute a command a specific number of times. For example, to display five blank lines from a batch file, you could include the following command:

FOR  %%A  IN  (1  2  3  4  5)  DO  ECHO.

After all, there is no rule that says you have to use the %%A variable in the DO portion of the command. The preceding FOR loop repeats the ECHO. (ECHO period) command once for each member in the set, displaying five blank lines onscreen.

You can use FOR to enable a command that doesn't support wildcards to process a pathname specified with wildcards. A classic example of this technique involves the TYPE command. To display multiple files with TYPE, you could enter the following command in a batch file:

FOR  %%A  IN  (%1)  DO  TYPE  %%A

If you specified a pathname that included wildcards as the first parameter to the batch file, TYPE would be executed once for each file that matched the pathname. The only thing wrong with this is that TYPE would display all the files without pausing; so, to see a particular file, you would have to hover over the pause key. Despite this drawback, this example illustrates how you can use the FOR command to overcome this limitation in a command.

See Also

Using FOR..IN..DO” in Chapter 16

FORMAT 1.0 and later—External

FORMAT 1.0 and later—External
FORMAT 1.0 and later—External
FORMAT 1.0 and later—External

The FORMAT command initializes a disk to accept DOS information and files. FORMAT also checks the disk for defective tracks and (optionally) places DOS on the floppy disk or hard disk.

Syntax

FORMAT  drive:  /V  /V:label  /Q  /U  /F:size  /N:sectors  /T:tracks  /S  /B
/1  /4  /8

Parameters and Switches

drive: Specifies a valid drive letter to be formatted, followed by a colon (:).
/V Prompts for a volume label for the disk.
/V:label Makes label (which can be up to 11 characters long) the disk's volume label.
/Q Performs a quick format by clearing only the FAT and root directory on the disk; this switch does not check the disk for bad sectors.
/U Performs an unconditional format for a floppy disk. Unconditional formatting destroys all data on a floppy disk, which means that you cannot unformat the disk. (For more information on unformatting, see UNFORMAT later in this command reference.)
/F:size Specifies the size to which a disk should be formatted, which can be less than the drive's maximum. Generally, you should use this switch in preference to a combination of /N and /T. The following table lists the possible values for size:
 Drive Capacity Allowable Values for size
160KB, 180KB 160, 160K, 160KB, 180, 180K, and 180KB
320KB, 360KB All preceding, plus 320, 320K, 320KB, 360, 360K, and 360KB
1.2MB All preceding, plus 1200, 1200K, 1200KB, 1.2, 1.2M, and 1.2MB
720KB 720, 720K, and 720KB
1.44MB All for 720KB, plus 1440, 1440K, 1440KB, 1.44, 1.44M, and 1.44MB
2.88MB All for 1.44MB, plus 2880, 2880K, 2880KB, 2.88, 2.88M, and 2.88MB
/N:sectors Formats the disk with the number of sectors (sectors ranges from 1 to 99). This switch must be used with /T. Generally, you should use /F instead of this switch.
/T:tracks Formats the disk with the number of tracks per side (tracks ranges from 1 to 999). This switch must be used with /N. Generally, you should use /F instead of this switch.
/S Places copies of the operating system files on the disk so that DOS can boot from the disk. For MS-DOS, those files are the command-line interpreter pointed to by the environment variable COMSPEC (generally COMMAND.COM), the hidden files IO.SYS and MSDOS.SYS, and, if necessary, DBLSPACE.BIN.
/B Leaves space for the system version but does not place the operating system files on the disk. (See the section on the SYS command later in this command reference.) This switch is not necessary in DOS 6.0.
/1 Formats only the first side of the floppy disk.
/4 Formats a floppy disk in a 1.2MB drive for double-density (320KB/360KB) use. Some systems, however, cannot reliably read the resulting disk.
/8 Formats an eight-sector 5 1/4-inch floppy disk (for compatibility with DOS 1.0).

Exit Codes

ERRORLEVEL ValueMeaning
0 Format operation successful
3 Halted by user (Ctrl+C)
4 Halted by a fatal disk error
5 Halted by user at the Proceed with Format (Y/N)? prompt

Rules

  1. If you do not provide a drive name, DOS uses the current drive.

  2. Unless otherwise directed through a switch, DOS formats the disk to the DOS maximum capacity for the drive.

  3. Some switches do not work together. For example, you cannot use the following switch combinations:

    • /V with /8

    • /1, /4, /8, or /B with the hard disk

    • /F with /N and /T

  4. In DOS 5.0 and later versions, if you do not specify /U, FORMAT performs a “safe” format. DOS creates a file containing file information and saves the file to a safe place on disk where the UNFORMAT command can find it if you need to unformat the disk. FORMAT then clears the FAT and root directory of the disk but does not erase any data. Therefore, the UNFORMAT command enables you to restore a disk if you did not intend to format it.

  5. If you are formatting a hard disk, FORMAT displays the following message:

    WARNING, ALL DATA ON NON-REMOVABLE DISK
    DRIVE d: WILL BE LOST!
    Proceed with Format (Y/N)?
    

    Type Y to format the hard disk or N to abort the formatting operation.

Notes

Notes
Notes
  1. FORMAT now displays numbers with embedded commas, making them much easier to read.

  2. Do not try to format any type of virtual disk; a disk that is part of an ASSIGN, SUBST, or JOIN command; or a networked or Interlnk disk.

  3. Never try to format a RAM disk. Under some circumstances, FORMAT acts erratically when you use it to format a RAM disk, particularly RAMDRIVE (the DOS RAM disk program). The responses can range from a Divide overflow message to a lockup of your computer. If the computer locks up, turn off the system and then turn it on again. Obviously, you lose the RAM disk's contents, but no hard or floppy disks are damaged.

  4. In pre-5.0 versions of DOS, FORMAT destroys the information recorded on a floppy or hard disk. Do not use the command on any disk—floppy or hard—that contains useful information.

  5. In DOS 5.0 and later versions, FORMAT performs a safe format. When you use the command to format a previously formatted disk, DOS copies the FAT and root directory before clearing them and then checks the disk. The existing data is not cleared. If you accidentally format a safely formatted disk, you can unformat the disk. To erase all data from a previously used floppy disk, use the /U switch. An unconditional format takes about 27 percent longer than the default safe format.

  6. The /Q switch, another feature of DOS 5.0 and later, enables you to format a disk quickly. The /Q switch clears the FAT and root directory but does not check the disk for bad sectors. To reuse a disk that you know is good, use the /Q switch. The quick format is nearly 80 percent faster than the default safe format.

  7. The 160KB and 180KB disks are known as single-sided, double-density, 5 1/4-inch disks.

    The 320KB and 360KB disks are known as double-sided, double-density, 5 1/4-inch disks.

    The 1.2MB disks are known as double-sided, quadruple or high-density, 5 1/4-inch disks.

    The 720KB disks are known as double-sided, double-density, 3 1/2-inch disks.

    The 1.44MB disks are known as double-sided, quadruple or high-density, 3 1/2-inch disks.

    The 2.88MB disks are known as double-sided, extra-high-density, 3 1/2-inch disks.

Messages

Checking existing disk format

Information: FORMAT is checking the disk to see whether it has been formatted previously.

Saving UNFORMAT information

Information: If the disk has been formatted, the directory and FAT are saved on the disk, and a safe format is performed. A safely formatted disk can be unformatted.

Drive A error. Insufficient space for the MIRROR image file.
There was an error creating the format recovery file.

Warning: The previously formatted disk doesn't have room for the mirror-image file (the file that contains a copy of the FAT and root directory). The disk doesn't have enough room to save a copy of the root directory and FAT. Be sure that you want to format the disk that is located in the drive.

This disk cannot be unformatted.

Warning: FORMAT displays this message when it is prevented from saving information on the disk for UNFORMAT to use. You most likely will see this message when the disk is too full and not enough free space exists for the UNFORMAT information to be saved.

Invalid media or track 0 bad
disk unusable

Warning: Track 0 holds the boot record, FAT, and directory. This track is bad, and the floppy disk is unusable. Try reformatting the floppy disk. If the error reoccurs, you cannot use the floppy disk.

This error can occur when you format 720KB floppy disks as 1.44MB floppy disks (if you forget to use the /N:9 or /F:720 switch when you format the disk in a 1.44MB drive), or when you format 360KB floppy disks as 1.2MB floppy disks (if you forget the /4 or /F:360 switch).

This error also can occur when you format 1.2MB floppy disks at lower capacities (such as 360KB) and use the /4 switch. In this case, try using a floppy disk rated for double-sided, double-density use.

WARNING, ALL DATA ON NON-REMOVABLE DISK
DRIVE d: WILL BE LOST!
Proceed with Format (Y/N)?

Warning: FORMAT is warning you that you are about to format a hard disk. To format the hard disk, type Y and press Enter. If you do not want to format the hard disk, type N and press Enter.

See Also

SYS and UNFORMAT

Chapter 6, “Understanding Disks and Disk Drives”

GOTO 2.0 and later—Internal

GOTO 2.0 and later—Internal

GoTo transfers control to the line following a labeled line in the batch file and continues executing the batch file from that line. GOTO is an unconditional jump and always transfers control whenever the command is encountered.

Syntax

GOTO  label

Parameters and Switches

label The label that DOS should jump to. label transfers execution to the batch file line following label.

Notes

  1. To define a label, enter it at the beginning of a line, preceded by a colon (:). Only the first eight characters of a label are significant, although you can enter as many characters as you want without generating an error. All characters on a line past the eighth character of a label are ignored. Spaces are not allowed in labels.

  2. When the command GOTO label is executed, DOS jumps to the line following the label and continues executing the batch file. The label can be placed before or after the GOTO statement in the batch file.

  3. If a batch file does not contain the label specified by GOTO, the batch file stops and DOS displays a Label not found error message.

  4. Adding a colon as the first character of a line in a batch file effectively “comments out” the line by causing DOS to treat it as a label rather than as a line to be executed. DOS interprets it as a label, however, so using REM is safer.

  5. Although GOTO doesn't generate an error message when you use it from the DOS command line, neither does it serve any purpose. Labels have no meaning on the command line, so the GOTO command has no place to jump to.

See Also

:label and REM

Branching with GOTO” in Chapter 16

GRAFTABL 3.0 to 5.0—External

GRAFTABL 3.0 to 5.0—External
GRAFTABL 3.0 to 5.0—External
GRAFTABL 3.0 to 5.0—External
GRAFTABL 3.0 to 5.0—External
GRAFTABL 3.0 to 5.0—External

GRAFTABL loads into memory the tables of additional character sets to be displayed on the Color Graphics Adapter (CGA). GRAFTABL is included on the DOS 6.0 Supplemental Disk, not in the standard DOS 6.0 package.

Syntax

GRAFTABL  codepage  /STATUS

Parameters and Switches

codepage Represents the three-digit number of the code page for the display. The default value is 437, the code page for the U.S. See Chapter 14, “Understanding the International Features of DOS,” for a list of the code pages that DOS supports.
/STATUS Displays the code page selected for use by GRAFTABL. You cannot specify a codepage and request /STATUS information in the same command. This parameter can be abbreviated as /STA.

Exit Codes

ERRORLEVEL ValueMeaning
0 New character set loaded; no set was loaded previously
1 New character set loaded; previous set replaced
2 Disk error prevented loading new character set
3 Command line invalid; no action taken
4 Incorrect DOS version running

Notes

  1. Load GRAFTABL to display legible characters in the ASCII range 128 to 255 when you are in graphics mode on the Color Graphics Adapter (CGA).

  2. GRAFTABL increases the size of DOS by 1,360 bytes.

  3. If you do not specify a codepage, DOS uses code page 437 in the USA.

  4. After you invoke GRAFTABL, the only way to deactivate the command is to restart DOS.

  5. The IBM CGA in graphics mode produces low-quality ASCII characters in the 128-to-255 range.

  6. GRAFTABL is useful only when your system is equipped with the CGA and when you use the CGA in medium- or high-resolution graphics mode.

See Also

DISPLAY.SYS and CHCP

GRAPHICS 2.0 and later—External

GRAPHICS 2.0 and later—External
GRAPHICS 2.0 and later—External
GRAPHICS 2.0 and later—External

GRAPHICS enables the Print Screen key to print the contents of a graphics screen on a suitable printer. When you first run GRAPHICS, it loads itself into memory and remains there until you restart your computer.

Syntax

GRAPHICS  printer  pathname.pro  /R  /B  /PRINTBOX:STD    /PRINTBOX:LCD  /LCD

Parameters and Switches

printer Specifies the type of printer you are using. printer can be one of the following values:
 Printer Description
COLOR1 IBM Personal Color Printer with a black ribbon
COLOR4 IBM Personal Color Printer with an RGB (red, green, blue, and black) ribbon, which produces four colors
COLOR8 IBM Personal Color Printer with a CMYK (cyan, magenta, yellow, and black) ribbon, which produces eight colors
GRAPHICS IBM Personal Graphics Printer, IBM ProPrinter, or IBM Quietwriter
THERMAL IBM PC-Convertible thermal printer
GRAPHICSWIDE IBM Personal Graphics Printer with an 11-inch-wide carriage
HPDEFAULT Any Hewlett-Packard PCL printer
DESKJET A Hewlett-Packard DeskJet printer
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 RuggedWriter wide printer
THINKJET A Hewlett-Packard ThinkJet printer
pathname.pro Specifies the file that contains printer information. Normal drive and subdirectory defaults apply, but wildcards are not allowed. If you do not specify a printer information file, DOS looks for the file GRAPHICS.PRO in the current directory or the directory containing the GRAPHICS.COM program file (normally C:DOS).
/R Reverses the colors so that the image on the paper matches the image onscreen (a white image on a black background).
/B Prints the background in the color displayed onscreen. You can use this switch only when the printer type is COLOR4 or COLOR8.
/PRINTBOX:STD or/PRINTBOX:LCD Indicates the printbox size, or aspect ratio, to use when converting the image onscreen. This parameter must match the first Printbox statement in the printer profile. You can abbreviate /PRINTBOX as /PB.
/LCD Prints the image as displayed on the PC Convertible's LCD display. This switch is the equivalent of /PRINTBOX:LCD.

HCONVERT

HCONVERT

HCONVERT updates an earlier Stacker drive that was not mounted during Stacker Setup or a removable Stacker drive that needs to be updated.

Syntax

HCONVERT drive: source target /c source|/g /m /?

Parameters and Switches

Drive Specifies the drive letter to be converted.
source Specifies the name of the STACVOL file to update.
target Indicates the STACVOL file to create when using the /g switch.
/c source Updates the named STACVOL file to the new Stacker format.
/g source target Generates a STACVOL file in the new storage format by copying the named old STACVOL file as a new Stacker volume. It does not change the existing STACVOL file. If you omit the drive letter in either volume name, the current disk is used.
/m Use with either /c or /g on a monochrome monitor.
/? Displays the abbreviated online help.

Remarks

Do not interrupt the HCONVERT program and run it only from the DOS command prompt.

HELP 5.0 and later—External

HELP 5.0 and later—External

HELP is a full-screen, online help system that includes information about every DOS command. HELP contains the entire text of the “MS-DOS 6 Command Reference” section from the Technical Reference manual published by Microsoft. In addition, it provides hypertext links and a searchable index that can help you move quickly from one topic to the next.

DOS version 5.0 included a HELP command as well, but it bore more resemblance to the DOS 6 FASTHELP command than to the DOS 6 online help system.

Syntax

HELP  command  /B  /G  /H  /NOHI

Parameters and Switches

command Indicates the command that you want information about. If this parameter is omitted, HELP displays its table of contents screen.
/B Specifies that HELP should use colors more appropriate for a black-and-white (monochrome) or LCD display.
/G Specifies that HELP should use the fastest screen-updating method for a CGA monitor. Don't specify the /G switch if you see “snow” on your monitor.
/H Specifies that HELP should display 43 lines on an EGA monitor or 50 lines on a VGA monitor.
/NOHI Specifies that HELP should limit itself to 8 colors rather than 16.

Notes

  1. For HELP to work, QBASIC.EXE must be in the current directory, in your search path, or in the same directory as HELP.COM.

  2. Help is available for many topics other than DOS commands (for example, CONFIG.SYS commands). See HELP'S table of contents for a complete list.

  3. In addition to extensive syntax help, HELP displays usage notes, examples, and links-related material by hypertext links.

  4. You can get simple syntax help for DOS commands from FASTHELP or by typing the following command:

    command  /?
    

See Also

FASTHELP

Getting Help” in Chapter 3

HIINSTALL or INSTALLHIGH

HIINSTALL or INSTALLHIGH
HIINSTALL or INSTALLHIGH

HIINSTALL (or INSTALLHIGH) executes a program from the CONFIG.SYS file and loads it into upper memory.

Syntax

HIINSTALL drive:pathfilename arguments

Parameters and Switches

drive:pathfilename The drive, path, and filename for the program to execute.
arguments Any optional or required arguments for the program being executed by HIINSTALL.

HILOAD (see LOADHIGH)

HILOAD (see LOADHIGH)

HILOAD is a DR DOS alternative command for the LOADHIGH command. See the detailed description under LOADHIGH.

HIMEM.SYS (device driver) 4.0 and later—External

HIMEM.SYS (device driver) 4.0 and later—External
HIMEM.SYS (device driver) 4.0 and later—External

If your computer has more than 1MB of RAM installed, you should load HIMEM.SYS in your CONFIG.SYS file. HIMEM.SYS is an XMS v3.0-compatible extended memory manager. Its services are required in order for DOS to use the extended memory your computer has installed. HIMEM.SYS should be one of the first device drivers loaded with the DEVICE= command in your CONFIG.SYS file.

Syntax

For most people, the DEVICE= line that loads HIMEM.SYS can be very simple:

DEVICE=drive:pathHIMEM.SYS

The full syntax for HIMEM.SYS can seem intimidating, but all the optional parameters have appropriate defaults:

DEVICE=drive:pathHIMEM.SYS  /A20CONTROL:onoff  /CPUCLOCK:onoff  /EISA
/HMAMIN=min  /INT15=size  /NOTEST  /NUMHANDLES=num  /MACHINE:machcode
/SHADOWRAM:onoff  /VERBOSE  /V

Parameters and Switches

drive:path The full path to the HIMEM.SYS file on your system. Setup places the HIMEM.SYS file in the C:DOS subdirectory by default. If the full path to HIMEM.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
/A20CONTROL:onoff The A20 line is the address line that controls access to extended memory, including the high memory area (HMA). Specifying /A20CONTROL:OFF instructs HIMEM.SYS to take control of the A20 line only if it's off when HIMEM.SYS loads into memory. The default value is /A20CONTROL:ON, which allows HIMEM.SYS to take control of the A20 address line no matter what state it is in. As long as HIMEM.SYS is the first program to access extended memory when you reboot your computer, you should never need this parameter.
/CPUCLOCK:onoff On certain computers, HIMEM.SYS may change the CPU clock speed when it loads. If this happens to you, specify the /CPUCLOCK:ON parameter to prevent HIMEM.SYS from changing the CPU clock speed. The default value is /CPUCLOCK:OFF, which allows HIMEM.SYS to load a little faster on most computers.
/EISA You need to include this parameter only if you have an EISA (Extended Industry Standard Architecture) computer with more than 16MB of RAM installed. Including this parameter allows HIMEM.SYS to control all the available extended memory in such a system.

Note

HIMEM.SYS versions 3.07 through 3.09 (v3.09 is distributed with DOS 6) may fail to recognize more than 64MB of memory on an EISA computer even with the /EISA parameter specified. If you have this problem, contact Microsoft and ask for document number Q98111 as well as any other available material that can help you get around this limitation.

/HMAMIN=min

Only one application can use the HMA at a time. The /HMAMIN=min parameter specifies the minimum amount of RAM (in kilobytes) that an application must request to be granted access to the HMA. Valid values for min are in the range 0 through 63. If this parameter is omitted, a value of 0 is assumed, and the HMA is granted to the first program that requests it.

Normally, you want to load DOS into the HMA to save 43KB of conventional memory. However, DOS does not allocate the HMA until after all other device drivers and programs in your CONFIG.SYS file are loaded. To prevent them from allocating the HMA before DOS can get to it, try specifying /HMAMIN=40 in the line that loads HIMEM.SYS.

/INT15=size Certain older applications use the Interrupt 15h interface to allocate extended memory. If you are using a program that requires this type of memory, you can set some aside for it by using the /INT15=size parameter. size is specified in kilobytes and can be any value in the range 64 to 65,535, or the amount of extended memory you have in your system—whichever is lower. Note that you should specify 64KB more than your application requires because the HMA is allocated from this memory as well. Any memory you set aside with the /INT15 parameter is unavailable to programs using the standard XMS interface. If you do not specify the /INT15 parameter, no memory is set aside (except the HMA).
Note /NOTEST This parameter specifies that you do not want HIMEM.SYS to scan extended memory when it loads. Normally, HIMEM.SYS attempts to identify weak and unreliable RAM chips by scanning all extended memory.
/NUMHANDLES=num When programs request extended memory, they are given a handle to an extended memory block by HIMEM.SYS. The /NUMHANDLES=num parameter specifies how many handles HIMEM.SYS should have available. num can be any value in the range 1 to 128. If this parameter is omitted, 32 handles will be available. Each handle increases the size of HIMEM in memory by approximately 6 bytes. If the /VERBOSE (or /V) parameter is specified, HIMEM.SYS displays the number of handles available when it finishes loading into memory. (See the message num extended memory handles available in the following “Messages” section.)
/MACHINE:machcode

This parameter is required only if HIMEM.SYS is unable to gain control of the A20 address line for your computer. When this happens, HIMEM.SYS stops loading and displays an error message. (See the message ERROR: Unable to control A20 line! in the following “ Messages ” section.) To enable HIMEM.SYS to work with your computer, you might have to specify one of the machine codes from the following table. The default value for this parameter is /MACHINE:1 or /MACHINE:AT.

machcode can be the number in the Code column or the abbreviation shown, whichever you find easier to type and remember. Note that more than one computer type can use the same code number.

 Computer Type Code Abbreviation
 IBM AT or 100% compatible 1 AT
 CompuAdd 386 systems 1 or 8 AT
 JDR 386/33 1 AT
 Phoenix BIOS 1 or 8 AT or WYSE
 IBM PS/2 2 PS2
 Datamedia 386/486 2 PS2
 UNISYS PowerPort 2 PS2
 Phoenix Cascade BIOS 3 PTLCASCADE
 HP Vectra (A and A+) 4 HPVECTRA
 AT&T 6300 Plus 5 ATT6300PLUS
 Acer 1100 6 ACER1100
 Toshiba 1600, 1200XE, and 5100 7 TOSHIBA
 Wyse 12.5MHz 286 8 WYSE
 Hitachi HL500C 8 WYSE
 Intel 301z or 302 8 WYSE
 Tulip SX 9 TULIP
 Zenith ZBIOS 10 ZENITH
 IBM PC / AT (alternative delay) 11 AT1
 IBM PC / AT (alternative delay) 12 AT2
 CSS Labs 12 CSS
 IBM PC / AT (alternative delay) 13 AT3
 Philips 13 PHILIPS
 HP Vectra 14 FASTHP
 IBM 7552 Industrial Computer [*] 15 IBM7552
 Bull Micral 60 [*] 16 BULLMICRAL
 Dell XBIOS [*] 17 DELL
 

You might have to specify 1 or AT as the machine type for your computer, despite the fact that 1 is the default value for the /MACHINE parameter. HIMEM.SYS tries to determine what type of computer you have when it loads into memory; if it gets confused, it may select the wrong method for controlling the A20 line. In these cases, you might have to explicitly set the machine type to 1.

For the version of HIMEM.SYS that is distribute d with DOS 6 (v3.09), the only systems that should require the use of the /MACHINE parameter to operate are the Acer 1100 (code 6), the Wyse 12.5MHz 286 (code 8), and the IBM 7552 Industrial Computer (code 15). Systems that have the same code value as these systems are likely to require this parameter as well.

/SHADOWRAM:onoff

This parameter is useful only on computer systems with less than 2MB of RAM. On such systems, if HIMEM.SYS detects that the ROM BIOS is running from shadow RAM, it attempts to reclaim that memory and turn it into available XMS memory. If you don't want HIMEM.SYS to do this, specify the /SHADOWRAM:ON parameter.

Note that specifying /SHADOWRAM:ON allows only the ROM BIOS to continue to run from RAM. HIMEM.SYS cannot set up shadow RAM on a system that doesn't already have it.

/VERBOSEThis parameter specifies that HIMEM.SYS should display status messages while it loads. By default, HIMEM.SYS doesn't display any messages unless an error occurs. You also can turn on the display of messages while HIMEM.SYS is loading by pressing the Alt key.
/V This switch is an abbreviated form of the /VERBOSE parameter.

[*] Not available in the version of HIMEM.SYS distributed with DOS 5.

Notes

Notes
  1. HIMEM.SYS now automatically performs a memory scan to identify RAM chips that are becoming unreliable. An unreliable RAM chip can halt your computer in the middle of a critical operation and could lead to a serious loss of data. If you don't want HIMEM.SYS to perform this memory scan, include the new /NOTEST switch.

  2. HIMEM.SYS requires at least an 80286-based computer with more than 1MB of RAM installed in order to run. Computers with less than 1MB of RAM have no extended memory to manage.

  3. You cannot load HIMEM.SYS with a DEVICEHIGH= command. HIMEM.SYS is one of the programs that enables you to load other device drivers or programs into upper memory with the DEVICEHIGH= or LOADHIGH commands. HIMEM.SYS does attempt to minimize its use of conventional memory; after HIMEM.SYS is loaded, it uses only about 1KB of conventional memory.

  4. The line that loads HIMEM.SYS should be one of the very first DEVICE= lines in your CONFIG.SYS file. If any other driver using extended memory is loaded before HIMEM.SYS, the chances are very good that HIMEM.SYS will refuse to load.

  5. The DOS 6 Setup program inserts the DEVICE= line, which loads SETVER.EXE before the line for HIMEM.SYS. This doesn't cause any problems, but it does prevent you from loading SETVER.EXE into upper memory with the DEVICEHIGH= command. To gain a little conventional memory, move the DEVICE= line for SETVER.EXE after the lines that load HIMEM.SYS and EMM386.EXE and change the DEVICE= command into a DEVICEHIGH= command.

  6. HIMEM.SYS (or another XMS-compatible memory manager) must be loaded before you can use any of the following commands or drivers in your CONFIG.SYS file:

    DEVICEHIGH=
    DOS=HIGH
    DOS=UMB
    EMM386.EXE
    

    The DOS=UMB and DEVICEHIGH= commands actually depend on a UMB provider such as EMM386.EXE. Because most UMB providers require the use of XMS memory, however, they all indirectly depend on HIMEM.SYS.

  7. If HIMEM.SYS is unable to gain control of the A20 address line, it aborts with an error message. (See the message ERROR: Unable to control A20 line! in the following “Messages” section.) Unless your computer's hardware is incompatible, HIMEM.SYS should be able to gain control; its failure to do so usually means that another program is preventing HIMEM.SYS from doing its job. Two programs cannot share control of extended memory, so you have to remove one of them from your CONFIG.SYS file. Check to see whether you are loading any third-party memory managers before the line that loads HIMEM.SYS. (If HIMEM.SYS were loading first, your third-party memory manager would be the one displaying the error message, probably telling you to remove HIMEM.SYS.)

    If no other memory managers are loading before HIMEM.SYS, it might be baffled by the method used to control the A20 address line in your computer. In these cases, you have to specify a /MACHINE:machcode parameter to tell HIMEM how to control the A20 address line. Look for your computer in the table of machine codes. (See the table of machine codes in the preceding “Parameters and Switches” section.) If you find your computer listed, add a /MACHINE:machcode parameter to the line that loads HIMEM.SYS in your CONFIG.SYS file.

Examples

The first few lines in most people's CONFIG.SYS files look something like this:

DEVICE=C:DOSHIMEM.SYS
DEVICE=C:DOSEMM386.EXE RAM MIN=0
DOS=HIGH,UMB

First, HIMEM.SYS is loaded into memory to provide access to the HMA and XMS-compatible memory. Then, EMM386.EXE is loaded, which provides upper memory block (UMB) support for DOS as well as EMS-compatible memory for those programs that use it. (The RAM switch enables UMB and EMS support, and MIN=0 lets EMM386.EXE release back into the memory pool EMS memory that's not in use.) Finally, DOS is instructed to load itself into the high memory area (HMA) provided by HIMEM.SYS and to establish connections with the UMBs provided by EMM386.EXE.

If you own an Acer 1100 computer, you might have to include a /MACHINE parameter to let HIMEM.SYS know how to control the A20 line in your computer, as shown in the following example:

DEVICE=C:DOSHIMEM.SYS  /MACHINE:ACER1100  /V

When you include the /V (or /VERBOSE) parameter, HIMEM.SYS displays all messages while it loads into memory, so you can keep track of how it is doing. Notice that you can enter the machine code parameter as /MACHINE:ACER1100 or /MACHINE:6, but not as /ACER1100.

Messages

64K High Memory Area is available

Information: If you have specified the /VERBOSE parameter, HIMEM.SYS displays this message after successfully gaining control of the A20 line.

ERROR: An Extended Memory Manager is already installed

Error: Another XMS memory manager was installed before HIMEM.SYS. If you are using a third-party memory manager, remove the line that loads HIMEM.SYS from your CONFIG.SYS file. If you want to use HIMEM.SYS, remove the other memory manager instead.

ERROR: HIMEM.SYS requires an 80x86-based machine

Error: HIMEM.SYS can't run on 8088- and 8086-based computers. The only function of HIMEM.SYS is to control and regulate the use of extended memory, and these types of computers don't have any.

ERROR: HIMEM.SYS requires DOS 3.00 or higher

Error: Version 3.09 of HIMEM.SYS, which is the version distributed with MS-DOS 6.0, requires at least DOS 3 to run. If you know that you're running DOS 5 or 6 (to find out, use the VER command), check your SETVER.EXE version table to make sure that no one has entered HIMEM.SYS into it as a practical joke.

ERROR: No available extended memory was found

Error: HIMEM.SYS can't find any extended memory in your system. You may not have enough RAM installed to run HIMEM.SYS.

ERROR: Unable to control A20 line!

Error: HIMEM.SYS displays this message if it is unable to gain control of the A20 line in your computer. Normally, this message means that you must specify a /MACHINE:machcode parameter on the line that loads HIMEM.SYS in your CONFIG.SYS file.

ERROR: VDISK memory allocator already installed
XMS Driver not installed

Error: A device driver that loaded before HIMEM.SYS allocated some extended memory with the Interrupt 15h interface. To get HIMEM.SYS to load, make sure that the DEVICE= line for HIMEM.SYS precedes the driver using Interrupt 15h. To reserve memory for this other driver, specify an /INT15=size parameter on the line for HIMEM.SYS.

Installed A20 handler number num

Information: HIMEM.SYS has gained control of the A20 line using machine handler number num. Check the table shown earlier in the “Parameters and Switches” section to see what computer system num corresponds to.

Minimum HMA size set to minK

Information: Programs that attempt to allocate less than minK RAM in the HMA are denied. If min is greater than zero, you've probably set the /HMAMIN=min parameter to prevent another program from grabbing the HMA before DOS can get to it.

num extended memory handles available

Information: HIMEM.SYS has created num extended memory block handles, either by default or through the use of the /NUMHANDLES=num parameter.

Shadow RAM disabled

Information: On computers with less than 2MB of RAM, HIMEM.SYS often disables shadow RAM to make more extended memory available. If you don't want HIMEM.SYS to disable shadow RAM, specify the /SHADOWRAM:ON parameter.

WARNING: Invalid parameter ignored

Warning: An invalid parameter was specified on the line that loaded HIMEM.SYS. Check the line in CONFIG.SYS carefully and look any for mistyped options.

WARNING: Shadow RAM disable not supported on this system

Warning: HIMEM.SYS is unable to disable shadow RAM for your computer. If you want to turn off shadow RAM, you have to use your computer's CMOS Setup program or set jumpers on the motherboard.

WARNING: Shadow RAM is in use and can't be disabled

Warning: You have specified /SHADOWRAM:OFF, but it's already in use and HIMEM.SYS can't disable it. You might have to use your CMOS Setup program if you want to turn off shadow RAM on your computer.

WARNING: The A20 Line was already enabled

Warning: Another program has enabled your computer's A20 line, and HIMEM.SYS is unsure what to make of it. Usually, HIMEM.SYS still assumes control of extended memory. To avoid this warning, make sure that HIMEM.SYS is loaded before any other drivers that use extended memory. If you have another device driver that needs to control the A20 line, you might have to specify the /A20CONTROL:OFF parameter to get HIMEM.SYS to cooperate with the other device driver.

WARNING: The High Memory Area is unavailable

Warning: This message may appear if you have only 1MB of RAM or if another program has taken over the HMA. Make sure that HIMEM.SYS is loaded before any other drivers that use extended memory.

See Also

DEVICE=, DOS=, and EMM386.EXE

Using Extended Memory and HIMEM.SYS” in Chapter 19

IBMAVD

IBMAVD

IBMAVD opens the IBM AntiVirus/DOS full-screen utility program.

Syntax

IBMAVD

IBMAVSP

IBMAVSP

You use the IBMAVSP command to start IBMAVSP, the IBM AntiVirus standalone program. This program can help find and remove a virus when the system is too badly infected to use the full-screen IBM AntiVirus program. It can also be incorporated into .BAT files. If no options are specified, IBMAVSP operates interactively.

Syntax

IBMAVSP * *n drive... -mem -allfiles -programs -oneflop -loglogfilename -vlog
-nlog -nb -copenerr -cerr -nrep -nwipe -nfscan -yrep -ywipe -yfscan /?

Parameters and Switches

* Scans all local fixed drives for viruses.
*n Scans all network drives.
drive:... Scans the drive specified. One or more drive letters can be specified on the command-line statement.
-mem Scans memory. This parameter can be used when only memory (not drives) needs to be checked.
-allfiles Scans all files on the specified drives for viruses.
-programs Scans only programs on the specified drives for viruses.
-oneflop Prevents the IBMAVSP program from asking for a second disk to scan.
-loglogfilename Specifies where IBMAVSP is to place the log file. If logfilename is not specified, the log is written to the file IBMAVSP.LOG in the current directory.
-vlog Specifies that the names of all scanned files and boot sectors be placed into the log file, whether an object was infected or not.
-nlog Specifies that no log file is to be created.
-nb Specifies no beep when a virus is found.
-copenerr Continues checking for viruses without asking, even if a file cannot be opened for scanning.
-cerr Continues checking for viruses without asking, even if a nonfatal error is encountered.
-nrep Specifies that infected files or boot sectors should not be repaired.
-nwipe Specifies that infected files should not be erased and infected boot sectors should not be replaced if they cannot be repaired.
-nfscan Specifies not to offer to perform a final, thorough scan if viruses are found.
-yrep Specifies that infected files or boot sectors be repaired.
-ywipe Specifies that infected files should be erased and infected boot sectors should be replaced if they cannot be repaired.
-yfscan Specifies that a final, thorough scan should be performed automatically if viruses are found.
/? Displays the abbreviated online help.

IEXTRACT

IEXTRACT

The IEXTRACT command extracts a file from an Internet Explorer backup information file with the .DAT extension.

Syntax

IEXTRACT /W /L dir drive:path filename ...

Parameters and Switches

/W Generates a warning before overwriting a file.
/L dir Saves extracted files in the location specified by dir.
drive:path Specifies the drive and path location of the .DAT file.
filename Specifies the name of the file or files to extract from the backup information file. If no filename is specified, all files in the .DAT file will be extracted.

IF 2.0 and later—Internal

IF 2.0 and later—Internal
IF 2.0 and later—Internal

You can use the IF command to add conditional execution of a DOS command to your batch files. You can test for three types of conditions with the IF command: the value of an exit code returned by a program, the equivalence of two alphanumeric strings, and the existence of a file or subdirectory.

Syntax

To test the exit code returned by a program, use the following form of the IF command:

IF  NOT  ERRORLEVEL  number  command  parameters

To compare two alphanumeric strings, use the following form of the IF command:

IF  NOT  string1==string2  command  parameters

To check for the existence of a file or files, use the following form of the IF command:

IF  NOT  EXIST  pathname  command  parameters

Parameters and Switches

NOT Tests for the opposite of the condition. In other words, IF NOT executes the command if the condition is false.
ERRORLEVEL number Tests the exit code (0 to 255) that a program returns when it terminates. If the exit code is greater than or equal to the number, the condition is true.
string1==string2 Compares two alphanumeric strings to determine whether they are identical. This comparison is case sensitive, so upper- and lowercase characters are not considered equal. The strings can include literals, batch file replaceable parameters (such as %1), environment variables (such as %COMSPEC%), or any combination of the three.
EXIST pathname Tests whether the file specified by pathname exists. If no drive or path is included in pathname, the current drive or directory is assumed. The filename portion is required. Wildcards are allowed in the filename and extension portions of pathname.
command Represents the DOS command that is executed if the condition is true (or false if NOT is specified). If you want to run a batch file, use the CALL or COMMAND /C command instead of executing the batch file directly.
parameters Represents any parameters you want to pass to the command being executed.

Notes

  1. For the IF command, if the condition is true, the command is executed. If the condition is false, DOS skips the command and immediately executes the next line of the batch file.

  2. For the IF NOT subcommand, if the condition is false, the command is executed. If the condition is true, DOS skips the command and immediately executes the next line of the batch file.

  3. If you want to run a batch file from the command portion of an IF command, use the CALL or COMMAND /C command instead of executing it directly. Without CALL or COMMAND /C, control never returns to your batch file.

  4. IF commands can be nested. That is, you can use the IF command in the command portion of an IF command. This can be a handy way to test for a range of exit code values, freeing you from the tyranny of descending order IF ERRORLEVEL statements. (See the following “Examples” section.)

  5. Do not attempt to use the “at” sign (@) to suppress the display of the command specified in the command portion of an IF command. DOS will not interpret the @ correctly and will search for an executable file that begins with an “at” sign. To accomplish the same thing, enter ECHO OFF before executing the IF statement.

  6. IF ERRORLEVEL number returns true if the number you specified is less than or equal to the exit code returned by the previous program. For this reason, IF ERRORLEVEL commands usually have to be arranged in descending order to get the desired results. You must test for this value immediately after the program terminates. Executing any other command, even if it doesn't return an exit code, may clear the previous exit code from memory.

  7. Not all programs return exit codes. If a program doesn't return an exit code, an IF ERRORLEVEL 0 command evaluates to true, but any other number causes the IF statement to be false. Presently, no DOS internal commands return exit codes, and, unfortunately, you can't set the exit code for a batch file either. The following DOS external commands return exit codes:

    BACKUP DISKCOPY MSAV
    CHKDSK FIND REPLACE
    CHOICE FORMAT RESTORE
    DEFRAG GRAFTABL SCANDISK
    DELTREE KEYB SETVER
    DISKCOMP MOVE XCOPY
  8. If you use CALL to call a program that returns an exit code, that exit code value is available after CALL returns. Unfortunately, you can't set the exit code for a batch file, so CALL can't return an exit code from a batch file you have executed. To return status information from a batch file executed with the CALL command, create an environment variable and set it equal to your return status. Then, you can test this environment variable in the calling batch file.

  9. For string1==string2, DOS makes a literal, character-by-character comparison of the two strings. Neither string can contain embedded spaces or equal signs. If you want to include a percent sign (%) in either string, include it twice if this IF command is executed from a batch file. The comparison IF performs is case sensitive; that is, uppercase and lowercase characters are considered to be different.

  10. When you include environment variables (such as %COMSPEC%) or replaceable parameters (such as %0 through %9) in either string argument in a batch file, they are replaced with the value of the environment variable or replaceable parameter when DOS parses the line. DOS does not parse commands you enter at the DOS prompt, so you can't include either type of variable in a command that you execute from the DOS prompt.

  11. When IF is performing string1==string2 comparisons, each string must have at least one character in it; otherwise, a syntax error will result, and DOS will abort the batch file. In DOS 6 and later, string2 can be empty without causing an error. This problem often happens in IF statements that test replaceable parameters or environment variables and typically is solved by adding dummy characters to both strings. For instance, test %1x==ERNIEx or "%1"=="ERNIE" instead of %1==ERNIE.

  12. Including only one equal sign in an IF string comparison results in a syntax error. Interestingly enough, you can use more than two equal signs without causing an error.

  13. The EXIST pathname form of the IF command returns true if at least one file matches the pathname specified. If an invalid subdirectory or drive is specified, the condition is false. DOS does not search the DOS PATH for pathname; DOS searches only the drive and subdirectory specified. If pathname is omitted, DOS searches the current drive and directory.

  14. Although the EXIST pathname form of the IF command is intended to test for the existence of files, you can use it to test for the existence of a subdirectory by specifying the NUL device as the filename. The NUL device (or any other valid DOS device) exists in every subdirectory; so if the specified subdirectory exists, the IF EXIST pathNUL command is true.

Examples

Notice that because of the way the IF ERRORLEVEL command works—testing whether an exit code is greater than or equal to the number specified—the following statement always executes the GOTO statement:

IF  ERRORLEVEL  0  GOTO  ALWAYS_JUMP

When you're testing an ERRORLEVEL number, be sure to test for the highest possible number first. Consider the following example:

IF  ERRORLEVEL  1  GOTO  ONE_OR_GREATER

IF  ERRORLEVEL  2  GOTO  TWO_OR_GREATER

The preceding example always goes to ONE_OR_GREATER, even if an ERRORLEVEL of 2 is returned because 2 is greater than or equal to 1. Make sure that when you use IF ERRORLEVEL commands, you include them in descending order.

You can get around the limitation just noted by nesting IF ERRORLEVEL commands, checking for ranges of values with upper and lower bounds. Test for the lowest value; then test for NOT the highest value plus one in an embedded IF command. For example, consider the following IF commands:

IF  ERRORLEVEL  1  IF  NOT  ERRORLEVEL  4  GOTO  ONE_TO_THREE

In English, if the exit code returned by the program is greater than or equal to the first value (1) and less than the second value (not greater than or equal to 4), execute the command. Notice that this form of the IF ERRORLEVEL command executes the proper GOTO command, no matter what order they are executed in. To test for a single value, simply embed a negative test for one more than the value you want, like this:

IF  ERRORLEVEL  2  IF  NOT  ERRORLEVEL  3  GOTO  ONLY_TWO

IF string comparisons are often used to make sure that at least one parameter is specified when the batch file is executed, as shown in these examples:

IF  "%1"==""  GOTO  HELP_MESSAGE

IF  "%1"=="/?"  GOTO  HELP_MESSAGE

If no parameters to the batch file are specified, the first IF condition is true, and the GOTO command jumps to a section of the batch file where you can display a help message. The second IF statement tests for the /? help switch, enabling this batch file to honor a request for help from the user as well.

Sometimes this technique is combined with the SHIFT command to enable a batch file to loop through a variable number of parameters, as shown in the following:

:LOOP
IF  "%1"==""  GOTO  END
TYPE  %1  |  MORE
SHIFT
GOTO  LOOP

:END

You could specify as many text files as you wanted to when executing this batch file, and the TYPE command would display each one in turn. After the last file had been displayed, the IF command would execute the GOTO END command, and the batch file would terminate. When you combine IF and GOTO in this way, you can create a multiline loop in a batch file.

To jump around part of a batch file if the network menu choice was not chosen from a DOS 6.0 startup menu, use the following line:

IF  NOT  "%CONFIG%"=="NETWORK"  GOTO  FINISH

Notice that in all the preceding examples, quotation marks are used to ensure that the string comparisons never try to evaluate a null string. For example, in the preceding command, if the CONFIG environment variable turns out to be undefined, DOS evaluates the following statement after the parser makes substitutions:

IF NOT ""=="NETWORK" GOTO FINISH

Without the quotation marks, one side of the comparison would be empty, and the batch file would be aborted with a syntax error message. With the quotation marks included, DOS simply finds "" not equal to "NETWORK".

Suppose that you want to copy all the .DOC files in your C:WORK subdirectory to a backup disk. You could use the IF EXIST command, as follows, to make sure that at least one .DOC file existed before executing the COPY command:

IF  EXIST  C:WORK*.DOC  COPY  C:WORK*.DOC  A:

The IF EXIST command can be used to check for the existence of a subdirectory if you specify the NUL device as the filename. You can use this technique to create a subdirectory if it doesn't already exist:

IF  NOT  EXIST  C:WORKNUL  MD  C:WORK

By nesting IF EXIST commands, you also can check to make sure that a file doesn't exist:

IF  EXIST  C:WORKNUL  IF  NOT  EXIST  C:WORKMYFILE.TXT  GOTO  NOFILE

Notice that simply checking for the file with IF NOT EXIST can return true if the subdirectory or drive is invalid, which might lead to errors later in your batch file. By testing for the existence of the path and then checking that the file doesn't exist, you can be sure that creating MYFILE.TXT in the C:WORK subdirectory will succeed without overwriting another file.

See Also

:label, %envir%, %n, and GOTO

Using the IF Command” in Chapter 16

INCLUDE= 6.0 and later—Internal

INCLUDE= 6.0 and later—Internal

After you set up a startup menu, you might find that in certain configuration blocks, you are entering the same commands over and over. Instead of retyping them, you can gather them all together in a block of their own and use the INCLUDE= command to include that block within the others. The [COMMON] block performs a similar function for commands that you want to include in all your configuration blocks. INCLUDE= can be used only in your CONFIG.SYS file.

Syntax

INCLUDE=blockname

Parameters and Switches

blockname The name of the configuration block that you want to include when the active configuration block is processed. blockname must match a configuration block you have defined elsewhere in your CONFIG.SYS file, and it also can contain INCLUDE= commands. This argument is required.

Notes

  1. The INCLUDE= command can appear only inside configuration blocks in CONFIG.SYS and can refer only to another configuration block. You cannot use INCLUDE= to include the selections from one menu block within another.

  2. CONFIG.SYS allows two types of blocks: menu blocks and configuration blocks. Each block begins with a [blockname] and includes all the lines that follow up to the next [blockname]. Menu blocks, which are blocks named [MENU] or defined with a SUBMENU= command, can include only menu-related commands. All other CONFIG.SYS commands belong in configuration blocks.

    The [COMMON] block is a special kind of configuration block, and certain special rules apply to it. It is the only block name that you can have more than once in your CONFIG.SYS file. All commands included in a [COMMON] block are always executed. Any commands in CONFIG.SYS that are not included in any block (that is, they appear before the first [blockname]) are assumed to be in a [COMMON] block.

    [COMMON] blocks are an alternative to using the INCLUDE= command. If you are using INCLUDE= to include a single block of commands in all your configuration blocks, consider using a [COMMON] block instead.

  3. You are allowed to nest INCLUDE= commands. That is, a block included with the INCLUDE= command can have another INCLUDE= command within it. Although there is no clear limit to how deep this nesting can go, for the sake of clarity, you should limit yourself to no more than one or two levels of INCLUDE= commands.

    Caution

    Because nesting is allowed, there is the possibility of creating an endless loop. Make sure that an included block never includes any block that included it (that is, A includes B, which includes A).

  4. The INCLUDE command is meant to help you eliminate repetition in your CONFIG.SYS file. Its use, however, often makes your CONFIG.SYS file harder to understand. Weigh these factors carefully when you decide whether to use an INCLUDE block. When software you are installing makes a mess of your menu system, a clear, simple CONFIG.SYS file is easier to repair than a complicated one.

Examples

The following sample CONFIG.SYS file illustrates the use of INCLUDE= blocks and [COMMON] blocks:

[MENU]
MENUITEM=MINIMUM, Minimal Configuration
MENUITEM=NORMAL, Normal Configuration (Default)
MENUITEM=NORM_EMS, Normal Configuration with EMS Available
MENUITEM=MAXIMUM, All the Bells and Whistles
MENUDEFAULT=NORMAL, 30

[COMMON]
DEVICE=C:DOSHIMEM.SYS
DOS=HIGH
BREAK=ON
NUMLOCK=OFF

[MINIMUM]
BUFFERS=30
LASTDRIVE=H
STACKS=9,256

[NORMAL]
INCLUDE=MINIMUM
DEVICE=C:DOSEMM386.EXE NOEMS
DOS=UMB

[NORM_EMS]
INCLUDE=MINIMUM
DEVICE=C:DOSEMM386.EXE RAM
DOS=UMB

[MAXIMUM]
INCLUDE=NORM_EMS
DEVICEHIGH=C:DOSRAMDRIVE.SYS 1450 512 224 /E
DEVICEHIGH=C:DOSANSI.SYS

[COMMON]
SHELL=C:DOSCOMMAND.COM C:DOS/P /E:512

Notice that the MAXIMUM configuration includes the NORM_EMS configuration, which in turn includes the MINIMUM configuration. All the configuration choices automatically “include” the commands in the two COMMON blocks. As you can see, this kind of nesting can quickly become confusing. Don't use this example as a model for your own CONFIG.SYS file; it is only meant to illustrate the use of the INCLUDE= command and is much more complicated than it needs to be.

As it turns out, all the commands in the MINIMUM block could be placed in the COMMON block preceding it, leaving the MINIMUM block empty. (No matter what configuration you choose, the MINIMUM block is included.) However, if you removed the MINIMUM block completely, the corresponding menu line would not be displayed, and you would need to remove the INCLUDE=MINIMUM commands from the other blocks as well.

See Also

[blockname] and MENUITEM=

Creating Multiple Configurations” in Chapter 2

INSTALL= 4.0 and later—Internal

INSTALL= 4.0 and later—Internal

INSTALL= can load resident software (TSRs) from your CONFIG.SYS file into conventional memory. Programs loaded with INSTALL= are executed after all other CONFIG.SYS lines have been processed and just before the command-line interpreter (COMMAND.COM) is loaded into memory. INSTALL= can be used only in your CONFIG.SYS file.

Syntax

INSTALL=drive:pathfilename  parameters

Parameters and Switches

drive:path Although this parameter is optional, you should always include the full drive and path to the resident program file. If they are omitted, the file is assumed to be in the root directory of the startup drive.
filename The full filename, with extension, of the resident program to be loaded. No extension is assumed, and wildcards are not allowed. This parameter is required.
parameters Any parameters that the resident program requires are included after its name. DOS passes these parameters directly to the program when it's loaded into memory. For more information, see the instructions for loading the resident program.

Notes

  1. If MS-DOS cannot find the program file you have specified, it displays a Bad or missing filename message and continues processing CONFIG.SYS. (See the first item in the following “Messages” section.)

  2. Resident programs included with DOS that can be safely loaded with the INSTALL= command include FASTOPEN.EXE, KEYB.COM, NLSFUNC.EXE, and SHARE.EXE.

  3. In versions of DOS earlier than DOS 6, many resident programs could not be loaded with INSTALL= because no environment was available to them. Starting with DOS 6, an environment is available to installed programs, and most resident software can now be successfully loaded this way.

  4. With DOS 6, there is little reason to use INSTALL= anymore. In the past, one of the main reasons to use INSTALL= was to save the small amount of memory wasted on environments for resident software. But with DOS 6, you save little or nothing. Also, INSTALL= is limited to loading software into conventional memory, and you can't include LOADHIGH in an INSTALL= command to get around this limitation. All in all, you usually are better off avoiding INSTALL= entirely; instead, load your resident software from your AUTOEXEC.BAT file.

  5. DOS executes all other lines in CONFIG.SYS, including any SET commands, before executing any INSTALL= lines. When all the INSTALL= lines have been processed, the command interpreter (COMMAND.COM) is loaded and begins to process your AUTOEXEC.BAT file.

  6. Only resident software should be loaded with an INSTALL= command. DOS waits until the program terminates before continuing, and if a normal program is run, neither COMMAND.COM nor your AUTOEXEC.BAT file is loaded until you quit the program. Although this setup might be interesting, it could make your system very unstable and should be avoided.

Examples

To load SHARE.EXE from your CONFIG.SYS file, you would include the following line:

INCLUDE=C:DOSSHARE.EXE  /L:50

This line assumes that SHARE.EXE is located in the C:DOS subdirectory and sets the number of file locks to 50. For DOS to find SHARE.EXE, the file extension must always be included with the filename because no default extensions are assumed with INSTALL=.

Messages

Bad or missing filename
Error in CONFIG.SYS line number

Warning: DOS displays this message if it can't find the file you specified in a DEVICE=, DEVICEHIGH=, or INSTALL= command in your CONFIG.SYS file. filename is the name of the file that DOS was looking for, and number is the line in CONFIG.SYS where the command is located. Edit the line so that the path and filename are correct and then restart your computer.

See Also

DEVICE= and LOADHIGH

Using the INSTALL Command” in Chapter 19

INSTALLHIGH (see HIINSTALL)

INSTALLHIGH (see HIINSTALL)

INSTALLHIGH is a DR DOS alternative command for the HIINSTALL command. See the detailed description under HIINSTALL.

INTERLNK 6.0 and later—External

INTERLNK 6.0 and later—External
INTERLNK 6.0 and later—External

When you run INTERLNK from the DOS command line, it communicates with the INTERLNK.EXE device driver in memory, allowing you to view or change the server drives you have access to. If the connection to the server hasn't been established, INTERLNK attempts to connect with the server, using the parameters you specified when you loaded the INTERLNK.EXE device driver. Before you can run INTERLNK from the DOS command line, you must load the INTERLNK.EXE device driver into memory by adding a DEVICE= statement in your CONFIG.SYS file.

Syntax

INTERLNK  client:=server:  ...

Parameters and Switches

client: The client drive letter that you want to use to access a disk drive on the Interlnk server. client: must be one of the drive letters that the INTERLNK.EXE device driver reserved when it loaded into memory. The trailing colon is optional.
server: The server drive that you want client: to refer to. server: must be a drive on the Interlnk server that is available for redirection. The trailing colon is optional. If this parameter is omitted, the client: drive letter is disconnected from the Interlnk server.

Notes

  1. The INTERLNK.EXE device driver must be installed before you can run INTERLNK from the command line. If you try to run INTERLNK without installing the device driver, an error message is displayed. (See the following “Messages” section.)

  2. INTERLNK.EXE actually is two files: a device driver and an executable program. The device driver portion does all the real work and has to be loaded into memory with a DEVICE= command in your CONFIG.SYS file. After this device driver has been loaded into memory, the executable portion of the file communicates with the device driver to reassign drive letters and display status information.

  3. To display Interlnk's status, type INTERLNK at the DOS prompt. Interlnk displays a list of client drive letters on the left, with the server drives they are connected to on the right. If any of the server drives have volume labels, they are displayed as well.

  4. You can include as many client:=server: parameters as you need in a single INTERLNK command. Separate each client:=server: assignment with spaces.

  5. To disconnect an Interlnk drive, specify the client:= parameter but omit the server: drive letter. A disconnected client: drive letter is immediately available for use connecting to another server drive. You can perform a mixture of drive assignments and disconnections in a single INTERLNK command by separating each one with spaces.

  6. The drives that INTERLNK.EXE reserves when it loads into memory are private; they can't be used by other programs even if Interlnk isn't using them. For example, you cannot use an inactive Interlnk drive letter as a network drive or a SUBST alias. INTERLNK.EXE displays the drive letters it has reserved when it is loading into memory.

  7. To use a printer on an Interlnk server from within Windows, you first have to access the Printer dialog box in Control Panel. Next, click the Connect button. In the Connect dialog box, either clear the Fast Printing Direct To Port check box, or specify the port as LPT1.DOS or LPT2.DOS rather than LPT1 or LPT2. Normally, Windows prints directly to the hardware and bypasses Interlnk's printer redirection. However, when you disable Fast Printing or print to a filename rather than the port name, Windows prints through DOS, and Interlnk can redirect the data to the server's printer port.

  8. All disk drives redirected by Interlnk are considered removable drives because the connection to them can be lost at any time. DoubleSpace refers to Interlnk drives as normal, removable local drives. MSD reports that Interlnk drives are floppy drives with one cylinder. SMARTDrive defaults to read-caching Interlnk drives, as it does with local floppy disk drives. Windows File Manager represents Interlnk drives with a “floppy icon.”

  9. An Interlnk client cannot access CD-ROM drives on the server. Interlnk can recognize only standard DOS drives, not network drives. CD-ROM drives use the network interface, so Interlnk cannot be used to give the client computer access to CD-ROM drives on the server.

  10. Redirected Interlnk drives do not support disk-level operations, and the following DOS commands should not be used on redirected drives:

    CHKDSK FORMAT
    DEFRAG MIRROR
    DEBUG SCANDISK
    DISKCOMP SYS
    DISKCOPY UNDELETE
    FDISK UNFORMAT

    Third-party utilities that require low-level disk access also should be avoided.

  11. To be able to run, INTERLNK requires DOS 3.0 or later. You can run different versions of DOS on the client and server computers, although the limitations of each version must be respected. For example, disk partitions greater than 32MB on an Interlnk server are not accessible on an Interlnk client running DOS 3.0. (The Microsoft MS-DOS 6 license agreement requires at least one of the two computers involved to be running a licensed copy of MS-DOS 6.)

  12. An appropriate cable is required to connect two computers with Interlnk. If you are using serial ports for the Interlnk connection, a 3-wire or 7-wire null-modem serial cable is required. If you are using parallel ports, an 11-wire parallel cable is required. These cables often are referred to as LapLink cables, in honor of the product that popularized this simple type of network. Check the two computers to see what type of connectors you need. Microsoft includes detailed wiring charts for these cables in the entry for INTERLNK in the DOS 6 online help system (that is, type HELP INTERLNK at the DOS prompt and click the Notes entry).

Examples

Assuming that Interlnk is running and you have successfully connected with the server, redirect the client drive letter D: to access drive C: on the server by entering the following command.

INTERLNK  D=C

Notice that you are not required to enter colons with the drive letters, although colons are acceptable.

To break the relationship (cancel the redirection) between the client's D drive and the server drive, enter this command:

INTERLNK  D=

You can make more than one assignment in a single command by separating them with spaces like this:

INTERLNK  D=A  E=B  F=C

This command would connect you to three server drives. Drive D on the client computer would refer to drive A on the server, drive E to drive B on the server, and drive F to drive C on the server.

If you ever get lost and want to see what assignments you have, type the INTERLNK command with no parameters as follows:

INTERLNK

INTERLNK displays a status screen that looks something like this:

This Computer        Other Computer
  (Client)              (Server)
------------   -----------------------
  D:    equals    A:
  E:    equals    B:
  F:    equals    C: (120Mb)  CONNER 120
  LPT2: equals    LPT1:

This screen reflects the assignments made earlier with the INTERLNK D=A E=B F=C command. You can't control the assignment of printer ports from the command line, but the display does show you what drive assignments Interlnk has made. To print to the server's printer, you would print to LPT2 on the client computer.

Interlnk shows the size of any server hard drives in parentheses after the drive letter in the right column. Notice that if any of the server drives have volume labels, they're displayed as well (CONNER 120 is the volume label for the server's C: drive in the example). Volume labels can make a confusing assignment display a bit easier to understand.

Messages

Connection NOT Established
Make sure that a serial or parallel cable connects the server and client
computers, and that INTERSVR.EXE is running on the server computer.

Error: Interlnk was unable to establish a connection with the server program. Before you try to establish this connection from the client computer, make sure that the cable is connected at both ends and that INTERSVR is running on the server computer.

Drive assignment syntax error.

Error: You have made a syntax error while attempting to assign drive letters to remote drives on the Interlnk server. This message is often caused by trying to assign drive letters that weren't reserved by INTERLNK.EXE. The only drive letters you can use to access drives on the Interlnk server are the ones that INTERLNK.EXE displays when it is loaded into memory from your CONFIG.SYS file.

Driver NOT installed
To install Interlnk, add the following line to your CONFIG.SYS file and reboot:
    DEVICE=drive:pathINTERLNK.EXE

Information: You have attempted to run the INTERLNK program without first installing the INTERLNK.EXE device driver. drive:path in the preceding message reflects the current location of INTERLNK.EXE on your system. You can run INTERLNK from the command line only when the client device driver is in memory, so you must load INTERLNK.EXE from your CONFIG.SYS file before you can access the executable portion of the program.

Invalid unit reading drive drive
Abort, Retry, Fail

Error: You've tried to access an Interlnk drive that isn't assigned to a drive on the Interlnk server. Press A to abort, R to Retry, and F to Fail. The safest choice is to fail the operation by pressing F. In most cases, Retry simply redisplays the error message. After you clear the error message, you can assign this drive letter to a server drive by using the INTERLNK client:=server: command.

Not ready reading drive drive
Abort, Retry, Fail

Error: You have tried to access an Interlnk drive (or another reserved drive letter), but the connection to the Interlnk server hasn't been made yet. Press A to abort, R to Retry, and F to Fail. Normally, you should fail the operation by pressing F. You can establish the connection to the server by running INTERLNK from the command line.

The version number of Interlnk in memory does not match the version
number in the file: pathname

Error: The version of Interlnk you ran from the DOS command line doesn't match the version of the device driver that is being loaded in your CONFIG.SYS file. Somehow, you have ended up with two different copies of INTERLNK.EXE on your disk. Locate the newer copy of INTERLNK.EXE and make sure that you are loading that copy in your CONFIG.SYS file. You might want to remove the old copy of INTERLNK.EXE from your disk so that you do not run it by accident.

See Also

INTERLNK.EXE and INTERSVR

Using Interlnk to Share Another Computer's Resources” in Chapter 8

INTERLNK.EXE (device driver) 6.0 and later— External

INTERLNK.EXE (device driver) 6.0 and later— External
INTERLNK.EXE (device driver) 6.0 and later— External

The INTERLNK.EXE device driver establishes a link by way of a serial or parallel cable with another computer that is running the INTERSVR program. INTERLNK.EXE provides the client side of this relationship and usually is installed on a laptop computer (the client) from which you want to access files or printers on a desktop computer (the server). INTERLNK.EXE must be loaded in a DEVICE= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathINTERLNK.EXE  /DRIVES:num  /NOPRINTER  /COM
/COM:num  /COM:addr  /LPT  /LPT:num  /LPT:addr  /AUTO  /NOSCAN  /LOW
/BAUD:rate  /V

Parameters and Switches

drive:path The full path to the INTERLNK.EXE file on your system. Setup places the INTERLNK.EXE file in the C:DOS subdirectory by default. If the full path to INTERLNK.EXE isn't specified, DOS looks for the file in the root directory of the startup drive.
/DRIVES:num The number of drive letters to reserve for redirected drives on the client computer. Num can be any value from 0 to the number of drive letters still available when INTERLNK.EXE is loaded. (DOS can allocate 26 drive letters, from A to Z.) If this parameter is omitted, 3 drive letters are reserved. Specifying /DRIVES:0 disables drive redirection, and only printers are redirected.
/NOPRINTER This parameter specifies that no printers should be redirected. Normally, Interlnk redirects all available printers. Specifying this parameter can reduce the size of INTERLNK.EXE in memory.
/COM This parameter specifies that Interlnk should scan all serial ports when it's looking for a connection with the server. This is the default setting. If you have a serial mouse, you might want to use a /COM:num or /LPT:num parameter to specify the port that Interlnk should use.
/COM:num The serial port (by DOS number) that Interlnk should use to connect with the server. This parameter can be entered as /COM:1 or as /COM1; the colon is optional. Typical values are /COM1, /COM2, /COM3, and /COM4.
/COM:addr The serial port (by hexadecimal port address) that Interlnk should use to connect with the server. Typical addresses for serial ports are 3F8 and 2F8. Unless you have a particular reason to specify the serial port by address, you should use the more familiar port numbers.
/LPT This parameter specifies that Interlnk should scan all parallel ports when it's looking for a connection with the server. This is the default setting.
/LPT:num The parallel port (by DOS number) that Interlnk should use to connect with the server. This parameter can be entered as /LPT:1 or as /LPT1; the colon is optional. Typical values are /LPT1, /LPT2, and /LPT3. This parameter has nothing to do with redirected printers. It specifies the port being used to connect the two computers together.
/LPT:addr The parallel port (by hexadecimal port address) that Interlnk should use to connect with the server. Typical addresses for parallel ports are 3BC, 378, and 278. Unless you have a particular reason to specify the parallel port by address, you should use the more familiar port numbers instead.
/AUTO Specifying this parameter instructs INTERLNK.EXE not to remain in memory if the server is unavailable. By using this parameter, you can leave in your CONFIG.SYS file the DEVICE= line that loads INTERLNK.EXE. With /AUTO specified, Interlnk loads into memory only if you are connected to a server when you start up your computer.
/NOSCAN Specifying this parameter stops INTERLNK.EXE from trying to establish a connection with the server when INTERLNK.EXE loads into memory. You have to establish the connection later by running INTERLNK from the DOS command line.
/LOW If upper memory is available, INTERLNK.EXE normally tries to load itself high. If you want to make sure that INTERLNK.EXE loads into conventional memory instead, specify the /LOW parameter.
/BAUD:rate The maximum baud rate you want Interlnk to use for serial communications. rate can be one of the following values: 9600, 19200, 38400, 57600, and 115200. If no maximum rate is specified, 115200 is assumed.

Note that rate limits only the maximum data transfer rate that can be used between the client and server for a serial connection. If you are using a parallel connection, the /BAUD:rate parameter has no effect.

/V If either the client or the server computer freezes while accessing Interlnk drives, try specifying the /V parameter on one or both computers. This parameter attempts to correct problems that arise from conflicts with the system timers on connected computers.

Notes

  1. The INTERLNK.EXE device driver must be installed before you can run INTERLNK from the command line. If you try to run INTERLNK without installing the device driver, an error message is displayed. (See the first item in the following “Messages” section.)

    Caution

    When Interlnk scans serial ports looking for a server connection, it interferes with the operation of any mouse drivers that are servicing those ports. If your mouse is attached to a serial port, be sure to use a /COM:num or /LPT:num parameter to specify the port that Interlnk should use.

  2. INTERLNK.EXE actually is two files: a device driver and an executable program. The device driver portion does all the real work and has to be loaded into memory with a DEVICE= command in your CONFIG.SYS file. After this device driver is loaded into memory, the executable portion of the file communicates with the device driver to reassign drive letters and display status information.

  3. If you regularly use Interlnk to connect your laptop to a desktop computer, make sure that you specify the /AUTO parameter. Then, when you're on the road, INTERLNK.EXE will fail to find the server and not waste memory by loading anyway. Whenever you want to use Interlnk, simply connect the cable to a server and reboot the laptop.

  4. INTERLNK.EXE automatically loads into upper memory if it's available. You don't need to use the DEVICEHIGH= command with INTERLNK.EXE.

  5. By default, all the client's serial ports and then all the client's parallel ports are scanned when Interlnk looks for a connection with the server. As soon as the server is found, scanning stops. If /COM is specified without /LPT, only the client's serial ports are scanned. Similarly, if /LPT is specified without /COM, only the client's parallel ports are scanned. Interlnk's default behavior is equivalent to specifying both the /COM and /LPT parameters.

  6. Under normal circumstances, INTERLNK.EXE requires about 15KB of memory. You can decrease this amount by specifying certain parameters. When you specify the /NOPRINTER parameter, Interlnk does not load the routines required to redirect printer output. If you specify the /DRIVES:0 parameter, Interlnk does not load the routines required to redirect disk drives. If you specify either the /COM or /LPT parameter (but not both), Interlnk does not load the routines required to access the type of port you are not using. Depending on what combination of Interlnk services you need, you might be able to slim Interlnk's memory use significantly.

  7. The drives that INTERLNK.EXE reserves when it loads into memory are private and can't be claimed by other programs even if Interlnk isn't using them. For example, you cannot use an inactive Interlnk drive letter as a network drive or a SUBST alias.

  8. If INTERLNK.EXE fails to connect with a server when it loads or the /NOSCAN parameter prevents it from connecting, the drives it reserves will be empty. To establish a connection with the server, you have to run INTERLNK from the command line and redirect the server drives manually.

  9. Because INTERLNK.EXE allocates drive letters, you should be very careful about where you locate it in your CONFIG.SYS file. In most cases, you will want to load INTERLNK.EXE last so that any drives it allocates leave other drive assignments in CONFIG.SYS unchanged.

    Caution

    Having your drive letters change simply because you added a device driver to your CONFIG.SYS file can be painful. Often, you have to edit batch files to reflect the new drive letters. All references to drives that have changed have to be corrected in your CONFIG.SYS and AUTOEXEC.BAT files. Microsoft Windows is very sensitive to drive- letter changes, and some Windows' applications fail if they are suddenly located on a different drive.

    Before you add or rearrange DEVICE= lines in your CONFIG.SYS file, think through the changes you may be making to drive-letter assignments and the impact the changes will have on your system. If you are careful, you can often accomplish your task without changing any drive-letter assignments, or at least keep the changes to a minimum. Doing so can save you a great deal of work.

  10. If you use DoubleSpace, always load the DBLSPACE.SYS driver before you load INTERLNK.EXE. If you load INTERLNK.EXE first, the DoubleSpace host (uncompressed) drives may become unavailable on the client computer.

  11. To use a printer on an Interlnk server from within Windows, you first have to access the Printer dialog box in Control Panel. Next, click the Connect button. In the Connect dialog box, either clear the Fast Printing Direct To Port check box, or specify the port as LPT1.DOS or LPT2.DOS rather than LPT1 or LPT2. Normally, Windows prints directly to the hardware and bypasses Interlnk's printer redirection. However, when you disable Fast Printing or print to a filename instead of the port name, Windows prints through DOS, and Interlnk can redirect the data to the server's printer port.

  12. All disk drives redirected by Interlnk are considered removable drives because the connection to them can be lost at any time. DoubleSpace refers to Interlnk drives as normal, removable local drives. MSD reports that Interlnk drives are floppy drives with one cylinder. SMARTDrive defaults to read-caching Interlnk drives, as it does with local floppy disk drives. Windows File Manager represents Interlnk drives with a “floppy icon.”

  13. An Interlnk client cannot access CD-ROM drives on the server. Interlnk can recognize only standard DOS drives, not network drives. Because CD-ROM drives use the network interface, Interlnk cannot be used to give the client computer access to CD-ROM drives on the server.

  14. Redirected Interlnk drives do not support disk-level operations, and the following DOS commands should not be used on redirected drives:

    CHKDSK FORMAT
    DEFRAG MIRROR
    DEBUG SCANDISK
    DISKCOMP SYS
    DISKCOPY UNDELETE
    FDISK UNFORMAT

    Third-party utilities that require low-level disk access also should be avoided.

  15. INTERLNK.EXE requires DOS 3.0 or later to run. You can run different versions of DOS on the client and server computers, although the limitations of each version must be respected. For example, disk partitions greater than 32MB on an Interlnk server are not accessible on an Interlnk client running DOS 3.0. (The Microsoft MS-DOS 6 license agreement requires at least one of the two computers involved to be running a licensed copy of MS-DOS 6.)

  16. An appropriate cable is required to connect two computers with Interlnk. If you are using serial ports for the Interlnk connection, a 3-wire or 7-wire null-modem serial cable is required. If you are using parallel ports, an 11-wire parallel cable is required. These cables often are referred to as LapLink cables, in honor of the product that popularized this simple type of network. Check the two computers to see what type of connectors you need. Microsoft includes detailed wiring charts for these cables in the entry for INTERLNK in the DOS 6 online help system (that is, type HELP INTERLNK at the DOS prompt and click the Notes entry).

Examples

A typical line that loads INTERLNK.EXE in the CONFIG.SYS file of your Laptop computer might look like this:

DEVICE=C:DOSINTERLNK.EXE  /COM2  /AUTO

As long as the connection with the Interlnk server is established (on COM2), the Interlnk client device driver will load into memory and reserve three drive letters (the default is three) with which it can access drives on the server. Any printers attached to the server will be available on the client computer as well. Because of the /AUTO parameter, if INTERSVR isn't running on the server when this DEVICE= line is executed, INTERLNK.EXE won't load into memory.

If memory is tight, and you don't need access to more than one disk drive or any printers on the Interlnk server, you could add the /NOPRINTER parameter, like this:

DEVICE=C:DOSINTERLNK.EXE  /COM2  /AUTO  /DRIVES:1  /NOPRINTER

Note that in both of the preceding examples, INTERLNK.EXE loads into upper memory if it's available. To force INTERLNK.EXE to load into conventional memory, specify the /LOW parameter, as in the following:

DEVICE=C:DOSINTERLNK.EXE  /COM2  /AUTO  /LOW

If you used a parallel cable to connect the two computers instead of a serial cable, you would specify a parallel port rather than a serial port:

DEVICE=C:DOSINTERLNK.EXE  /LPT1  /AUTO

Note that you must use the same type of port on both computers. You can't use a serial port on one computer and a parallel port on the other. The cables you need aren't interchangeable, either.

After INTERLNK.EXE has successfully established a connection with the Interlnk server, it automatically assigns the drive letters it has reserved to disk drives on the Interlnk server. To see what assignments have been made, run INTERLNK from the DOS command line.

Messages

*** Bad /COM argument parameter

Error: Interlnk was unable to initialize the serial port you specified with a /COM:num parameter. Check to make sure that you specified /COM1, /COM2, /COM3, or /COM4, and that your computer has that port installed. If you can't get this parameter to work, you may be forced to use the /COM:addr parameter.

*** Bad /DRIVES parameter ignored (/DRIVES:n, n = 0 - 24).

Error: You have specified an invalid /DRIVES:num parameter. Legal values for num are in the range 0 to 24, as indicated in the message. You may get this message if you have embedded any spaces in the parameter or if you have specified a letter instead of a digit.

*** Bad /LPT argument parameter

Error: Interlnk was unable to initialize the parallel port you specified with an /LPT:num parameter. Check to make sure that you specified /LPT1, /LPT2, or /LPT3, and that your computer has that port installed. If you can't get this parameter to work, you may be forced to use the /LPT:addr parameter.

*** Bad parallel port address: addr

or

*** Bad serial port address: addr

Error: Interlnk was unable to initialize the parallel or serial port you specified with an /LPT:num or /COM:num parameter. Make sure that you are specifying the correct value for addr and that the value is entered in hexadecimal notation.

*** Invalid /BAUD parameter ignored.

Warning: You have specified an invalid /BAUD:rate parameter, and Interlnk has used the default value of 115200. Check to make sure that the value you specified for rate is 9600, 19200, 38400, 57600, or 115200. You can't embed commas in these values.

*** Specified COM port number not recognized by BIOS: COM#

or

*** Specified LPT port number not recognized by BIOS: LPT#

Error: You have specified a port with the /LPT:num or /COM:num parameter, which isn't supported by the ROM BIOS in your computer. You may get this message if you specify a port that doesn't exist in your computer, or if your ports are using nonstandard port addresses. If the problem is nonstandard port addresses, you still might be able to use this port by specifying its address with an /LPT:addr or /COM:addr parameter.

Connection NOT Established
Make sure that a serial or parallel cable connects the server and client
computers, and that INTERSVR.EXE is running on the server computer.

Error: Interlnk was unable to establish a connection with the server program. Before you try to establish this connection from the client computer, make sure that the cable is connected at both ends and that INTERSVR is running on the server computer.

Drive letters redirected: num (drive: through drive:)

Information: INTERLNK.EXE displays this message when it loads into memory. You might want to write down the drive letters that the INTERLNK.EXE device driver has reserved. They are the only letters you can use to access drives on the Interlnk server.

Driver NOT installed
To install Interlnk, add the following line to your CONFIG.SYS file and reboot:
    DEVICE=drive:pathINTERLNK.EXE

Information: You have attempted to run the INTERLNK program without first installing the INTERLNK.EXE device driver. The drive:path in the preceding message reflects the current location of INTERLNK.EXE on your system. You can run INTERLNK only from the command line when the client device driver is in memory; therefore, you must load INTERLNK.EXE from your CONFIG.SYS file before you can access the executable portion of the program.

Invalid switch - parameter

Error: You have specified an invalid parameter on the DEVICE= line for INTERLNK.EXE in your CONFIG.SYS file. The parameter displayed in the message is the one that's confusing INTERLNK.EXE. Correct this entry and try the command again.

No drive letters redirected

Information: You have loaded the INTERLNK.EXE device driver with a /DRIVES:0 parameter. You cannot access any disk drives on the Interlnk server.

No printer ports redirected

Information: You have loaded the INTERLNK.EXE device driver with a /NOPRINTER parameter. You cannot access any printers on the Interlnk server.

The Interlnk device driver requires version 3.0 or later of DOS.

Error: INTERLNK.EXE requires that you be running at least DOS 3.0. If you know that the computer is running a later version of DOS than 3.0 (type VER), you may have a bad entry for INTERLNK.EXE in your SETVER table.

Too many block devices

Warning: DOS has run out of drive letters and cannot load any more block devices from your CONFIG.SYS file. DOS will continue to start up, but some of your device drivers may not be loaded. DOS can handle up to 26 accessible block devices.

Certain device drivers allocate more than one letter when they are loaded. DoubleSpace allocates at least one letter for each compressed drive you have in your system, plus some spares. INTERLNK.EXE allocates the number requested with the /DRIVES:num parameter, or three if a number isn't specified. RAMDRIVE.SYS and DRIVER.SYS allocate one letter each time they are loaded. Check your CONFIG.SYS file and eliminate any DEVICE= lines you don't need, or decrease the number of drives set aside for Interlnk.

See Also

DEVICE=, INTERLNK, and INTERSVR

Using Interlnk to Share Another Computer's Resources” in Chapter 8

INTERSVR 6.0 and later—External

INTERSVR 6.0 and later—External
INTERSVR 6.0 and later—External

INTERSVR provides server services for an Interlnk network. The server in an Interlnk network is the computer that is making its drives and printers available for use on another computer (the client). INTERSVR monopolizes the server computer while it is running, preventing you from using the server computer for anything else. You have to have an appropriate serial or parallel cable to connect the two computers.

Syntax

INTERSVR  drive: ... /X=drive: ... /COM  /COM:num  /COM:addr  /LPT /LPT:num
/LPT:addr  /BAUD:rate  /V  /B

To copy the Interlnk files to a connected computer that is not running Interlnk, use the following format:

INTERSVR  /RCOPY

Parameters and Switches

drive: ... Specifies the letter of a drive that can be redirected. The ellipsis (...) indicates that more than one drive can be redirected by a single INTERSVR command. By default, all drives are available for redirection.
/X=drive: ... Specifies the letter of a drive that will not be redirected. The ellipsis (...) indicates that more than one drive can be excluded by a single INTERSVR command. By default, no drives are excluded.
/COM Specifies that INTERSVR should scan all serial ports when it's looking for a connection with the client. This is the default setting. If you have a serial mouse, you might want to use a /COM:num or /LPT:num parameter to specify the port Interlnk should use.
/COM:num Indicates the serial port (by DOS number) that INTERSVR should use to connect with the client. This parameter can be entered as /COM:1 or as /COM1; the colon is optional. Typical values are /COM1, /COM2, /COM3, and /COM4.
/COM:addr Indicates the serial port (by hexadecimal port address) that INTERSVR should use to connect with the client. Typical addresses for serial ports are 3F8 and 2F8. Unless you have a particular reason to specify the serial port by address, you should use the more familiar port numbers instead.
/LPT Specifies that INTERSVR should scan all parallel ports when it's looking for a connection with the client. This is the default setting.
/LPT:num Specifies the parallel port (by DOS number) that INTERSVR should use to connect with the client. This parameter can be entered as /LPT:1 or as /LPT1; the colon is optional. Typical values are /LPT1, /LPT2, and /LPT3. Note that this parameter has nothing to do with redirected printers; it specifies the port being used to connect the two computers together.
/LPT:addr Indicates the parallel port (by hexadecimal port address) that INTERSVR should use to connect with the client. Typical addresses for parallel ports are 3BC, 378, and 278. Unless you have a particular reason to specify the parallel port by address, you should use the more familiar port numbers instead.
/BAUD:rate Indicates the maximum baud rate you want Interlnk to use for serial communications. rate can be one of the following values: 9600, 19200, 38400, 57600, and 115200. If no maximum rate is specified, 115200 is assumed.

rate limits only the maximum data transfer rate that can be used between the client and server for a serial connection. If you are using a parallel connection, the /BAUD:rate parameter has no effect.

/V If either the client or server computer freezes while accessing Interlnk drives, try specifying the /V parameter on one or both computers. This parameter attempts to correct problems that arise from conflicts with the system timers on connected computers.
/B Forces the use of a color scheme appropriate for a black-and-white (monochrome) monitor or LCD display.
/RCOPY Copies the Interlnk files INTERLNK.EXE and INTERSVR.EXE to another computer. If your laptop computer doesn't have a floppy disk drive, use this parameter to set up an Interlnk connection. The two computers must be connected by a 7-wire, null-modem serial cable (sometimes referred to as a LapLink cable). The MODE command must be available on the target computer for this transfer to work. You can't specify any other parameters when you're using the /RCOPY feature.

Notes

  1. When INTERSVR scans serial ports looking for a client connection, it interferes with the operation of any mouse drivers that are servicing those ports. If your mouse is attached to a serial port, be sure to use a /COM:num or /LPT:num parameter to specify the port that Interlnk should use.

  2. By default, all the server's serial ports and then all the server's parallel ports are scanned when Interlnk searches for a connection with the client computer. As soon as the client is found, scanning stops. If /COM is specified without /LPT, only the server's serial ports are scanned. Similarly, if /LPT is specified without /COM, only the server's parallel ports are scanned. INTERSVR's default behavior is equivalent to specifying both the /COM and /LPT parameters.

  3. INTERSVR is unable to make network or CD-ROM drives available to the client computer. Network and CD-ROM drives are not considered local drives because DOS uses the network redirector interface to access them.

  4. While INTERSVR is running, it displays a list of redirected drives and printers onscreen. The left column lists the disk drives and printers on the server that are being shared, and the right column lists the letters and/or ports that are being used on the client computer to access the server drives. To exit INTERSVR and disconnect the Interlnk network, press Alt+F4.

  5. You can't use the computer for anything else while INTERSVR is running. If you start INTERSVR in a task-switching environment such as Windows, it doesn't allow you to switch to another task without first exiting the INTERSVR program. Don't try to access any memory-resident programs; serious data loss could result. To be safe, you might want to disable or remove memory-resident programs before running INTERSVR.

  6. Redirected Interlnk drives do not support disk-level operations, and the following DOS commands should not be used on redirected drives:

    CHKDSK FORMAT
    DEFRAG MIRROR
    DEBUG SCANDISK
    DISKCOMP SYS
    DISKCOPY UNDELETE
    FDISK UNFORMAT

    Third-party utilities that require low-level disk access also should be avoided.

  7. INTERSVR.EXE requires DOS 3.0 or later to run. You can run different versions of DOS on the client and server computers, although the limitations of each version must be respected. For example, disk partitions greater than 32MB on an Interlnk server are accessible on an Interlnk client running DOS 3.0. (The Microsoft MS-DOS 6 license agreement requires at least one of the two computers involved to be running a licensed copy of MS-DOS 6.)

  8. An appropriate cable is required to connect two computers with Interlnk. If you're using serial ports for the Interlnk connection, a 3-wire or 7-wire null-modem serial cable is required. If you are using parallel ports, an 11-wire parallel cable is required. These cables often are referred to as LapLink cables in honor of the product that popularized this simple type of network. Check the two computers to see what type of connectors you need. Microsoft includes detailed wiring charts for these cables in the entry for INTERLNK in the DOS 6 online help system (that is, type HELP INTERLNK at the DOS prompt and click the Notes entry).

Examples

Before you start the Interlnk server program, connect the two computers you want to link by using an appropriate serial or parallel cable. You also might want to remove or disable any resident programs you are running. You don't have to quit Windows or the DOS Shell, but you cannot switch to another task while the Interlnk server program is running.

To start the Interlnk server program, type the following command:

INTERSVR

INTERSVR scans your ports looking for an Interlnk connection. After it finds one, INTERSVR makes all local drives and printers on the server computer available to the Interlnk client.

If you are using a serial mouse, you should specify the port Interlnk should use. For example, if your mouse is attached to COM1 and you want to use COM2 on the server for the Interlnk connection, add the /COM2 parameter as follows:

INTERSVR  /COM2

If you don't need access to either of the server's floppy disk drives (A: and B:, in this example) from the client computer, you can exclude them by adding an /X=drive: parameter like this:

INTERSVR  /COM2  /X=A:  B:

If either computer stops responding when you access a remote drive or printer, you might have to specify the /V parameter for INTERSVR as follows:

INTERSVR  /COM2  /V

To use the remote copy feature, you must first connect the two computers with a 7-wire null-modem serial cable. (These cables often are referred to as LapLink cables, in honor of the company that made this sort of connection popular.) You cannot use parallel ports for this operation. Next, make sure that the computer which is to receive the Interlnk files is running DOS 3.0 or later and that the MODE command is available. Finally, on the computer containing the Interlnk files, start the Interlnk server by using the /RCOPY parameter as follows:

INTERSVR  /RCOPY

INTERSVR leads you through the copy operation, prompting you at each step. After the files INTERLNK.EXE and INTERSVR.EXE have been successfully transferred, you can start up the Inter lnk network by running INTERSVR on the server computer, adding the INTERLNK.EXE device driver to the CONFIG.SYS file on the client computer, and rebooting the client computer.

Messages

Error initializing port port at address addr

Error: INTERSVR found your Interlnk port but was unable to initialize it. This error can be caused by INTERSVR finding the wrong port when it scans your system. Specify the port that you want to use with the /COM:num or /LPT:num parameter and try the command again.

File allocation error in:  pathname, run chkdsk /f to correct.

Error: INTERSVR encountered a problem in the file allocation table (FAT) while it was accessing the file in pathname. Quit INTERSVR, and run SCANDISK or CHKDSK /F to identify and fix the problem.

If SHARE.EXE is loaded on the remote computer the remote install cannot be
performed on COM2. Please use COM1 or insure that SHARE.EXE is not loaded on
the remote computer before attempting a remote install.

Warning: You are performing a remote copy operation using COM2 on the remote computer. Interlnk is warning you that the operation may fail if SHARE.EXE is running on the remote computer. If SHARE.EXE is running on the remote computer, you might want to choose a different serial port or restart the remote computer without loading SHARE.EXE.

Invalid /BAUD parameter - rate

Error: You have specified an invalid /BAUD:rate parameter. Check to make sure that the value you specified for rate is 9600, 19200, 38400, 57600, or 115200. You can't embed commas in these values.

Invalid parallel port address LPT#: addr

Error: You have specified a parallel port address with the /LPT:addr parameter, but Interlnk is unable to communicate with it. Make sure that you are specifying the correct value for addr and that the value is entered in hexadecimal notation.

Invalid serial port address COM#: addr

Error: You have specified a serial port address with the /COM:addr parameter, but Interlnk is unable to communicate with it. Make sure that you are specifying the correct value for addr, and that the value is entered in hexadecimal notation.

Invalid server drive letter - drive

Error: You have specified a server drive letter that either doesn't exist or Interlnk is unable to redirect. You cannot redirect any network or CD-ROM drives connected to the server computer. Check your entry to make sure that all the drive letters you have specified are valid, local disk drives.

Invalid switch - parameter

Error: You have specified an invalid parameter on the command line for INTERSVR. The parameter displayed in the message is the one that is confusing INTERSVR. Correct this entry and try the command again.

There are no serial or parallel ports available for communication.

Error: When INTERSVR scanned your computer's ports, it couldn't find the port you are using for the Interlnk connection. Specify the port that you want to use with the /COM:num or /LPT:num parameter and try the command again.

Unable to initialize serial port COM#

Error: INTERSVR found your Interlnk port but was unable to initialize it. This error can be caused by specifying the wrong port. Correct your entry for the /COM:num or /LPT:num parameter and try the command again.

Unrecoverable transmission error, maximum retries exceeded.

Error: Your Interlnk connection has failed. Make sure that the cable you are using hasn't become unplugged at one or both ends. If you continue to see this error message, you may have to purchase a new cable.

You have started the Interlnk server in a task-switching environment. Task-
switching, key combinations, and some disk-writing operations are disabled. To
restore these functions, exit the server.

Information: INTERSVR displays this message if you start the server program while a task-switching environment such as Windows is active. You cannot switch tasks until you exit INTERSVR by using the Alt+F4 command.

See Also

INTERLNK and INTERLNK.EXE

Using Interlnk to Share Another Computer's Resources” in Chapter 8

JOIN 3.1 to 5.0—External

JOIN 3.1 to 5.0—External
JOIN 3.1 to 5.0—External
JOIN 3.1 to 5.0—External
JOIN 3.1 to 5.0—External

The JOIN command produces a directory structure by connecting one drive to a subdirectory of another drive. JOIN is included on the DOS 6.0 Supplemental Disk, not in the standard DOS 6.0 package.

Syntax

To connect disk drives, use the following format:

JOIN drive: drive2:dirname

To disconnect disk drives, use the following format:

JOIN drive:  /D

To show currently connected drives, use the following format:

JOIN

Parameters and Switches

drive: Specifies the drive that you want to refer to as a subdirectory on another drive. DOS calls drive: the guest disk drive.
drive2: Specifies the drive to which drive: is to be connected. DOS calls drive2: the host disk drive. If drive2: isn't specified, the current drive is assumed.
dirname Specifies a subdirectory on drive2: (the host drive). DOS calls dirname the host subdirectory. dirname holds the connection to drive: (the guest drive), and should be empty. If dirname doesn't exist, DOS creates it.
/D Disconnects the specified guest drive from the host drive.

Rules

  1. You must specify the guest drive when you make or change assignments.

  2. If you do not name a host drive, DOS uses the current drive.

  3. You must specify the host subdirectory. The host subdirectory cannot be the root directory of any drive.

  4. The host and guest drives must not be network or CD-ROM drives.

  5. The host and guest drives must not be part of a SUBST or ASSIGN command.

  6. You cannot use the current drive as the guest drive.

  7. If the host subdirectory does not exist, JOIN creates one. The subdirectory, if it exists, must be empty (DIR must show only the . and .. entries).

  8. When the drives are joined, the guest drive's root directory and entire directory tree are added to the host subdirectory. All subdirectories of the guest's root directory become subdirectories of the host subdirectory.

  9. A guest drive, when joined to the host drive, appears to be part of the host subdirectory. You can access this drive only through the host drive and subdirectory.

  10. To break the connection, specify the guest drive's normal name with the /D switch. You can use the guest drive's normal name only when you disconnect the drives.

  11. To see all the current drive connections, type JOIN with no parameters. If no connections exist, JOIN does not display any message, and the system prompt appears.

  12. Do not use the BACKUP, CHKDSK, DISKCOMP, DISKCOPY, FDISK, RESTORE, or FORMAT command in the guest or host drive.

  13. When JOIN is in effect, the DIR command works normally but reports the bytes free only for the host drive.

  14. While JOIN is in effect, CHKDSK processes the host drive but does not process or report information on the guest portion of the drive. To run CHKDSK on the guest drive, you first must disconnect the guest drive from the host drive.

Notes

  1. You can use JOIN to connect a RAM disk to a real disk so that you can use the RAM disk as though it were part of a floppy disk or hard disk drive. You also can use JOIN to connect two hard drives.

  2. Some programs allow only one drive to hold data or certain parts of the program. Programs written for DOS 2.0 and later, however, enable you to specify subdirectory names. If you use such a program, you can invoke the JOIN command to trick the program into using multiple drives as though the drives were one large drive.

  3. JOIN does not affect the guest drive. Rather, JOIN affects only the way you access the files in that drive. You cannot exceed the maximum number of files in the guest drive's root directory. In the host subdirectory, a file's size cannot exceed the guest drive's size.

Messages

Directory not empty

Error: You tried to use a host subdirectory that is not empty; the subdirectory contains files other than the . and .. entries. Perform any one of the following actions before you try the command again:

  • Delete all files in the host subdirectory.

  • Specify an empty subdirectory.

  • Create a new subdirectory.

  • Name a nonexistent host subdirectory.

See Also

ASSIGN and SUBST

The JOIN Command” in Chapter 11

KBDBUF.SYS (device driver) External

KBDBUF.SYS (device driver) External
KBDBUF.SYS (device driver) External
KBDBUF.SYS (device driver) External

The keyboard buffer set aside by the ROM BIOS is normally 16 bytes long. If a program fails to read the keyboard before the 17th character arrives, characters are lost. If you're a fast typist, you might want to increase the size of the keyboard buffer with KBDBUF.SYS to avoid losing keystrokes. KBDBUF.SYS isn't distributed with the standard DOS 6 package but is available from Microsoft on the MS-DOS 6 Supplemental Disk. You must load KBDBUF.SYS in a DEVICE= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathKBDBUF.SYS  bufsize

Parameters and Switches

drive:path The full path to the KBDBUF.SYS file on your system. KBDBUF.SYS is available on the DOS 6.22 Supplemental Disk. If you do not specify the full path to KBDBUF.SYS, DOS looks for the file in the root directory of the startup drive.
bufsize The new keyboard buffer size, in bytes. Acceptable values are in the range of 16 to 1024. This parameter is required.

Notes

  1. Some programs read keystrokes directly from the keyboard, bypassing the keyboard buffer that the ROM BIOS maintains. KBDBUF.SYS does not affect programs that read the keyboard directly.

  2. Do not attempt to load KBDBUF.SYS into upper memory by using the DEVICEHIGH= command. The ROM BIOS can't use a keyboard buffer located in upper memory.

  3. You should load the KBDBUF.SYS device driver as early as you can in CONFIG.SYS to avoid troublesome interactions with other device drivers and resident programs.

  4. Requesting a very large keyboard buffer is not normally a very good idea. If you have increased it to 50 or 100 characters and your software is still losing keystrokes, the program is probably not using the keyboard buffer at all. A large keyboard buffer might be useful when you are injecting keystrokes into it from another source that can't wait when the buffer is full.

Examples

To increase the size of the keyboard buffer to 32 characters, enter the following line in your CONFIG.SYS file:

DEVICE=C:DOSKBDBUF.SYS  32

This line assumes that you have copied the KBDBUF.SYS file from the DOS 6 Supplemental Disk to your C:DOS subdirectory.

Messages

Part of the new keyboard buffer is beyond the range of the ROM BIOS data
segment. Load this driver earlier in CONFIG.SYS, do not load it into high
memory, or decrease the size of the buffer.

Error: KBDBUF.SYS couldn't create the keyboard buffer you requested, usually because you tried to load it with the DEVICEHIGH= command. Use the DEVICE= command to load KBDBUF.SYS into conventional memory instead.

Requested buffer size is too large.

Error: You have specified a keyboard buffer size larger than 1,024 characters, which is the maximum size allowed by KBDBUF.SYS.

Requested buffer size is too small.

Error: You have specified a keyboard buffer size under 16 characters, which is the minimum size allowed by KBDBUF.SYS.

See Also

DEVICE=

KEYB 3.3 and later—External

KEYB 3.3 and later—External
KEYB 3.3 and later—External
KEYB 3.3 and later—External
KEYB 3.3 and later—External

The KEYB command changes the keyboard layout and characters from American English to another language/country.

Syntax

To change the current keyboard layout, use the following format:

KEYB  keycode, codepage, drive:pathKEYBOARD.SYS  /ID:code  /E

To display the current values for KEYB, use the following format:

KEYB

Parameters and Switches

keycode Specifies the two-character keyboard code for the keyboard layout that you want to use. See Chapter 14, “Understanding the International Features of DOS,” for a list of keyboard codes that MS-DOS supports.
codepage Specifies the three-digit code page that you want to use. codepage must be one of the code pages available for use with the keycode specified. If you omit codepage, DOS assumes the default code page for the keycode specified. See Chapter 14 for a list of the code pages that MS-DOS supports.
drive:pathKEYBOARD.SYS Specifies the drive and path to KEYBOARD.SYS or an equivalent file that contains keyboard layout information. Setup places this file in the C:DOS subdirectory by default.
/E Informs KEYB that an enhanced keyboard is being used. This switch is necessary only on 8088- and 8086-based systems that use enhanced keyboards.
/ID:code Specifies the type of enhanced keyboard that you want to use. This switch is only for countries that have more than one keyboard for the same language (for example, France, Italy, and the United Kingdom). See Chapter 14 for a list of the keyboard ID codes that MS-DOS supports.

Exit Codes

ERRORLEVEL Value Meaning
0 New keyboard template loaded successfully
1 Invalid keyboard code, code page, or command-line syntax
2 Keyboard definition file is bad or missing
4 Halted by console (CON) error
5 Requested code page not prepared

Notes

  1. To use one of the foreign-language character sets, load the KEYB program and type the appropriate two-letter code for your country.

  2. If you do not specify a code page, DOS uses the default code page for your country. The default code page is established by the COUNTRY directive in CONFIG.SYS or by the DOS default code page if the COUNTRY directive is not used.

  3. You must specify a code page that is compatible with your keyboard code selection.

  4. If you do not specify the keyboard definition file, it defaults to KEYBOARD.SYS. DOS looks for this file in the current disk's root directory. Otherwise, DOS uses the full filename to search for the file. If you do not specify a disk drive, DOS searches the current disk drive. If you do not specify a path, DOS searches the current directory.

  5. After loading, the program reconfigures the keyboard into the appropriate layout for the specified language.

  6. To use the American English layout after you issue the KEYB command, press Ctrl+Alt+F1. To return to the foreign-language layout, press Ctrl+Alt+F2. To switch to “typewriter mode,” press Ctrl+Alt+F7.

  7. When you use KEYB command for the first time, it increases the size of DOS by approximately 10KB. After that, you can use KEYB as often as you want without further enlarging DOS. You can load KEYB into upper memory by using the LOADHIGH command.

  8. To display the active keyboard and the code pages, type KEYB without any parameters.

  9. You can use KEYB with INSTALL in your CONFIG.SYS file.

Messages

Active code page not available from CON device

Information: You issued the KEYB command to display the current setting, but the command could not determine what code page was in use. The DEVICE=DISPLAY.SYS directive is not in CONFIG.SYS, or no currently loaded CON code page is active.

If the DISPLAY.SYS line was included in your CONFIG.SYS file, you must give the MODE CON CODEPAGE PREPARE command to load the font files into memory.

Bad or missing Keyboard Definition File

Error: The keyboard definition file (usually KEYBOARD.SYS) is corrupted, or KEYB cannot find the file. If you did not specify a drive and pathname, KEYB looks for the file in the current drive's root directory.

Copy the file to the root directory, or provide the full drive and pathname for the file to KEYB.

Code page requested (codepage) is not valid for given keyboard code

Error: You provided a keyboard code but not a code page, or the specified keyboard code does not match the currently active code page for the console. KEYB does not alter the current keyboard or code page. Choose a new console code page that matches the keyboard code (by using the MODE CON CODEPAGE SELECT command) or specify the appropriate matching code page when you reissue the KEYB command.

Code page specified is inconsistent with the selected code page

Warning: You specified a keyboard code and a code page, but a different code page is active for the console (CON). The code page specified to KEYB is now active for the keyboard but not for the video display.

Use the MODE CON CODEPAGE SELECT command to activate the correct code page (the one specified to KEYB) for the video screen.

Code page specified has not been prepared

Error: The DEVICE=DISPLAY.SYS directive was included in your CONFIG.SYS file, but your KEYB command specified a keyboard code that needs a code page that is not prepared. Use the MODE CON CODEPAGE PREPARE command to prepare the code page for the keyboard code that you want to use.

Current CON code page: codepage

Information: The console's current code page is designated by the number codepage.

Current keyboard code: keycode
code page: codepage

Information: The current keyboard code is a two-character keycode, and the code page used by the keyboard is a three-digit codepage. A list of the legal keyboard codes and their corresponding code pages is included in Chapter 14, “Understanding the International Features of DOS.”

One or more CON code pages invalid for given keyboard code

Warning: You used the MODE command to prepare several code pages for the console (CON), but you specified a keyboard code that is not compatible with one or more console code pages. KEYB creates the necessary information to work with those keyboard and code pages that are compatible. DOS ignores the incompatible keyboard and code page combinations.

See Also

CHCP, COUNTRY=, DISPLAY.SYS, MODE device CP, and NLSFUNC

Understanding KEYB.COM” in Chapter 14, “Understanding the International Features of DOS”

KEYBOARD.SYS (see KEYB)

KEYBOARD.SYS (see KEYB)

Despite the .SYS extension, KEYBOARD.SYS is not a device driver. KEYBOARD.SYS is a data file that contains information about the various keyboard layouts that are used in different countries. The KEYB command uses this file.

Caution

Do not attempt to load KEYBOARD.SYS (or DVORAK.SYS) into memory by using a DEVICE= or DEVICEHIGH= command in CONFIG.SYS. If you do, your computer will lock up, and you will need to reboot from a floppy disk.

A similar file, containing information needed for an Icelandic keyboard layout, is the file KEYBOARD.ICE on the MS-DOS 6 distribution disks. (For details on setting up an Icelandic configuration, see the README.TXT file distributed with DOS 6.) If you prefer a Dvorak keyboard, you can use the DVORAK.SYS file on the DOS 6 Supplemental Disk; it supports two-handed, left-handed, and right-handed Dvorak layouts.

DOS 6.22 includes an alternative keyboard layout information file named KEYBRD2.SYS, which contains a few additional keyboard layouts. For details, see Chapter 14, “Understanding the International Features of DOS,” or the README.TXT file included with MS-DOS 6.22.

See Also

KEYB

Understanding KEYB.COM” in Chapter 14, “Understanding the International Features of DOS”

LABEL 3.0 and later—Internal

LABEL 3.0 and later—Internal
LABEL 3.0 and later—Internal

Each disk can have a volume label as well as a volume serial number. The volume label is text and can be up to 11 characters long. The LABEL command enables you to display, add, delete, or change the volume label for a disk.

Syntax

LABEL drive:volume_label

Parameters and Switches

drive: The disk whose label you want to change or display. (The colon is required.)
volume_label The disk's new volume label.

Rules

  1. A valid volume label immediately becomes the volume label for the specified drive.

  2. If you do not specify a volume label, DOS prompts you to enter a new one. You can perform one of the following actions:

    • Type a valid volume name and then press Enter. DOS makes this name the new volume label. If a volume label already exists, DOS replaces the old volume label with the new.

    • Press Enter to delete the current label without specifying a replacement label. DOS asks you to confirm the deletion.

  3. If you enter an invalid volume label, DOS responds with a warning message and asks again for the new volume label.

  4. Do not use LABEL in a networked disk drive (one that belongs to another computer). If you try to label a networked drive, DOS displays an error message and ignores the command.

  5. Do not use LABEL on a disk in any drive that is affected by the SUBST, JOIN, or ASSIGN commands because DOS labels the “real” disk in the drive instead.

    Suppose that you use the command ASSIGN A=C. If you then enter the command LABEL A:, DOS actually changes the volume label of the disk in drive C.

  6. A label consists of up to 11 printing characters and may include spaces but not tabs or any of the following characters:

    *  ?  /  |  .  ,  ;  :  +  =  [  ]  (  )  &  ^  <  >
    

    Lowercase ASCII characters are mapped to uppercase.

Notes

  1. When you format a disk in DOS 4.0 and later versions, DOS prompts you to enter a volume label. Whether or not you assign a label, DOS gives the disk a serial number. The serial number is not part of the volume label. Remember that a space is a valid character in a volume label.

  2. Spaces and underscores can increase the readability of a volume label. DOS 3.0 and 3.1, however, reject a space in a volume name when the name is typed in the command line (for example, LABEL MY DISK). To put a space in a volume label, type LABEL, press the spacebar, type the drive name (if needed), and then press Enter. Do not type a volume label in the command line. When LABEL asks for a new volume label, you can type the label with spaces.

Messages

Delete current volume label (Y/N)?

Information and Warning: You did not enter a volume label when DOS prompted you. DOS is asking whether to delete the current label or to leave it unaltered. To delete the current label, press Y; to keep the label intact, press N.

See Also

FORMAT and VOL

Naming Disks with LABEL” in Chapter 7

LASTDRIVE= 3.0 and later—Internal

LASTDRIVE= 3.0 and later—Internal

If you're connected to a network, running MSCDEX for access to a CD-ROM drive, or using the SUBST command to create drive aliases, you might need the LASTDRIVE= command to tell DOS to save space for the additional drive letters you'll need. You can use LASTDRIVE= only in your CONFIG.SYS file.

Syntax

LASTDRIVE=drive

Parameters and Switches

drive The letter of the last disk drive that you want to have available. Note that drive is entered without a trailing colon. Valid letters are A to Z. The default value is either E or the last drive letter allocated during the processing of your CONFIG.SYS file, whichever is higher.

Notes

  1. If you specify a letter lower than the number of letters needed for your system, DOS overrides it and allocates space for the drives your system has. For instance, if you have one floppy and one hard drive and you specify LASTDRIVE=A, DOS allocates space in the current directory data structure for drives A, B, and C (as if you had specified LASTDRIVE=C). DOS does not display an error message if it overrides your LASTDRIVE= parameter. Notice that DOS allocates two floppy drive letters (A and B) even if you have only one floppy disk drive installed in the system.

  2. Each additional drive letter (above E) you have available increases the size of DOS in memory. If you aren't attached to a network, running a CD-ROM drive, or using SUBST drive aliases, you have little reason to waste memory on extra drive letters.

  3. You never need LASTDRIVE= for a device that is assigned a drive letter when its driver is loaded in CONFIG.SYS. This includes drives assigned by DoubleSpace, RAMDRIVE.SYS, INTERLNK.EXE, or DRIVER.SYS. LASTDRIVE= is needed only to reserve space for drive letters created after the processing of your CONFIG.SYS file is complete.

Examples

If you are attached to a network, you usually want the following line in your CONFIG.SYS file:

LASTDRIVE=Z

This line allows room for the maximum number of drive letters, leaving plenty of room to attach network drives. On the other hand, if you have two floppy drives (A and B), a hard disk with two partitions (C and D), a RAM disk (E), and have run DBLSPACE to compress both partitions (hosts assigned to I and J), your highest drive letter is J. To leave room for two additional drives after J, you can enter the following command:

LASTDRIVE=L

Notice that in the preceding example, drive letters F, G, H, K, and L would be available for network, CD-ROM, or SUBST drives. If you had included no LASTDRIVE= command, drive letters F, G, and H would still be available.

Messages

Bad command or parameters Error in CONFIG.SYS line number

Warning: If you specify an invalid parameter for LASTDRIVE=, you get this error message. A very common mistake is to enter a colon after the drive letter in the LASTDRIVE= command.

See Also

SUBST

“Using LASTDRIVE to Change the Available Disk Drives” in Chapter 19

LH (see LOADHIGH)

LH is an alternative name for the LOADHIGH command. For information on using the LOADHIGH or LH command, see the entry for LOADHIGH in this command reference.

LOADER

LOADER

By using LOADER, you can have more than one operating system installed on your computer. You can choose from a menu of installed operating systems to be started at boot time. If you install DR DOS on a computer with Windows 95, for example, the setup installs LOADER and sets up the correct files for it to run.

Syntax

LOADER bootfile.ext num /Q /S /U

Parameters and Switches

/Q or /S Specifies the quiet mode to run LOADER without any onscreen feedback.
/U Uninstalls LOADER from the hard disk.
bootfile.ext

Specifies a text file that must be in the root directory. Each line (up to 20 lines are allowed) lists the parameters for loading a different operating system at bootup. Use the following syntax for each line:

filename.ext x num text...

The parameters for this syntax are as follows:

filename.ext Specifies the name of the boot file for the operating system, such as MSDOS.SYS.
x Specifies the type of operating system. These types are listed in the description of LOADER in DOSBOOK.
num Specifies a timeout value that loads the operating system in this line after num seconds if no other choice is made. Only one line can include a num statement.
text... Displays an optional comment of your choosing on bootup.

LOADFIX 5.0 and later—External

LOADFIX 5.0 and later—External
LOADFIX 5.0 and later—External

Some programs may have trouble running if they are loaded in the first segment of memory. When this happens, they often display a Packed file corrupt message and abort. LOADFIX can help a program with this problem to run by making sure that it's loaded in the second 64KB segment of memory.

Syntax

LOADFIX  program  parameters

Parameters and Switches

program The program file that you want to load into the second 64KB segment of memory. A drive and path can be specified. If they are omitted, the current directory and all directories on the DOS PATH are searched for the executable file. This parameter is required.
parameters The parameters you want passed to program when it's loaded into memory.

Notes

If you are using DOS 5.0 or a later version to load DOS into the high memory area (HMA), a packed file may be loaded into the first 64KB of RAM and may fail to work. In such a case, DOS may display the error message Packed file corrupt, and the computer then returns to the DOS prompt.

Use LOADFIX only to start a program when DOS displays the message Packed file corrupt.

LOADHIGH or LH 5.0 and later—Internal

LOADHIGH or LH 5.0 and later—Internal
LOADHIGH or LH 5.0 and later—Internal

You can use the LOADHIGH command to load programs into upper memory. By loading resident software into upper memory, you can leave more conventional memory available for application programs to use. LOADHIGH is typically used in your AUTOEXEC.BAT file.

Syntax

LOADHIGH  program  parameters

or

LH  program  parameters

In DOS 6, LOADHIGH has two additional switches that MemMaker uses to specify the placement and size of the program in memory:

LOADHIGH  /L:region,min;region,min;...  /S   program  parameters

or

LH  /L:region,min;region,min;...  /S   program  parameters

Parameters and Switches

program Specifies the program file that you want to load into upper memory. You can specify a drive and path. If you omit them, DOS searches the current directory and all directories on the DOS PATH for the executable file. This parameter is required.
parameters Specifies any parameters you want passed to program when it's loaded into memory.
/L:region,min (DOS 6) Specifies the region in upper memory, and optionally the minimum size in bytes, into which the program should be loaded. You can specify more than one region by separating each region from the preceding one with a semicolon. For instance, /L:1;2 allows the program access to UMB regions 1 and 2, and /L:1,4096;2,512 further specifies that the minimum size of regions 1 and 2 should be 4,096 and 512 bytes, respectively. This parameter must precede the program's filename on the line. MemMaker sets these values for you.
/S (DOS 6) If you specify the /L parameter with a minimum size, /S instructs DOS to shrink the UMB to the specified size and create a new UMB from the remainder. /S must precede the program's filename on the line. This switch is best left to MemMaker's use.

Notes

Notes

In DR DOS, HILOAD is an alternative to the LOADHIGH command that performs the same function.

Rules

  1. You must use an upper memory manager. For a computer equipped with an 80386SX or higher microprocessor and at least 1MB of RAM, DOS provides EMM386.EXE.

  2. Your CONFIG.SYS file must contain at least the following statements (or the equivalent third-party memory-management routines):

    DEVICE=HIMEM.SYS
    DEVICE=EMM386.EXE  RAM  (or NOEMS)
    DOS=UMB
    
  3. If not enough upper memory is available to accommodate a program, DOS loads the program into conventional memory without warning.

  4. When a program is loaded by default into the largest free UMB, that program automatically gains access to all other UMBs. If you use /L, you have to explicitly grant the program access to other upper memory regions by specifying other /L parameters.

  5. /S normally is used only by MemMaker, which analyzes a program's memory usage to determine whether /S is safe.

  6. You can use /S only when you also include an /L switch that specifies a minimum size.

  7. Use min when a program is larger when it runs than when it loads.

  8. Use MEM /F to determine the size of free regions.

Examples

To load the driver into upper memory regions 1 and 3, use the following format:

LOADHIGH  /L:1;3  C:BINMYDRV.COM

See Also

DEVICEHIGH=, MEM, and MEMMAKER

Loading Device Drivers and TSRs into Upper Memory” in Chapter 19

MD or MKDIR 2.0 and later—Internal

MD or MKDIR 2.0 and later—Internal
MD or MKDIR 2.0 and later—Internal

The MD (or MKDIR) command can create new subdirectories on your disks. Storing files in various subdirectories helps you to keep them organized, and with MD, you can create as many as you need.

Syntax

MD  drive:path

MKDIR  drive:path

Parameters and Switches

drive:The drive: on which you want to create a new subdirectory. If you omit drive:, DOS assumes the current drive.
pathThe subdirectory on drive: that you want to create. path can be either absolute or relative—that is, specified from the root directory or specified from the current directory (see Note 7 in the following section). If you specify only the name, DOS creates the new subdirectory in the current directory. You cannot create a subdirectory with the same name as a file in its parent directory.

Notes

  1. Separate each subdirectory in path with a backslash () character. The last subdirectory name in path is the subdirectory created.

  2. You must specify the new subdirectory name (1 to 8 characters); specifying an extension is optional. The name must conform to the rules for creating directory names.

    Tip

    Avoid using extensions with subdirectory names. Although doing so is perfectly legal, having them “extensionless” makes them easier to pick out from the filenames in a directory listing. This practice has become so pervasive that certain programs have difficulties using subdirectories with extensions because they are rather uncommon and rarely tested for in new software.

    Tip

    Keep your subdirectory names as short as you can. Doing so can help with DOS's 63-character pathname limit and 127-character command-line limit, and it saves typing as well.

  3. You cannot use a directory name that is identical to a filename in the parent directory. If you have a file named MYFILE in the current directory, for example, you cannot create the subdirectory MYFILE in this directory. If the file is named MYFILE.TXT, however, the names do not conflict, and you can create the MYFILE subdirectory.

  4. The maximum length of a path (from the root directory to the final directory) is 63 characters, including the backslashes.

  5. You are not restricted to creating subdirectories in the current directory. If you add a pathname, DOS establishes a new subdirectory in the directory that you specify.

  6. You must put a colon after the drive letter if it is included. If you don't include the colon, DOS interprets the drive letter as a subdirectory name, which is probably not what you wanted.

  7. If a backslash () is the first (or only) character in a subdirectory path, it's considered absolute and specified starting from the root directory. If the subdirectory path begins with a subdirectory name, it's considered relative, and the current directory is used as its starting point. A drive letter, followed by a colon, can precede either an absolute or a relative path.

Messages

Unable to create directory

Error: One of the following errors occurred:

  • You tried to create a directory that already exists.

  • You provided an incorrect pathname.

  • The disk's directory is full.

  • The disk is full.

  • A file with the same name already exists.

Check the directory in which the new subdirectory was to be created. If a conflicting name exists, either change the filename or use a new directory name. If the disk or the root directory is full, delete some files, create the subdirectory in a different directory, or use a different disk.

Invalid drive specified

Error: You have specified an invalid drive letter.

See Also

CD or CHDIR, MOVE, and RD or RMDIR

Creating Directories with MKDIR (MD)” in Chapter 5

MEM 4.0 and later—External

MEM 4.0 and later—External
MEM 4.0 and later—External

MEM is a utility that displays the amount of used and unused memory, allocated and open memory areas, and all programs currently in the system. MEM can be enormously useful when you want to see just how your memory is being used, and whether you have enough space left for another resident program to be loaded high.

Syntax

For DOS 6, the following parameters are available for MEM:

MEM  /CLASSIFY  /DEBUG  /FREE  /MODULE name  /PAGE

or

MEM  /C  /D  /F  /M name  /P

For DOS 5.0, the following parameters are available for MEM:

MEM  /CLASSIFY  /DEBUG  /PROGRAM

or

MEM  /C  /D  /P

Parameters and Switches

/CLASSIFY or /CDisplays programs that are in conventional and upper memory, their location in memory, and their size. Also displays a summary of the total free bytes of conventional and upper memory and the size of the largest executable program. You cannot use this switch with /DEBUG, /FREE, or /MODULE name.
/DEBUG or /DDisplays detailed information about the programs and driver in memory, including the address, name, size, and type of each segment for every program. Also displays a summary of the total free bytes of conventional and upper memory and the size of the largest executable program. You cannot use this switch with /CLASSIFY, /FREE, or /MODULE name.
/FREE or /F(DOS 6) Displays the free areas of conventional and upper memory in decimal and hexadecimal format. You cannot use this switch with /CLASSIFY, /DEBUG, or /MODULE name.
/MODULE name or /Mname(DOS 6) Displays the memory usage of the name program or driver, or /M name including the segment address, UMB region number, name, and type of each segment. You cannot use this switch with /CLASSIFY, /DEBUG, or /FREE.
/PAGE or /P(DOS 6) Pauses after each screen of output. You can use this switch with any of the other switches.
/PROGRAM or /P(DOS 4.0 and 5.0 only) Displays the status of programs that are loaded into memory. You cannot use this switch with /CLASSIFY or /DEBUG.

Rules

  1. You must specify /CLASSIFY, /DEBUG, /FREE, and /MODULE one at a time. You cannot combine any of these parameters. You can combine the /PAGE parameter with any of them, however.

  2. MEM displays the status of extended memory only if you have more than 1MB of memory in your computer. If you have only 1MB or less, you don't have any extended memory.

  3. The status of expanded memory is displayed only if you have expanded memory that conforms to Version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). Loading EMM386.EXE in your CONFIG.SYS file can provide expanded memory for 80386 or better computer systems with more than 1MB of memory installed.

  4. MEM displays the status of upper memory only if a UMB provider (for example, EMM386) is installed and DOS=UMB is included in your CONFIG.SYS file.

  5. MEM does not display the status of upper memory if you are running DOS under Microsoft Windows 3.0.

Notes

  1. Notes

    Starting with DOS 6.2, MEM displays numbers with embedded commas, making them much easier to read.

  2. A good way to determine a module name for MEM /MODULE name is first to issue the command MEM /C.

  3. If your PC has UMBs, you can use MEM /C or MEM /D extensively as you begin to load device drivers and TSRs into upper memory. MEM displays the location and size of each program in memory. This information can help you determine the order in which device drivers and TSRs load so that you can determine how best to use UMBs.

See Also

DEVICEHIGH=, EMM386.EXE, HIMEM.SYS, LOADHIGH or LH, and MEMMAKER

Displaying the Amount of Free and Used Memory” in Chapter 10

MEMMAKER 6.0 and later—External

MEMMAKER 6.0 and later—External
MEMMAKER 6.0 and later—External

MemMaker is a full-screen program that attempts to maximize the amount of free conventional memory you have in your computer by moving device drivers and memory-resident programs (TSRs) into upper memory blocks (UMBs). To use MemMaker, you must have an 80386SX or higher computer with more than 1MB of memory installed. MemMaker relies on the services provided by HIMEM.SYS, EMM386.EXE and DOS. (If you are using third-party memory management software, you should use its memory optimization program instead of MemMaker.)

Syntax

MEMMAKER  /B  /BATCH  /SESSION  /SWAP:drive  /T  /UNDO  /W:size1,size2

Parameters and Switches

/BCauses MemMaker to display correctly on a monochrome (black-and-white) monitor or LCD screen.
/BATCHRuns MemMaker in batch (unattended) mode. When you use this switch, DOS takes only the default actions and, if an error occurs, restores your CONFIG.SYS, AUTOEXEC.BAT, and (if necessary) Microsoft Windows SYSTEM.INI files. You can determine what was done by looking in the MEMMAKER.STS file.
/SESSIONUsed only by MemMaker during its optimization process. Do not specify this parameter.
/SWAP:driveSpecifies your boot drive's original disk letter, the one that refers to the drive when your CONFIG.SYS file begins. You need this switch only in rare cases (for example, when disk-compression software, such as Stacker 1.0, swaps drive letters). Unless MemMaker knows your boot disk drive, it cannot find your startup files. You do not need this switch if you are using DoubleSpace, Stacker 2.0 or later, or SuperStor.
/TDisables IBM Token Ring detection. Use this switch only if you are connected to a Token Ring network and have trouble running MemMaker.
/UNDOUndoes changes in the CONFIG.SYS, AUTOEXEC.BAT, and (if necessary) Microsoft Windows SYSTEM.INI files from a previous use of MemMaker. Use this switch if your system does not work after you run MemMaker or if you are dissatisfied with the new configuration.
/W:size1,size2Specifies how much upper memory (in kilobytes) to reserve for Microsoft Windows translation buffers. Windows needs two such buffers in either upper or conventional memory. size1 is the size of the first, and size2 is the size of the second. You might need to increase these values if Windows begins to run slowly after optimizing with MemMaker. The default is /W:0,0; MemMaker reserves no upper memory for Windows translation buffers.

See Also

DEVICEHIGH=, EMM386.EXE, HIMEM.SYS, LOADHIGH or LH, and MEM

Configuring Memory with MemMaker” in Chapter 19

MEMMAX

MEMMAX

You can use MEMMAX to enable or disable sections of memory. You can run it from the system prompt or in AUTOEXEC.BAT. MEMMAX is useful if programs you run have trouble attempting to load into memory and you need to disable an area to prevent the program from loading there.

Syntax

MEMMAX +|-U +|-L +|-V /U /L /V /?

Parameters and Switches

+|-UEnables or disables upper memory.
+|-LEnables or disables lower memory.
+|-VAllows or disallows loading programs into video memory area.
/UDisplays upper memory status.
/LDisplays lower memory status.
/VDisplays video memory status.
/?Displays abbreviated help.

MENUCOLOR= 6.0 and later—Internal

MENUCOLOR= 6.0 and later—Internal

Normally, DOS displays a startup menu in white text on a black background. When you use the MENUCOLOR= command, you can choose the screen colors that DOS uses. This command affects all text that DOS displays onscreen, not just the startup menu. You can use MENUCOLOR= only inside a menu block in your CONFIG.SYS file.

Syntax

MENUCOLOR=textcolor,background

Parameters and Switches

textcolorThe color to use for foreground text. Legal values are 0 through 15 (see the following table of color values). This parameter is required.
backgroundThe color to use for the background. Legal values are 0 through 15 (see the following table of color numbers). On some displays, using background colors with values higher than 7 causes the screen to blink. Do not include a space after the comma, or DOS ignores the entire MENUCOLOR= command. If no value is entered, DOS assumes Black (0).
 ValueColorValueColor
0Black8Gray
1Blue9Bright Blue
2Green10Bright Green
3Cyan11Bright Cyan
4Red12Bright Red
5Magenta13Bright Magenta
6Brown14Yellow
7White15Bright White

Notes

  1. The MENUCOLOR= command can appear only once inside each menu block in CONFIG.SYS.

  2. CONFIG.SYS allows two types of blocks: menu blocks and configuration blocks. Each block begins with a [blockname] and includes all the lines that follow, up to the next [blockname]. Menu blocks, which are blocks named [MENU] or defined with a SUBMENU= command, can include only menu-related commands. All other CONFIG.SYS commands belong in configuration blocks.

  3. If you do not specify a MENUCOLOR= command, the menu is displayed in white (7) on black (0). If only a foreground text color is specified, the background remains black (0). You cannot set the background color without also setting the foreground text color.

  4. Color choices set with this command remain in effect until another command or program resets them. Running CLS or loading the ANSI.SYS device driver resets the screen to its default colors.

    Caution

    Unlike many other commands, the MENUCOLOR= command does not allow a space after the comma between its parameters. If you include a space, DOS ignores the MENUCOLOR= command and does not set your color choices.

  5. If you select a bright background color (values higher than 7), some displays set the blink attribute for the foreground text, and all the text onscreen starts to blink. Although blinking text may be annoying, it does no harm, and you can turn it off by using the CLS or MODE CO80 command. To fix the problem, choose a background color between 0 and 7, and restart your computer.

  6. A really nasty mistake is to set the foreground color the same as the background color. Because you can't read any of the prompts when the colors are the same, you might need to reboot and use the F5 Clean key to bypass your CONFIG.SYS file. Alternatively, you can select a menu choice blind (press 1 and then press Enter), wait for all the drive activity to stop, and then type CLS and press Enter.

Examples

Suppose that you want to set up a menu that enables you to choose from three basic configurations for your computer: Windows, DOS, and Maintenance. To jazz it up a bit, you want to set the screen colors to bright blue text on a white background. To do so, add the following lines to your CONFIG.SYS file:

[MENU]
MENUITEM=WIN, Configure for Windows (Default)
MENUITEM=DOS, Configure for MS-DOS
MENUITEM=MAINT, Configure for File & Disk Maintenance
MENUDEFAULT=WIN, 30
MENUCOLOR=9,7

The MENUCOLOR= command sets the foreground color to bright blue (9) and the background color to white (7). These colors remain in effect until another program resets them.

See Also

[blockname], MENUDEFAULT=, MENUITEM=, and SUBMENU=

Creating Multiple Configurations” in Chapter 2

MENUDEFAULT= 6.0 and later—Internal

MENUDEFAULT= 6.0 and later—Internal

Using the MENUDEFAULT= command, you can select which startup configuration DOS executes if no keys are pressed within the timeout period you specify. Without this command, DOS chooses menu item #1 and waits for you to press the Enter key. If you specify a default configuration and timeout period, DOS can continue booting without you. You can use MENUDEFAULT= only inside a menu block in your CONFIG.SYS file.

Syntax

MENUDEFAULT=blockname, timeout

Parameters and Switches

blocknameThe menu line that DOS should highlight when the menu is displayed. If you specify a timeout value, DOS executes this configuration block automatically after timeout seconds. blockname must match the corresponding entry in a MENUITEM= or SUBMENU= command. This argument is required.
timeoutThe number of seconds, from 0 to 90, that DOS should wait before executing the blockname configuration block. If you do not specify a timeout value, DOS waits until you press the Enter key before executing the selected configuration. A timeout value of 0 executes the blockname configuration block without displaying the menu onscreen at all.

Notes

  1. The MENUDEFAULT= command can appear only once inside each menu block in CONFIG.SYS.

  2. CONFIG.SYS allows two types of blocks: menu blocks and configuration blocks. Each block begins with a [blockname] and includes all the lines that follow, up to the next [blockname]. Menu blocks, which are blocks named [MENU] or defined with a SUBMENU= command, can include only menu-related commands. All other CONFIG.SYS commands belong in configuration blocks.

  3. The menu item selected with the MENUDEFAULT= command displays highlighted onscreen. You can move the highlight with the arrow keys or type the line number to select a different menu line. The Enter a Choice: prompt displays the number of the selected menu item.

  4. When you specify a timeout value, DOS displays a countdown onscreen as it waits for you to override the default choice. If you press any key before the timeout period has elapsed, the timer stops, and DOS waits for you to make a menu selection and press the Enter key.

Caution

If the timeout parameter contains an illegal value, DOS assigns a timeout of zero, and the menu isn't displayed at all. Not having a menu display can be troublesome when you are debugging a new menu. To determine whether an incorrectly set timeout value is causing the problem, press the F8 Interactive key when the Starting MS-DOS... message appears onscreen. If the menu appears, the timeout value is defaulting to zero. If the menu still doesn't appear, look for undefined or misspelled blocknames.

Examples

Suppose that you want to set up a menu that enables you to choose from three basic configurations for your computer: Windows, DOS, and Maintenance. Because you normally work with Windows programs, you want the default choice to be the WIN configuration. To do so, add the following lines to your CONFIG.SYS file:

[MENU]
MENUITEM=WIN, Configure for Windows (Default)
MENUITEM=DOS, Configure for MS-DOS
MENUITEM=MAINT, Configure for File & Disk Maintenance
MENUDEFAULT=WIN, 30

When you include these lines in your CONFIG.SYS file, DOS searches for blocks named [WIN], [DOS], and [MAINT]. As long as those blocks exist in the file, the menu that DOS displays looks something like this:

MS-DOS 6 Startup Menu
=====================

1. Configure for Windows (Default)
2. Configure for MS-DOS
3. Configure for File & Disk Maintenance

Enter a choice: 1

Entering 1, 2, or 3 at this menu instructs DOS to select the [WIN], [DOS], or [MAINT] block, respectively. If you don't make an entry within about 30 seconds, DOS chooses the [WIN] configuration by default.

See Also

[blockname], MENUCOLOR=, MENUITEM=, and SUBMENU=

Creating Multiple Configurations” in Chapter 2

MENUITEM= 6.0 and later—Internal

MENUITEM= 6.0 and later—Internal

New with DOS 6 is the capability to define a startup menu from which you can choose the group of CONFIG.SYS commands to process when you reboot. You use the MENUITEM= command to define the text of a menu line, as well as the configuration block that DOS should process when that menu line is chosen. You can use MENUITEM= only inside a menu block in your CONFIG.SYS file.

Syntax

MENUITEM=blockname, menutext

Parameters and Switches

blockname

The name of the configuration block that you want to execute when this menu item is chosen. blockname can be up to 70 characters long, but it can't contain any spaces or the following special characters:

/  ,  ;  =  [  ]

(For more details, see [blockname] in this command reference.) The CONFIG environment variable is set to the value of the blockname selected. This argument is required.

menutextThe text you want DOS to display for this menu line. menutext can be up to 70 characters long and contain any text you want, including spaces. Separate menutext from blockname with a comma. If you do not provide menutext, DOS displays the blockname in the menu.

Notes

  1. The MENUITEM= command can appear only inside menu blocks in CONFIG.SYS.

  2. CONFIG.SYS allows two types of blocks: menu blocks and configuration blocks. Each block begins with a [blockname], and includes all the lines that follow, up to the next [blockname]. Menu blocks, which are blocks named [MENU] or defined with a SUBMENU= command, can include only menu-related commands. All other CONFIG.SYS commands belong in configuration blocks.

  3. The top-level (first) menu block must be named [MENU] so that DOS can recognize it. You can name additional menu blocks that you define with the SUBMENU= command anything you like.

  4. Up to nine choices can be displayed in a menu, so you are limited to nine MENUITEM= and/or SUBMENU= commands in a menu block. The menu items are displayed onscreen in the order that they appear in the menu block, numbered from 1 to 9.

  5. If DOS cannot find the block referred to by a MENUITEM= command in your CONFIG.SYS file, it doesn't display that choice in the menu. To get around this limitation, add a [blockname] line to your CONFIG.SYS file, but don't include any commands in it.

  6. DOS sets the CONFIG environment variable equal to the name of the configuration block selected from the startup menu. You can use the CONFIG variable in your AUTOEXEC.BAT file to continue customizing your system's configuration based on the choice you made at the startup menu.

Caution

If you intend to use the CONFIG variable in GOTO statements in your AUTOEXEC.BAT file, try to keep your blocknames short. Only the first eight characters in a batch file label are significant, so if any of your blocknames start with the same eight characters, one or more of the GOTO labels you set up will never be reached. You can get around this limitation by using the IF command to make comparisons or by simply using shorter blocknames.

Examples

Suppose that you want to set up a menu that enables you choose from three basic configurations for your computer: Windows, DOS, and Maintenance. To do so, add the following lines to your CONFIG.SYS file:

[MENU]
MENUITEM=WIN, Configure for Windows (Default)
MENUITEM=DOS, Configure for MS-DOS
MENUITEM=MAINT, Configure for File & Disk Maintenance
MENUDEFAULT=WIN, 30

When you include these lines in your CONFIG.SYS file, DOS searches for blocks named [WIN], [DOS], and [MAINT]. As long as those blocks exist in the file, the menu that DOS displays looks something like this:

MS-DOS 6 Startup Menu
=====================

1. Configure for Windows (Default)
2. Configure for MS-DOS
3. Configure for File & Disk Maintenance

Enter a choice: 1

Entering 1, 2, or 3 at this menu instructs DOS to select the [WIN], [DOS], or [MAINT] block, respectively. If you don't make an entry within about 30 seconds, DOS chooses the [WIN] configuration by default.

See Also

[blockname], MENUCOLOR=, MENUDEFAULT=, and SUBMENU=

Creating Multiple Configurations” in Chapter 2

MIRROR 5.0—External

MIRROR 5.0—External
MIRROR 5.0—External
MIRROR 5.0—External
MIRROR 5.0—External

MIRROR is a utility that can record information about the file allocation table (FAT) and root directory to enable you to use the UNFORMAT and UNDELETE commands. MIRROR also can save partition table information to a file that UNFORMAT can use if your partition table becomes corrupted.

MIRROR is included on the DOS 6.0 Supplemental Disk, but not in the standard DOS 6 package. For information about similar capabilities in DOS 6, see the section on the UNDELETE command later in this command reference.

Syntax

MIRROR  drive: ...  /Tdrive-entries  /1

To save information about a drive partition, use the following format:

MIRROR  /PARTN

To quit tracking deleted files, use the following format:

MIRROR  /U

Parameters and Switches

drive:Specifies the drive(s) for which you want MIRROR to record FAT and root directory information. You can specify as many drive letters (with colons) as you want; just separate each one from the others with a space.
/Tdrive-entriesLoads a memory-resident tracking program that records information about deleted files. The drive specifies the drive where MIRROR saves information about deleted files. -entries is an optional value (ranging from 1 to 999) that specifies the maximum number of deleted files to be tracked. Default values are listed in the table in following the Notes section.
/1Keeps MIRROR from creating a backup of the mirror file when the FAT and root directory information are updated.
/PARTNMakes a copy of the drive's partition table.
/URemoves the deleted-file tracking program from memory. You might not be able to unload MIRROR if you've loaded other resident software into memory after MIRROR.

Rules

  1. Do not use the /T switch with drives that use JOIN or SUBST.

  2. If you use ASSIGN, you must place this command before the MIRROR command. If possible, don't use any “pretender” programs while Mirror's deleted-file tracking program is active.

  3. DOS saves information about deleted files in the file PCTRACKR.DEL. The UNDELETE command uses this file. With DOS 6, UNDELETE has Delete Tracker and Delete Sentry options of its own, and you should use them in preference to Mirror's deleted-file tracking features.

  4. DOS saves system information, the FAT, and the root directory in the file MIRROR.FIL. The UNFORMAT command uses this file. FORMAT saves information for UNFORMAT as well.

  5. DOS saves information about the hard drive partition in the file PARTNSAV.FIL. The UNFORMAT command uses this file. In DOS 6, no utility in the standard package can save this information for UNFORMAT to use.

Notes

Caution

The MIRROR and UNFORMAT commands are not replacements for proper backups of your hard disk. Although the information that MIRROR saves can be very handy, full and regular backups are a much safer and more reliable means of ensuring that you do not lose data.

  1. When you track deleted files, you can specify how many files are contained in the PCTRACKR.DEL file (1 to 999) by using the /Tdrive-entries parameter. The default values, however, probably are satisfactory. Those values are as follows:

    Size of DiskEntries Stored
    360KB25
    720KB50
    1.2MB/1.44MB75
    20MB101
    32MB202
    Larger than 32MB303
  2. Using the /PARTN switch with MIRROR creates the file PARTNSAV.FIL, which contains information from the drive's partition table. The partition initially is created with FDISK. You are instructed to place a floppy disk in drive A rather than save PARTNSAV.FIL on the hard disk. The file is saved on the disk. Label and store the disk in a safe place.

  3. UNFORMAT, a companion command to MIRROR, uses these files. If you lose information, if you accidentally format a disk, or if the partition table is damaged, you can recover the lost information by using UNFORMAT if you previously used MIRROR.

Messages

Creates an image of the system area. Drive C being processed.
The MIRROR process was successful.

Information: These messages appear when you issue the command MIRROR while drive C is the current drive. The messages indicate that MIRROR performed successfully.

Deletion-tracking software being installed.
The following drives are supported:
Drive C - Default files saved.
Installation complete.

Information: These messages appear when you install MIRROR with delete tracking. The messages indicate that delete tracking for drive C is installed correctly.

WARNING! Unrecognized DOS INT 25h/26h handler. Some other TSR
programs may behave erratically while deletion-tracking software is resident
Try installing MIRROR program before your other resident programs.

Warning: Some other TSR conflicted with delete tracking. Experiment with loading TSRs and delete tracking in a different order. As suggested in the message, you might have to install MIRROR before any other resident software you use. When you find the correct order, modify AUTOEXEC.BAT so that the TSRs and delete tracking are loaded in the correct sequence.

See Also

FDISK, UNDELETE, and UNFORMAT

MKDIR (see MD)

MKDIR is an alternative name for the MD command. For information on using the MD or MKDIR command, see the entry for MD in this command reference.

MODE 1.1 and later—External

MODE 1.1 and later—External
MODE 1.1 and later—External

The MODE command generally configures system devices. The details of the command's functions, however, are so varied that the syntax quickly becomes quite complex. Therefore, the following sections cover each of the MODE command's functions separately:

  • To set serial ports, see the entry for MODE COM#.

  • To configure the keyboard and display, see the entry for MODE CON.

  • To use MODE's code page functions, see the entry for MODE device CP.

  • To set the display device and mode, see the entry for MODE display.

  • To set parallel (printer) ports, see the entry for MODE LPT#.

Display Device Status Information

To display the status of any or all the devices that MODE can control, use the following command format:

MODE  device  /STATUS

Parameters and Switches

deviceThe DOS device for which you want to see status information. device can be any one of the following:
 Device NameDescription
COM1 through COM4Serial communication ports
CONThe console, which is your keyboard and display
LPT1 through LPT3Parallel printer ports
PRNThe primary printer port, normally LPT1
If you omit this parameter, MODE displays information about the status of all the devices attached to your system.
/STATUSIncluding this parameter requests the status of any redirected parallel ports you may have set without canceling the redirection. If you omit the /STATUS parameter and you are redirecting any parallel ports, the redirection is canceled when the information about that port is displayed. You can abbreviate /STATUS as /STA.

Notes

  1. If you ask for the status of the PRN device (for example, MODE PRN), MODE displays information about the code page status of the primary printer port. If you ask for the status of LPT1, however, it reports on the retry setting currently in effect.

  2. You can include a colon after the device name or leave it off; its use is optional.

  3. The AUX device, which is normally the same as COM1, is not recognized by the MODE command.

  4. Status information has been available from the MODE command since DOS 4.0.

Messages

Illegal device name - device

Error: You have specified a device name that is not present in your computer. device is the name of the device that you entered in the MODE command.

Invalid parameter - parameter

Error: You have specified the name of a device that MODE doesn't recognize or have included an unsupported parameter. Check the command to make sure that you have entered it correctly.

See Also

ANSI.SYS, CHCP, COUNTRY=, DISPLAY.SYS, KEYB, and NLSFUNC

Altering the Look of the Screen with MODE” in Chapter 11, “The MODE Command” in Chapter 13, and “Understanding Code Page Switching” in Chapter 14

MODE COM# 1.1 and later—External

MODE COM# 1.1 and later—External
MODE COM# 1.1 and later—External
MODE COM# 1.1 and later—External

You use the MODE COM# form of the MODE command to initialize serial ports connected to your computer. Many programs initialize the ports themselves, but in case they don't, DOS provides this functionality in the MODE COM# command. The INTERSVR /RCOPY remote copy operation depends on the services of MODE COM# to make the remote copy operation succeed, for instance.

Syntax

The old syntax, which is simple but not very intuitive, is as follows:

MODE COM#: baud, parity, databits, stopbits, retry

If you are running DOS 4.0 or later, you can use the following format:

MODE COM#:  BAUD=baud  PARITY=parity  DATA=databits  STOP=stopbits  RETRY=retry

Parameters and Switches

#:Specifies the serial port that you want to initialize. DOS supports COM ports 1, 2, 3, and 4, but they may not all be installed in your computer. The colon after the number is optional.
baudSpecifies the baud rate to use. Legal values for baud are 110, 150, 300, 600, 1200, 2400, 4800, 9600, or 19200. You need to enter only the first two digits—for instance, 24 instead of 2400. (Baud equals bits per second for rates higher than 300.) Not all computers can support 19200-baud serial transmissions.
parityIndicates the parity checking setting. Legal values are N for None, O for Odd, E for Even, M for Mark, or S for Space. Not all computers support the Mark and Space parity settings. The default setting is E.
databitsSpecifies the number of data bits. Legal values are 5 through 8. The default value is 7. Not all computers support 5 and 6 data bits.
stopbitsSpecifies the number of stop bits. Legal values are 1, 1.5, and 2. If baud is 110, the default is 2; otherwise, the default is 1. Not all computers support 1.5 stop bits.
retryInstructs DOS about how to handle timeout errors. Using this parameter causes part of MODE to remain resident in memory. You can choose one of the following options:
 retryAction
BReturn busy when the port is busy
EReturn error when the port is busy
PRetry until output is accepted
RReturn ready when the port is busy (infinite retry)
N or NONETake no action (the default)

Notes

  1. For DOS versions before 5.0, you must enter the adapter's number, followed by a space and baud rate. If you type the optional colon, you must type the adapter number immediately before the colon. All other parameters are optional.

  2. Note that with the older, unlabeled syntax, MODE interprets each parameter by position alone, and you must enter them in the order shown. If you do not want to enter a value for a particular parameter, enter a comma for that value, or use the newer syntax where relative position on the command line is unimportant.

  3. If you enter an invalid parameter, DOS responds with an invalid-parameter message and takes no further action.

  4. You can abbreviate the baud rate parameter by using only the first two digits of the baud rate. For example, you can specify 11 for 110 baud, or 96 for 9600 baud.

  5. If you want continuous retries after a timeout, you must enter RETRY=B (or P for versions of DOS before 5.0) every time you use the MODE COM#: command. Other settings remain in effect if you do not specify new values for them.

  6. If the adapter is set for continuous retries (RETRY=B) and the device is not ready, the computer may appear to hang up when it's really just waiting for the port. You can abort this loop by pressing Ctrl+Break.

  7. If you use a networked printer, do not specify any of the RETRY values.

  8. To display the current status of a serial port, enter the MODE COM# command without any parameters. To display the status of all the DOS devices attached to your computer, enter the MODE command alone.

See Also

MODE LPT# and MODE device /STATUS

Using MODE to Change Serial Port Settings” in Chapter 13

MODE CON 4.0 and later—External

MODE CON 4.0 and later—External
MODE CON 4.0 and later—External

MODE can configure various aspects of the console device, which refers to your keyboard and display. For the keyboard, MODE can set the keyboard repeat rate and delay. For the monitor, MODE can, with the help of the ANSI.SYS device driver, control the number of lines and columns displayed in text mode.

Syntax

To configure the keyboard, use the following format:

MODE  CON:  RATE=rate  DELAY=delay

To configure the monitor, use the following format:

MODE  CON:  COLS=columns  LINES=lines

Parameters and Switches

CON:Specifies the console device. The colon is optional.
rateSpecifies the rate at which a character repeats when you hold down a key. Legal values are in the range of 1 to 32, which represents approximately 2 to 30 characters per second. The default is 20 for most keyboards and 21 for IBM PS/2 keyboards. To set the rate, you also must set the delay.
delaySpecifies the length of the delay between the initial pressing of the key and the start of automatic character repetition. This value can be 1, 2, 3, or 4, which represent delays of 1/4 second, 1/2 second, 3/4 second, and one full second, respectively. The default is 2. To set the delay, you also must set the rate.
columnsIndicates the number of columns to display onscreen. Legal values are 40 and 80. Most computers start up in an 80-column screen mode. If you omit this parameter, the display keeps its present column setting.
linesIndicates the number of lines to display onscreen. Legal values are different for different types of monitors. CGA and MDA monitors support 25-line text modes only. EGA monitors support 25- and 43-line text modes. VGA monitors support 25-, 43-, and 50-line text modes. Most computers start up in a 25-line screen mode. If you omit this parameter, the display keeps its present lines setting.

Notes

  1. To set the keyboard repeat rate, you must specify both rate and delay settings. You cannot use these parameters individually.

  2. The CapsLock, ScrollLock, NumLock, and Insert keys never repeat, no matter how long you hold them down.

  3. Only enhanced keyboards support having their repeat rate changed. The original 84-key keyboards supplied with the IBM PC use a fixed repeat rate and ignore the MODE CON command.

  4. Using the MODE CON command to change the number of lines and columns displayed on your screen requires the assistance of the ANSI.SYS device driver. If ANSI.SYS isn't in memory when the command executes, an error message is displayed, and the requested screen mode change does not take place. (See the first message in the “Messages” section.)

Examples

To set the keyboard to repeat as quickly as possible but increase the delay before repeating to 3/4 of a second, you enter the following command:

MODE  COM  RATE=32  DELAY=3

To reset the keyboard to its default values, you enter the following command:

MODE  COM  RATE=20  DELAY=2

To set an EGA or VGA monitor to a 43-line text mode, you enter the following command:

MODE  CON  LINES=43

Messages

ANSI.SYS must be installed to perform requested function

Error: MODE requires the assistance of the ANSI.SYS device driver to perform the requested operation, but it isn't loaded. To use this MODE command, you have to add a DEVICE= line loading the ANSI.SYS device driver to your CONFIG.SYS file and restart your computer.

Rate and delay must be specified together

Error: MODE CON requires that you specify both the rate and delay settings in order to change the keyboard settings for these parameters. Make sure that you specified both parameters on the command line.

See Also

ANSI.SYS and MODE display

Using MODE to Change the Typematic Rate” in Chapter 13

MODE device CP 3.3 and later—External

MODE device CP 3.3 and later—External
MODE device CP 3.3 and later—External

The MODE command offers four subfunctions that you can use to prepare and manipulate code pages on your computer. You use these commands in conjunction with the other international commands to configure your computer to use standards popular in various countries.

Syntax

To prepare and load a code page into the DISPLAY.SYS and/or PRINTER.SYS device drivers, use the following format:

MODE  device  CODEPAGE  PREPARE=((codepage...)  cpi_file)

or

MODE  device  CP  PREP=((codepage...)  cpi_file)

To switch to a code page that has been previously prepared, use the following format:

MODE  device  CODEPAGE  SELECT=codepage

or

MODE  device  CP  SEL=codepage

To reload the current code page into the hardware, use the following format:

MODE  device  CODEPAGE  REFRESH

or

MODE  device  CP  REF

To display code page status information, use the following format:

MODE  device  CODEPAGE  /STATUS

or

MODE  device  CP  /STA

Parameters and Switches

deviceSpecifies the DOS device that you want to use. This parameter is required. device can be any one of the following:
 Device NameDescription
CONThe console, which is your keyboard and display
LPT1 through LPT3Parallel printer ports
PRNThe primary printer port, normally LPT1
CODEPAGE PREPARE or CP PREPPrepares code pages (character sets), which simply means that it loads the specified code page into the device driver in memory (DISPLAY.SYS or PRINTER.SYS). You must prepare a code page before you can use it with the CHCP or the MODE device CODEPAGE SELECT commands. CODEPAGE can be abbreviated as CP, and PREPARE can be abbreviated as PREP.
CODEPAGE SELECT or CP SELSwitches the current code page to the onespecified. The code page you switch to must have been previously loaded with the MODE device CODEPAGE PREPARE command, or be permanently available from the hardware. CODEPAGE can be abbreviated as CP, and SELECT can be abbreviated as SEL.
CODEPAGE REFRESH or CP REFReloads the current code page. You need to use this command if your printer loses the code page information loaded into it by being turned off. The code page you refresh must have been previously loaded with the MODE device CODEPAGE PREPARE command. CODEPAGE can be abbreviated as CP, and REFRESH can be abbreviated as REF.
codepageSpecifies the code page (character set) that you want to prepare or select. You can enter more than one codepage in the PREPARE command. For a list of the code pages supported by MS-DOS, see Chapter 14, “Understanding the International Features of DOS.”
cpi_fileSpecifies the name and location of the file that contains code page information for the specified device. If you don't specify a drive, DOS assumes the current drive. If you don't specify a subdirectory path, DOS assumes the current directory. The filename is required. MS-DOS 6 provides the following code page information files for use with DISPLAY.SYS and PRINTER.SYS:
 CPI FileDescription
EGA.CPICode pages for EGA and VGA displays
EGA.ICE(DOS 6.0 only) Icelandic code pages for EGA and VGA displays
Parameters and Switches EGA2.CPIAn alternative set of code pages for EGA and VGA displays
LCD.CPI(Supplemental Disk) Code pages for an IBM Convertible's LCD display
4201.CPI(Supplemental Disk) Code pages for IBM Proprinters II and III Model 4201 and IBM Proprinters II and III XL Model 4202
4208.CPI(Supplemental Disk) Code pages for IBM Proprinters X24E Model 4207 and IBM Proprinters XL24E Model 4208
5202.CPI(Supplemental Disk) Code pages for IBM Quietwriter III printer
Setup places these files in the C:DOS subdirectory by default.
/STATUSDisplays the number of code pages prepared or selected for the specified device. You can include this parameter or leave it out; it makes no difference. Microsoft states that you can abbreviate it as /STA, but because you can abbreviate it to nothing, it hardly matters.

Notes

  1. You must specify a valid device. The options are CON:, PRN:, LPT1:, LPT2:, and LPT3:. The colon after the device name is optional.

  2. MODE device CODEPAGE PREPARE prepares code pages (character sets) for the console (keyboard and display) and printers. Issue this subcommand before issuing the MODE device CODEPAGE SELECT subcommand, unless you use the IBM Quietwriter III printer, whose font information is contained in cartridges. If the code page that you need is in a cartridge, you do not need to use the PREPARE command.

  3. For the PREPARE command, you must specify one or more code pages. You can use commas or spaces to separate the numbers if you specify more than one. You must enclose the entire list of code pages in parentheses.

  4. When you add or replace code pages by using a PREPARE command, enter a comma for any code page that you do not want to change.

  5. For the SELECT command, you must specify a single code page. The code page must be either part of a MODE device CODEPAGE PREPARE command for the device or the hardware code page specified to the appropriate device driver.

  6. MODE device CODEPAGE SELECT activates a currently prepared code page or reactivates a hardware code page. You can use MODE device CODEPAGE SELECT only on these two types of code pages.

  7. MODE device CODEPAGE SELECT usually downloads any software font to the device, except for the Quietwriter III printer, which uses cartridges.

  8. MODE device CODEPAGE SELECT activates code pages for individual devices. You can use the CHCP command to activate the code pages for all available devices.

  9. MODE device CODEPAGE REFRESH downloads, if necessary, and reactivates the currently selected code page on a device. Use this command after you turn on your printer, or after a program changes the video display and leaves the console code page in ruins.

  10. MODE device CODEPAGE /STATUS displays the following information about the device:

    • The selected (active) code page, if one is selected

    • The hardware code page(s)

    • Any prepared code page(s)

    • Any available positions for additional prepared code pages

Examples

To prepare the first parallel port with the multilingual (Latin 1) code page found in the file C:DOS4201.CPI, enter the following:

MODE  LPT1  CP  PREP=((850) C:DOS4201.CPI)

See Also

CHCP, COUNTRY=, DISPLAY.SYS, KEYB, NLSFUNC, and PRINTER.SYS

Understanding Code Page Switching” in Chapter 14

MODE display 2.0 and later—External

MODE display 2.0 and later—External
MODE display 2.0 and later—External

The MODE display form of the MODE command can switch the active display adapter between the monochrome display (MDA) and a graphics display adapter (Color Graphics Adapter (CGA), Enhanced Color Graphics Adapter (EGA), or Video Graphics Array (VGA)) on a two-display system.

Syntax

MODE  display_mode, lines

For systems with CGA monitors, you can use the following syntax to shift the display on your screen:

MODE display_mode,shift, T

Parameters and Switches

display_modeIndicates the display adapter to activate if you have more than one installed in your computer. This parameter also specifies the text mode to be used, so it's handy even with only one monitor installed. Legal values for display_mode are listed in the following table.
 Display ModeDescription
40Sets the graphics display to 40 characters per line
80Sets the graphics display to 80 characters per line
BW40Makes the graphics display the active display and sets the mode to 40 characters per line, black and white (color disabled)
BW80Makes the graphics display the active display and sets the mode to 80 characters per line, black and white (color disabled)
CO40Makes the graphics display the active display and sets the mode to 40 characters per line (color enabled)
CO80Makes the graphics display the active display and sets the mode to 80 characters per line (color enabled)
MONOMakes the monochrome display the active display
If your computer has an MDA adapter (monochrome or Hercules Mono), it starts up in MONO mode. All other display adapters start up in CO80 mode.
linesSpecifies the number of lines to display onscreen. Legal values are different for different types of monitors. CGA and MDA monitors support 25-line text modes only. EGA monitors support 25- and 43-line text modes. VGA monitors support 25-, 43-, and 50-line text modes. Most computers start up in a 25-line screen mode. If you omit this parameter, the display keeps its current lines setting.
shift(CGA displays only) Enables you to shift the onscreen image left or right. Legal values are L to shift left and R to shift right. In an 80-column mode, the screen shifts two characters at a time, and in a 40-column mode, one character at a time.
T(CGA displays only) Displays a test pattern. This parameter can help you when you are using the left and right shift parameter to get the screen centered.

Notes

  1. The MODE CO80 command can be very handy for resetting your screen when it's left in an unknown state by an inconsiderate program. It also restores the cursor to its normal size and position. If your screen goes black when you exit a graphics utility program, for example, try typing in this command, even if you can't see what you're typing.

  2. For the first form of the command, you must enter the display_mode. All other parameters are optional.

  3. The second form of this command is legal to use only with displays that use a Color Graphics Adapter (CGA). On any other type of display, this form of the command does nothing. To adjust a CGA display, you must enter the shift parameter (L or R), but you can avoid resetting the display_mode by typing a comma before the shift parameter. Depending on whether you are in a 40- or an 80-column screen mode, the screen shifts one or two characters to the right or left. Including the T parameter displays a test pattern onscreen and prompts you to type Y if the screen is centered or N to shift the display further left or right.

  4. Using the MODE CON command to change the number of lines displayed on your screen requires the assistance of the ANSI.SYS device driver. (You can change the display_mode without ANSI.SYS, however.) If ANSI.SYS isn't in memory when the command executes, an error message is displayed, and the requested screen mode change does not take place. (See the first message in the “Messages” section.)

Examples

If you have a CGA, EGA, or VGA display and you want to reset the screen to normal, including the shape of the cursor, enter the following command:

MODE  CO80

MODE CO80 can be a lifesaver when a program leaves your screen in limbo. Even if you can't see what you're typing, DOS resets the screen mode to its normal mode when you enter these commands.

Messages

ANSI.SYS must be installed to perform requested function

Error: MODE requires the assistance of the ANSI.SYS device driver to perform the requested operation, but it isn't loaded. To use this MODE command, you have to add a DEVICE= line that loads the ANSI.SYS device driver to your CONFIG.SYS file and restart your computer.

See Also

CLS and MODE CON

Altering the Look of the Screen with MODE” in Chapter 11

MODE LPT# 3.2 and later—External

MODE LPT# 3.2 and later—External
MODE LPT# 3.2 and later—External
MODE LPT# 3.2 and later—External

You can use the MODE LPT# form of the MODE command to set the operating characteristics of your printer or to redirect printer output to a serial port. You can set the lines and columns only for IBM- and Epson-compatible printers.

Syntax

MODE  LPT#:  columns, lines, retry

or

MODE  LPT#:  COLS=columns  LINES=lines  RETRY=retry

To force DOS to print to a serial printer instead of a parallel printer, use the following format:

MODE  LPT#:=COM#

Parameters and Switches

LPT#:Specifies the parallel printer port you want to configure. DOS supports LPT ports 1, 2, and 3, but they may not all be installed in your computer. The colon after the number is optional.
COM#:Specifies the serial port to which you want to redirect printer output. DOS supports COM ports 1, 2, 3, and 4, but they may not all be installed in your computer. The colon after the number is optional.
columns(IBM- and Epson-compatible printers only) Indicates the number of characters per line to print on the printer. Legal values are 80 and 132. Most printers start up in an 80-column mode. If you omit this parameter, the printer keeps its current characters-per-line setting.
lines(IBM- and Epson-compatible printers only) Specifies the number of lines per inch to print on the printer. Legal values are 6 and 8. Most printers start up in a 6-line-per-inch mode. If you omit this parameter, the printer keeps its current lines-per-inch setting.
retryInstructs DOS about how to handle timeout errors. Using this parameter causes part of MODE to remain resident in memory. You can choose one of the following options:
 retryAction
BReturn busy when the port is busy
EReturn error when the port is busy
PRetry until output is accepted
RReturn ready when the port is busy (infinite retry)
N or NONETake no action (the default)

Rules

  1. When configuring a parallel port, you must specify a printer number, but all other parameters are optional, including the colon after the printer number.

  2. If you do not want to change a configuration parameter, enter a comma for that parameter.

  3. The MODE LPT#:=COM#: command cancels the effect of the MODE LPT#: command.

  4. A parameter does not change if you skip that parameter or use an invalid parameter. The printer number, however, must be entered correctly.

  5. In DOS 3.3 and earlier versions, if you specify P for continuous retries, you can cancel P only by reentering the MODE command without P. In later versions of DOS, the RETRY=B option has the same effect as the P option of previous DOS versions.

  6. If you use a networked printer, do not use any of the RETRY values.

  7. The characters-per-line and lines-per-inch portions of the command affect only IBM printers, Epson printers, and other printers that use Epson-compatible control codes.

  8. When you are redirecting printer output, the ports you specify for both the parallel printer port and serial printer port must be valid. In other words, you cannot redirect printer output to a serial printer if you don't have a parallel port, and you can't use a nonexistent parallel port to get around this problem.

  9. After you issue the redirection command, all printing that normally goes to the parallel printer goes to the designated serial printer. Programs that write directly to the hardware, such as Microsoft Windows, are not affected by this redirection. For such programs, try printing to a file named LPT1.TXT, substituting whatever parallel port you've redirected.

  10. If you are using a serial printer, you usually have to use the MODE COM# command to set the parameters on your serial port to match the printer. Check your printer's documentation to find out the correct settings to use.

  11. You can cancel or undo the redirection command by issuing the MODE LPT#: command.

Notes

This command controls IBM dot-matrix and graphics printers, all Epson printers, and Epson-compatible printers. The command may work partially or not at all on other printers.

When you change the column width, MODE sends the special printer-control code that specifies the normal font (80) or the condensed font (132). When you change the lines-per-inch setting, MODE sends the correct printer-control code for printing 6 or 8 lines per inch. MODE also sets the printer to 88 lines per page for an 8-lines-per-inch setting and to 66 lines per page for a 6-lines-per-inch setting.

If you use the P option of DOS 3.3 or earlier versions or the B retry option of later versions of DOS and attempt to print on a deselected printer, the computer does not issue a timeout error. Rather, the computer internally loops until the printer is ready (turned on, connected to the PC, and selected). For about a minute, the computer appears to be locked up. To abort the continuous retry, press Ctrl+Break.

The redirection capabilities of MODE are useful for systems that are connected to a serial printer. When you type the following command, the serial printer receives all the output that usually is sent to the system printer (assuming that the serial printer is connected to the first Asynchronous Communications Adapter):

MODE LPT1: = COM1:

This output includes the print-screen (Shift+PrtSc) function. Before you issue the MODE LPT=COMy command, use the MODE COMn: command to set up the serial adapter used for the serial printer.

MONOUMB.386 6.0 and later—Windows

MONOUMB.386 6.0 and later—Windows
MONOUMB.386 6.0 and later—Windows

If you have a VGA display, you might be able to increase the amount of upper memory space by instructing MemMaker to include the monochrome display region (B000h to B7FFh) in its search for available UMB space. If you run Windows, and you're using this region as UMB space, you need to add a device line for the MONOUMB.386 driver to the [386Enh] section of SYSTEM.INI so that Windows knows what you're up to.

Syntax

To use the monochrome region as UMB space, include the following line in the [386Enh] section of SYSTEM.INI:

DEVICE=drive:pathMONOUMB.386

Parameters and Switches

drive:pathSpecifies the full path to the MONOUMB.386 file on your system. The setup program for DOS 6 places this file in the C:DOS subdirectory by default.

Notes

  1. There are a few good reasons why you might not want to use the monochrome region as upper memory space on a VGA system. If you or one of your software programs switches the VGA to monochrome mode (perhaps with the MODE MONO command), the display overwrites whatever resident software you have loaded there. Also, some Super VGA adapters use this memory region when they are in high-resolution graphics modes.

  2. To instruct MemMaker to include this region in its search for upper memory space, choose Custom Setup and answer yes to the question Use monochrome region (B000-B7FF) for running programs?.

See Also

MEMMAKER

MORE 2.0 and later—External

MORE 2.0 and later—External
MORE 2.0 and later—External

MORE displays one screen of information from the standard input device, pauses, and then displays the message -More-. When you press any key, MORE displays the next screen of information. MORE is one of the filter programs that MS-DOS provides and normally is used with input redirection or pipes from the command line.

Syntax

MORE  <  pathname

or

command  |  MORE

Parameters and Switches

< pathnameIndicates the name of a file that you want MORE to display one page at a time on your screen. All the normal defaults for drives and subdirectories apply. Wildcards are not allowed.
command |Pipes the screen output from a command into the MORE program, which displays it one screen at a time. command can be any legal DOS command that writes its output to the standard output device (normally the screen).

Rules

  1. MORE displays one screen of information on a standard screen.

  2. After displaying a screen of information, MORE waits for a keystroke before filling the screen with new information. This process repeats until all output has been displayed.

  3. MORE is useful with input and output redirection and piping.

Notes

  1. MORE is a DOS filter that enables you to display information without manually pausing the screen.

  2. MORE, when used with redirection or piping, is similar to the TYPE command, but MORE pauses after each screen of information.

  3. MORE intelligently handles two aspects of displaying text. The command pauses after displaying a screenful of lines, as you define by using the MODE command. The command also wraps lines that are longer than the width of your screen and reduces the number of lines that appear so that unread lines do not scroll off the screen.

See Also

FIND and SORT

The MORE Filter” in Chapter 13

MOVE 6.0 and later—External

MOVE 6.0 and later—External
MOVE 6.0 and later—External

You can use MOVE to move a file or group of files from one location to another or to rename subdirectories.

Syntax

To move a file or group of files, use the following format:

MOVE  source, source, ...  destination  /Y  /-Y

To rename a subdirectory, use the following format:

MOVE  old_dirname  new_dirname

Parameters and Switches

sourceSpecifies the file or files that you want to move. You can specify a full pathname—that is, drive:path...filename.ext)—and wildcards are allowed. You can enter additional source parameters by separating them with commas. This parameter is required and must include a filename (*.* is not assumed).
destinationSpecifies the location to which you want to move the source file(s). Normally, just a drive and/or path is included, although you can enter a destination filename (to rename it) if you are moving only one file. If you omit parts of this parameter, DOS assumes the current drive and subdirectory as necessary.
old_dirnameIndicates the name of the subdirectory that you want to rename. You can include a disk drive and subdirectory path if you want. If old_dirname refers to a file, DOS moves the file instead.
new_dirnameIndicates the new name that you want to give the old_dirname subdirectory. If new_dirname isn't in the current directory, you must specify the same drive and/or path you specified with old_dirname; otherwise, DOS thinks you are trying to move the subdirectory, which isn't allowed.
Parameters and Switches /YSpecifies that you want MOVE to overwrite files without prompting you for confirmation. Including this parameter overrides any setting specified with the COPYCMD environment variable.
Parameters and Switches /-YSpecifies that you want MOVE to prompt you for confirmation before overwriting any files, even if the command is run from within a batch file. Including this parameter overrides any setting specified with the COPYCMD environment variable.

Exit Codes

ERRORLEVEL ValueMeaning
0Files were moved successfully.
1Files weren't moved due to errors or user abort.

Notes

  1. Notes

    Starting with DOS 6.2, the MOVE command, when run from the command line, prompts you for confirmation before overwriting files. However, to avoid forcing you to rewrite all of your batch files, when you run MOVE from a batch file, it does not prompt you before overwriting a file.

    If you don't like MOVE's new behavior, you can change it by defining an environment variable named COPYCMD. Setting COPYCMD equal to /Y forces MOVE to act as it did in all previous versions of DOS, never prompting for confirmation before overwriting a file. If you set COPYCMD equal to /-Y, MOVE always prompts for confirmation, even when it's run from within a batch file.

  2. If you move a file to a directory that already includes a file with that name, DOS overwrites the file in the destination directory without warning.

  3. You cannot rename a directory that you are moving to a different disk or to a different relative position on a disk. The drive and path in front of both old_dirname and new_dirname have to be the same.

  4. If the destination directory does not exist, DOS can create it automatically.

  5. If you specify several files to be moved and a filename rather than a directory as the destination, DOS displays the message Cannot move multiple files to a single file.

  6. If a MOVE operation is successful, DOS returns an ERRORLEVEL of 0. If an error occurs, DOS returns a value of 1.

Examples

To move the file README.TXT in the current directory and the file C:BINSETUP.EXE to the directory C:TEMP (the files are not renamed), enter the following:

MOVE  README.TXT, C:BINSETUP.EXE  C:TEMP

To change the name of the file README.TXT in the current directory to README.1ST, enter the following:

MOVE  README.TXT  README.1ST

To move and rename C:INFOREADME.TXT to C:TEMPREADME.BAK, enter the following:

MOVE  C:INFOREADME.TXT  C:TEMPREADME.BAK

To change the name of the directory C:BIN to C:OLDBIN, enter the following:

MOVE  C:BIN  C:OLDBIN

See Also

COPY, REN or RENAME, and XCOPY

“Using the MOVE Command” in Chapter 8

MSAV 6.0 and later—External

MSAV 6.0 and later—External
MSAV 6.0 and later—External
MSAV 6.0 and later—External

Microsoft Anti-Virus (MSAV) is a full-screen program that can help you to detect and clean any computer viruses found in your system. You can adapt it to be run from a batch file, so you can automate routine scans of your system or floppy disk drives.

Syntax

To interact with MSAV's full-screen interface, use the following format:

MSAV  /R  /video  /mouse

To immediately start scanning one or more disks, directories, and/or files using MSAV's full-screen interface to show progress, use the following format:

MSAV  pathname  drive: ...  /S  /C  /R  /A  /L  /video  /mouse

To immediately start scanning one or more disks, directories, and/or files using a command-line interface to show progress, include the /N or the /P switch as follows:

MSAV  pathname  drive: ...  /S  /C  /R  /A  /L  /N  /P  /F  /video  /mouse

To get online help for MSAV's video and mouse options, use the following format:

MSAV  /VIDEO

Parameters and Switches

pathnameSpecifies the drive, subdirectory, or file to limit the virus scan to. All normal drive and subdirectory defaults apply. If you specify a subdirectory, Anti-Virus also scans all subdirectories below the one specified. Do not specify additional drives when you are specifying a pathname as the scan target.
drive: ...Specifies one or more drives that you want MSAV to scan.
/SSpecifies that you want to scan for viruses but not remove any that are found. This is the default setting. Using this switch causes MSAV to start scanning immediately.
/CSpecifies that you want MSAV to remove (clean) any viruses it finds. Using this switch causes MSAV to start scanning immediately.
/RSpecifies that MSAV should record the results of each scan in a file (MSAV.RPT) that is created in the root directory of each drive scanned.
/ACauses MSAV to scan all your drives, including network and CD-ROM drives, but not floppy disk drives. If you have a CD-ROM drive or are connected to a network, you should probably avoid this switch.
/LCauses MSAV to scan all your local drives, including any floppy disk drives, but not network and CD-ROM drives.
/NSpecifies that MSAV should not display anything at all while it's working. It displays the contents of the MSAV.TXT file if it exists in the same subdirectory as MSAV.EXE (normally C:DOS). If a virus is found, an exit code of 86 is returned instead of a warning message. When the specified scanning operation is completed, MSAV terminates automatically, making it suitable for use in a batch file. You cannot specify both the /P and /N switches.
/PActivates MSAV's command-line interface instead of the full-screen interface it normally uses. When the specified scanning operation is completed, MSAV terminates automatically, making it suitable for use in a batch file. You cannot specify both the /P and /N switches.
/FSpecifies that you do not want MSAV to display a list of the files it's scanning. You can use this switch only with the /N or /P switch.
/videoMSAV provides quite a few video-related options. Legal values for video are listed in the following table:
 videoDescription
25Sets the display to 25 lines (the default)
28Sets the display to 28 lines (VGA only)
43Sets the display to 43 lines (EGA and VGA)
50Sets the display to 50 lines (VGA only)
60Sets the display to 60 lines (Video 7 video adapters only)
INForces the display to use color
BWForces the display to use shades of gray
MONOForces the display to use black and white only (monochrome)
LCDForces the display to use a liquid-crystal display (LCD) color scheme
FFUses the fastest screen updating for CGA (may cause “snow”)
BFUses your computer's BIOS fonts (use only if the default graphics characters in the full-screen display are not displayed properly)
NFNo fonts (no graphics characters should be used in the full-screen display)
BTAllows the use of a graphics mouse in Microsoft Windows and graphics fonts in DESQview and UltraVision
/mouseMSAV provides three mouse-related options. Legal values for mouse are listed in the following table:
 mouseDescription
NGMNo graphics mouse; uses the default mouse character rather than a graphics cursor in the full-screen display
LESwitches the left and right mouse buttons
PS2Resets the mouse if the cursor disappears or freezes
/VIDEOSpecifying this option alone on the command line requests MSAV to display a list of the available video and mouse options.

Exit Codes

When you run MSAV with the /N switch, it generates the following exit codes, which can be read by the IF ERRORLEVEL command in a batch file.

ERRORLEVEL ValueMeaning
0No viruses were detected.
86One or more viruses were found.

Notes

  1. Different options are available from the full-screen display and from the command line.

  2. The options you choose while in full-screen mode are recorded in the file MSAV.INI.

See Also

MWAV and VSAFE

Understanding Computer Viruses” in Chapter 9

MSBACKUP 6.0 and later—External

MSBACKUP 6.0 and later—External

Microsoft Backup (MSBACKUP) is a full-screen program that can back up the contents of your hard disk to a series of floppy disks (or another DOS-accessible drive). You can define setup files that record your preferences and enable you to quickly perform different backup chores. No matter how careful you are, you should periodically back up the contents of your hard disk.

Syntax

MSBACKUP  setupfile  /BW  /LCD  /MDA

Parameters and Switches

setupfileSpecifies the file that holds your saved settings, the names of the files to be backed up, and the type of backup you want. This file must have an .SET extension. The default is DEFAULT.SET. DOS searches for this file in the subdirectory pointed to by the MSDOSDATA environment variable if you do not specify drive or subdirectory information in the pathname.
/BWSpecifies that MSBACKUP should use colors appropriate for a black-and-white display.
/LCDSpecifies that MSBACKUP should use colors appropriate for a liquid-crystal display.
/MDASpecifies that MSBACKUP should use colors appropriate for a monochrome display adapter.

Rules

  1. You do not explicitly create a setup file. MSBACKUP creates a setup file (or updates it, if you specified one in the MSBACKUP command line) when you save your program settings and file selections.

  2. You cannot start MSBACKUP from a floppy disk. This utility and its other program files must be on your hard disk.

  3. When looking for its configuration information, backup sets, and catalogs, MSBACKUP first looks in the directory specified by the MSDOSDATA environment variable, then in the directory from which it was started, and then in the current directory. You can use MSDOSDATA to point to your own configuration if you share MSBACKUP with other people.

  4. DOS 6.0 includes a Microsoft Windows version of MSBACKUP.

Notes

  1. When it performs a backup, MSBACKUP creates a catalog file that contains information about the files that it backs up. When you need to restore a file, you can search the catalog files to determine which one contains the files you want.

    Catalog files encode information in their names. Decoding CD10401A.FUL, for example, yields the following characters:

    CharacterMeaning
    CThe first drive backed up in this set.
    DThe last drive backed up in this set. (Had C been the only drive, the catalog file's name would have been CC10401A.FUL.)
    3The last digit of the year of the backup (here, 2001).
    04The month of the backup (here, April).
    01The day of the backup (here, the first).
    AThe ID of the backup on that day. If more than one backup of the same drive(s) is performed on the same day and the Keep Old Backup Catalogs options is set, MSBACKUP assigns a letter, from A through Z, to indicate the order in which the otherwise identically named catalog files were created. A is the first, B is the second, and so on. If the Keep Old Backup Catalogs option is not set, the ID alternates between A and B.
    FULThe backup type (here, FULL). The other possibilities are INC (incremental) and DIF (differential).
  2. When you perform a full backup, MSBACKUP creates a master catalog file, which keeps track of all the backup catalogs that are made during a backup cycle. When you need to restore a file, loading the master catalog automatically merges all the catalogs of the backup cycle, so you can select the latest version of a file easily (although you can choose to restore an earlier version).

    MSBACKUP puts 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.

  3. If DOS displays the message Insufficient memory while you are using MSBACKUP, follow these steps:

    1. Make sure that your computer has at least 512KB of conventional memory.

    2. Quit MSBACKUP, remove all memory-resident programs (TSRs) from memory, and try again.

    3. In MSBACKUP, turn off the Compress Backup Data option (in the Disk Backup Options dialog box).

See Also

MWBACKUP

Understanding Microsoft Backup” in Chapter 9

MSCDEX 6.0 and later—External

MSCDEX 6.0 and later—External
MSCDEX 6.0 and later—External
MSCDEX 6.0 and later—External

MSCDEX provides DOS access to CD-ROM drives. CD-ROM drives usually have their own device drivers, but these drivers aren't directly accessible to DOS. MSCDEX uses the network redirector interface to assign a drive letter to a CD-ROM drive. To be able to use MSCDEX, you must have one or more drive letters available and often have to include the LASTDRIVE= command in your CONFIG.SYS file to set them aside.

Syntax

MSCDEX  /D:driversig ...  /E  /K  /S  /V  /L:letter  /M:number

Parameters and Switches

/D:driversig ...For each CD-ROM drive to which you want to assign a drive letter, you need to specify the driver signature (driversig) that you assigned to its device driver with the /D switch when you loaded it in your CONFIG.SYS file. You must specify at least one driver signature.
/EEnables the CD-ROM driver to use available expanded memory to store its sector buffers, thus conserving conventional memory for application programs.
/KEnables recognition of Kanji (Japanese) CD-ROM labels. Normally, MSCDEX cannot recognize Japanese CD-ROM disks.
/SEnables sharing of CD-ROM drives on an MS-NET or Windows for Workgroups network server.
/VDisplays memory statistics when MSCDEX starts (Verbose).
/L:letterSpecifies the drive letter to be assigned to the first CD-ROM. Additional CD-ROMs are assigned letters in sequence. These drive letters must be available for use. The default is to use the next available drive letter(s).
/M:numberSpecifies the number of sector buffers MSCDEX should use to buffer CD-ROM reads. More buffers can increase the speed of your CD-ROM drive, but they also use more memory. You can put these buffers in expanded memory by using the /E switch.

Notes

  1. Your CD-ROM's device driver must be loaded by your CONFIG.SYS file. It should in clude a /D parameter to assign a driver signature (also called a driver name) to the driver.

  2. Your CONFIG.SYS file must include a LASTDRIVE command that provides enough device letters for your network, SUBST, and MSCDEX needs.

  3. MSCDEX can be invoked by your AUTOEXEC.BAT file or from the DOS command line.

  4. You need to invoke MSCDEX before you start Microsoft Windows.

Examples

Following is a typical CONFIG.SYS line that loads a device driver to access a CD-ROM drive. Notice that the driver signature is assigned with the /D switch:

DEVICE=C:DEVICESCDROMDRV.SYS  /D:MSCD000

The following line would most likely be included in your AUTOEXEC.BAT file and would enable the MSCD000 CD-ROM drive as drive E:

C:DOSMSCDEX  /D:MSCD000  /L:E

See Also

LASTDRIVE=

MSD 6.0 and later—External

MSD 6.0 and later—External
MSD 6.0 and later—External
MSD 6.0 and later—External

MSD, which stands for Microsoft System Diagnostics, is a handy tool for checking what is going on in a computer system. Via certain command-line options, you can instruct MSD to generate text files that record the state of your computer. These reports can be very useful when you are troubleshooting.

Syntax

To use MSD interactively with a full-screen display, use the following format:

MSD  /B  /I

To use MSD to generate a report to a file, use the following format:

MSD  /I  /Fpathname  /Ppathname  /Spathname

Parameters and Switches

/BForces the display to black and white for monochrome or LCD displays.
/IPrevents MSD from detecting hardware when it starts. Use this switch if MSD does not start or run properly on your computer.
/FpathnameSpecifies that you want a full report generated. MSD prompts you for certain information (your name, company, address, country, telephone number, and comments) and then incorporates that information into a report that it writes to the specified file. You can specify a full pathname with drive and/or path information, but wildcards are not allowed. If you do not include pathname, MSD writes the report to the screen.
/PpathnameSpecifies that you want a partial report generated. A partial report contains all the detailed system information but none of the identifying information that /F prompts you for. You can specify a full pathname with drive and/or path information, but wildcards are not allowed. If you do not include pathname, MSD writes the report to the screen.
/SpathnameSpecifies that you want a summary report generated. A summary report provides a shorter listing that highlights the key features of your computer's configuration. You can specify a full pathname with drive and/or path information, but wildcards are not allowed. If you do not include pathname, MSD writes the report to the screen.

Notes

MSD provides information about your computer (for example, its manufacturer, bus type, and ROM BIOS manufacturer) and about its upper memory use, video display, network, operating system, mouse, other adapters, disk drives, LPT ports, COM ports, IRQ stations, TSR programs, and device drivers. This information can be valuable when you are correcting problems or installing new hardware.

See Also

MEM

MSHERC 5.0—External

MSHERC 5.0—External
MSHERC 5.0—External
MSHERC 5.0—External
MSHERC 5.0—External

Because the Hercules Monochrome Graphics Adapter had no support built into the ROM BIOS of the computer, to use the display, programmers had to write their own drivers. The MSHERC program, when run, installs itself in memory and provides BIOS-like services for a Hercules Graphics Adapter. Certain QBasic programs require the use of this program to run. If you do not use a Hercules Graphics Adapter, you will have no use for this command. MSHERC is not distributed in the standard DOS 6 package but is available on the DOS 6 Supplemental Disk.

Syntax

MSHERC  /HALF

Parameters and Switches

/HALFSpecifying this parameter enables you to use a Hercules Graphics Adapter and a Color Graphics Adapter (CGA) in the same system. It limits the driver to using only the memory on the Hercules card, which does not conflict with standard CGA memory space.

Notes

Hercules has stopped making these graphics cards for sale. If you need to set up a two- monitor system and need both monitors to be graphics capable, look into setting up two VGA monitors or a VGA monitor with an 8514 display.

MWAV 6.0 and later—Windows

MWAV 6.0 and later—Windows

Microsoft Anti-Virus for Windows (MWAV) is a Windows program that can help you to detect and clean any computer viruses found in your system. This program is the Windows counterpart 0201620 to the MSAV program.

You cannot run MWAV from the DOS command line; you need to start it from within Windows, for example, by opening Program Manager's File menu and choosing the Run command. For instruction on using the program, run MWAV and press F1, or choose Help from the menu.

MWAV keeps its settings information in a separate file from MSAV, so the settings you make in one program are not honored in the other program. MWAV stores its settings in the MWAV.INI file, which it creates in the main Windows directory. MSAV stores its settings in the MSAV.INI file, which it creates in either the subdirectory that contains MSAV.EXE or the one pointed to by the MSDOSDATA environment variable.

See Also

MSAV, MWAVTSR, and VSAFE

Using the Windows Version of Microsoft Anti-Virus” in Chapter 9

MWAVTSR 6.0 and later—Windows

MWAVTSR 6.0 and later—Windows

When Windows is running, VSAFE cannot display its messages when a forbidden system activity arises. MWAVTSR provides a channel through which VSAFE can contact you if it needs your attention while Windows is running. If you are using both Windows and VSAFE, you should add MWAVTSR to your startup group or include it in the LOAD= line in WIN.INI so that it starts up automatically every time you start Windows.

You cannot run MWAVTSR from the DOS command line; you need to start it from within Windows, for example, by opening the Program Manager's File menu and choosing the Run command.

See Also

MSAV, MWAV, and VSAFE

Guarding Against Infection” in Chapter 9

MWBACKUP 6.0 and later—Windows

MWBACKUP 6.0 and later—Windows

Microsoft Backup for Windows (MWBACKUP) is a Windows program that can back up the contents of your hard disk to a series of floppy disks (or another DOS-accessible drive). You can define setup files that record your preferences and enable you to quickly perform different backup chores. No matter how careful you are, you should periodically back up the contents of your hard disk. This program is the Windows counterpart to the MSBACKUP program.

You cannot run MWBACKUP from the DOS command line; you need to start it from within Windows, for example, by opening Program Manager's File menu and choosing the Run command. For instruction on using the program, run MWBACKUP and press F1 or choose Help from the menu.

MWBACKUP keeps its settings information in a separate file from MSBACKUP, so the settings you make in one program are not honored in the other program. MWBACKUP stores its settings in the MWBACKUP.INI file, which it creates in the main Windows directory. MSBACKUP stores its settings in the MSBACKUP.INI file, which it creates in either the subdirectory that contains MSBACKUP.EXE or the one pointed to by the MSDOSDATA environment variable.

MWBACKUP and MSBACKUP can share catalog files and backup set files. If the MSDOSDATA environment variable is defined, both programs look for these files in the subdirectory it points to. If MSDOSDATA is not defined, they create and look for these files in the subdirectory where the corresponding executable file is located.

See Also

MSBACKUP

Understanding Microsoft Backup” in Chapter 9

MWUNDEL 6.0 and later—Windows

MWUNDEL 6.0 and later—Windows

Microsoft Undelete for Windows (MWUNDEL) is a Windows program that enables you to recover files that you have deleted accidentally. This program is the Windows counterpart to the UNDELETE program. If you are running Windows, you should use this program in preference to the DOS version. You can control various aspects of the “tracking” and “sentry” options of UNDELETE from within Windows by using MWUNDEL, but the resident portions of UNDELETE need to be loaded into memory before you start Windows.

You cannot run MWUNDEL from the DOS command line; you need to start it from within Windows, for example, by opening Program Manager's File menu and then choosing the Run command. For instruction on using the program, run MWUNDEL and press F1 or choose Help from the menu.

MWUNDEL shares its settings file with UNDELETE. Both programs look for the UNDELETE.INI file in the subdirectory pointed to by the MSDOSDATA environment variable. If MSDOSDATA is not defined, they create and look for UNDELETE.INI in the subdirectory where their executable files are located, which is C:DOS by default.

NLSFUNC 3.3 and later—External

NLSFUNC 3.3 and later—External
NLSFUNC 3.3 and later—External
NLSFUNC 3.3 and later—External
NLSFUNC 3.3 and later—External

NLSFUNC is a resident program that provides support for code page switching on your computer. If you use code pages, you usually have to load NLSFUNC. You can load NLSFUNC from your CONFIG.SYS file by adding the INSTALL= command. Do not attempt to load NLSFUNC if Windows is running on your computer.

Syntax

NLSFUNC  drive:pathCOUNTRY.SYS

Parameters and Switches

drive:pathCOUNTRY.SYSThe name and location of the country information file you want to use. It normally is COUNTRY.SYS, which Setup places in the C:DOS subdirectory by default. You don't have to include this parameter if you have included the full pathname of the country file in the COUNTRY= command in your CONFIG.SYS file. If you don't specify this parameter, either here or in the COUNTRY= command, DOS searches for COUNTRY.SYS in the root directory of the startup drive.

Notes

  1. If you provide a drive or pathname, you also must provide the name of the information file (usually COUNTRY.SYS).

  2. If you omit the full filename, DOS searches for the file COUNTRY.SYS in the root directory of the current disk.

  3. After NLSFUNC is loaded, it remains active until you restart DOS.

  4. You can load NLSFUNC into upper memory by using the LOADHIGH command if you have upper memory available on your computer.

  5. You can load NLSFUNC from your CONFIG.SYS file by adding the INSTALL= command. If you use INSTALL=, remember that you must include the full pathname (with the extension) of the NLSFUNC.EXE file on your system. Setup places the NLSFUNC.EXE file in the C:DOS subdirectory by default.

See Also

CHCP, COUNTRY=, DISPLAY.SYS, KEYB, MODE device CP, and PRINTER.SYS

Chapter 14, “Understanding the International Features of DOS”

NUMLOCK= 6.0 and later—Internal

NUMLOCK= 6.0 and later—Internal

NUMLOCK= was introduced with DOS 6. It enables you to choose the state of the NumLock key (ON or OFF) when the system starts up. If your computer toggles the NumLock key the “wrong” way when you reboot, the NUMLOCK= command is just what you need. NUMLOCK= can be used only in your CONFIG.SYS file.

Syntax

To have NumLock turned on (numbers on the keypad active) when you reboot your computer, include the following line in your CONFIG.SYS file:

NUMLOCK=ON

To have NumLock turned off (cursor keys on the keypad active) when you reboot your computer, include the following line in your CONFIG.SYS file:

NUMLOCK=OFF

Notes

  1. Although you may read information to the contrary, you can use NUMLOCK= anywhere in your CONFIG.SYS file. You don't have to set up menus in CONFIG.SYS to use the NUMLOCK= command. In its documentation, Microsoft erroneously implied that NUMLOCK= could be used only in a menu block, and this mistake has been duplicated in virtually every description of this command since then.

  2. The CMOS Setup program in certain computers has a setting for controlling the state of NumLock as well. If your computer has such a setting, you can either use it to set NumLock or use the NUMLOCK= command. If the settings disagree, no harm is done, but the setting in CONFIG.SYS overrides the CMOS Setup because it is executed after the ROM BIOS startup routines are complete.

  3. If you are using an older computer, you might find that using the NUMLOCK= command causes the NumLock light on your keyboard to get out of sync with the state the key is in. In the design of the original IBM PC, there was no way for the computer to tell the keyboard to toggle the lights. IBM fixed this problem when it introduced the enhanced 101-key keyboard with the IBM AT. If your computer still uses the old-style interface, however, you might have to either ignore the light or avoid using the NUMLOCK= command.

Examples

If your computer normally sets the NumLock key on at startup, and you want it turned off, include the following line anywhere in your CONFIG.SYS file:

NUMLOCK=OFF

If you want DOS to ask you whether to turn off the NumLock key at startup, insert a ? into the NUMLOCK= command, like this:

NUMLOCK?=OFF

When DOS processes your CONFIG.SYS file, it prompts you with NUMLOCK=OFF [Y,N]? before executing the NUMLOCK= command. Type Y to turn off the NumLock key or N to leave it on.

NWCACHE

NWCACHE

NWCACHE is a disk-caching program to speed up disk performance. The syntax and parameters are different depending on whether you are initially loading the cache program or it is already started.

Syntax for Loading NWCACHE

NWCACHE MaxSize MinSize drive: +|- MaxSize MinSize /L /X=address /E /ML /MU
/MLX /MUX /BL,/BU,/BE=size /LEND=ON|OFF /DELAY=ON|OFF|time /W=size /CHECK /A20

Parameters for Loading NWCACHE

MaxSizeSpecifies a maximum amount of memory in kilobytes to use for the cache—up to 7,670KB.
MinSizeSpecifies a minimum amount of memory in kilobytes to use for the cache.
drive:Enables write-through cache for the drive.
drive:+Enables write-delay cache for the drive.
drive:-Disables caching of the drive.
/LUses conventional memory for the cache.
/X=addressUses extended memory for the cache. If EMM386.EXE is not loaded, you need to specify the address for the cache in kilobytes.
/EUses expanded memory (EMS) for the cache.
/ML,/MU,/MLX,/MUX

Loads NWCACHE into one of the following:

/MLConventional memory

/MUUpper memory

/MLXConventional and XMS memory using DPMS

/MUXUpper and XMS memory using DPMS

/BL,/BU,/BE=size

Specifies a lookahead buffer memory type and size from 4KB to 16KB:

/BLUses conventional memory

/BUUses upper memory

/BEUses EMS memory

/LEND=ON|OFFEnables or disables lending extended or EMS cache memory to other applications.
/DELAY=ON|OFF|timeEnables write delay (ON) or disables it (OFF). time is a value from 50 to 5,000 milliseconds that writes are collected in the cache before being written to disk.
/W=sizeSets delayed write data limit in kilobytes.
/CHECKVerifies that memory is performing correctly at startup time of the cache program.
/A20If an XMS memory manager is not loaded and you are having compatibility problems, you might need to use this setting to suppress enhanced line A20 handling.

Syntax for NWCACHE After It Is Loaded

NWCACHE +|-  drive:+|- /SIZE=MIN|MAX /DELAY=ON|OFF|time /S /U /?

Parameters for NWCACHE After It Is Loaded

+|-Flushes and reenables or disables caching for all drives.
drive:Reenables write-through cache for the drive.
drive:+|-Reenables (+) write delay cache for the drive or disables the cache (-).
/SIZE=MIN|MAXCompletes writing anything in the cache if write delay is enabled, clears everything from the cache, and either resets the cache to the minimum allowable size or resets it to the maximum size if enough memory is available.
/DELAY=ON|OFF|timeEnables write delay (ON) or disables it (OFF). time is a value from 50 to 5,000 milliseconds that writes are collected in cache before being written to disk.
/SShows cache status.
/Q or /UTerminates and unloads the cache.
/?Displays abbreviated help.

NWCDEX

NWCDEX

You can use NWCDEX to enable access to CD-ROM drives.

Syntax

NWCDEX /D:filename /E /K /N /V /F:handles /L:letter /M:buffers /?

Parameters and Switches

/D:filenameSpecifies the filename for the CD-ROM driver.
/EUses expanded memory if DPMS is not available.
/KEnables recognition of Kanji (Japanese) CD-ROM labels.
/NDisables use of DPMS memory.
/VPrints debug information during initialization.
/F:handlesSpecifies the number of file handles to allocate.
/L:letterSpecifies the drive letter to assign to the drive.
/M:buffersSpecifies the number of buffers to allocate.

Notes

CONFIG.SYS must contain a DEVICE or DEVICEHIGH statement to load the appropriate driver for the CD-ROM drive. The driver loaded here is the same one specified in the D:filename parameter.

See Also

Files, Buffers

PASSWD

PASSWD

You can use PASSWD to set a read/write and read-only password for Stacker drives.

Syntax

PASSWD drive: oldpassword newpassword /ro /?

Parameters and Switches

drive: Indicates the Stacker drive for which to set a password.
oldpassword Identifies the old password.
newpassword Identifies the new password.
/ro Changes the read-only password.
/? Displays the abbreviated online help.

Notes

The first time a password is assigned to a Stacker drive, it must be a read/write password.

PASSWORD

PASSWORD

PASSWORD assigns passwords to files or directories.

Syntax

PASSWORD d:pathfilespec... /R|W|D|P|G:password /N /S /H

Parameters and Switches

d:pathfilespec Specifies the drive, path, and filename (or file specification using wildcards) of the file (or files or directory) to be protected. More than one filename can be specified.
/R:password Sets a password for reading, writing, or deleting files.
/W:password Sets a password for writing or deleting files.
/D:password Sets a password required to delete files.
/P:password Sets a password for reading, writing, or deleting subdirectories.
/G:password Sets a global default password used by DR DOS to try to open any files you access. This setting is useful if you set the same password for many files.
/N Removes password protection from files.
/NP Removes password protection from directories.
/NG Removes a global default password.
/S Applies the specified password to files and subdirectories matching the filespec in the current directory.
/H Applies the specified password to hidden files and subdirectories matching the filespec in the current directory.

Notes

If you run the PASSWORD command with no parameters, it displays the password status for the files in the directory.

PATH 2.0 and later—Internal

PATH 2.0 and later—Internal
PATH 2.0 and later—Internal

The PATH command can be used to change or display the PATH environment variable. When DOS cannot find an executable program in the current directory, it searches through each directory listed in the PATH environment variable. Executable programs are files that end in .COM, .EXE, or .BAT, and DOS searches each directory on the search path, in that order, for each type. By specifying a PATH, you can save yourself from having to enter the full pathname for each command you want to execute. The Setup program for DOS 6 places a PATH command in your AUTOEXEC.BAT file that places the C:DOS subdirectory (or whatever install directory you specified) on your search path.

Syntax

To specify an executable file search path, use the following format:

PATH  path1;path2;path3;...

To display the current PATH, use the following format:

PATH

To clear the current PATH, use the following format:

PATH ;

Parameters and Switches

path1;path2;path3;... Each path listed must specify a valid subdirectory that exists on your system. The current subdirectory often changes, so it is a good idea to use full, absolute pathnames—including drive letters—for each subdirectory included in your PATH statement. Separate each subdirectory from the previous one by adding a semicolon (;).

Notes

  1. If you specify more than one set of paths, the following rules apply:

    • The path sets must be separated by semicolons.

    • The order in which you list the path sets is the order DOS looks for the programs or batch files. First, DOS searches the current directory; then DOS searches the first path specified, then the second path specified, and so on, until the command or batch file is found.

  2. The maximum length of PATH is 127 characters. This is one of the most compelling reasons to use short subdirectory names whenever you can.

  3. The PATH command establishes the value of an environment variable named PATH. You can view, set, or delete the PATH by using the SET command, as well as the PATH command. The PATH command is simply shorthand for SET PATH=.

  4. When you type the name of a program or batch file, DOS searches the current directory. If the program or batch file is not found, DOS searches each path in sequence. If the program or batch file is not found in any of the paths, DOS displays the error message Bad command or filename.

  5. You can shorten PATH by using the SUBST command to substitute drive letters for deeply nested paths. Another technique is to remove a path that is included only to start one program. Then, you can make a batch file that uses CD to change directory to that path and invokes the program, and place the batch file in a directory that is still included in PATH.

Messages

Invalid drive in search path

Warning: You specified a nonexistent drive name in one of the paths. This message appears when DOS searches for a program or batch file, not when you give the PATH command.

Use PATH or SET to see the current path. If the drive temporarily is invalid because of a JOIN or SUBST command, you can ignore this message. If you specified the wrong disk drive, issue the PATH command again and provide the complete set of directory paths that you want to use.

PAUSE 1.0 and later—Internal

PAUSE 1.0 and later—Internal

The PAUSE command displays a Press any key to continue... message and waits for the user before continuing to execute the batch file. This command is useful if you want the user to be able to abort a batch file, using Ctrl+C or Ctrl+Break, before some action is taken. You also can use PAUSE to give the user time to read a screen of messages displayed with the ECHO command.

Syntax

PAUSE

Notes

  1. The PAUSE command simply displays the Press any key to continue... message when it is executed. The next key you press (except Ctrl+C or Ctrl+Break; see Note #2) releases the pause, and execution of the batch file continues.

  2. Pressing Ctrl+C or Ctrl+Break in response to the Press any key to continue... message displays the Terminate batch job (Y/N)? message. Pressing Y aborts the batch file, returning you to the DOS prompt. Pressing N skips the line that was executing and continues with the next line in the batch file.

  3. If you are running the batch file from within a Shell program, such as DOS Shell, the Terminate batch job (Y/N)? message is not displayed. When you press Ctrl+C or Ctrl+Break in these circumstances, the batch file is always aborted.

  4. If you want to wait for a keypress but don't want PAUSE to display the Press any key to continue... message, you can redirect the output of the PAUSE command to the NUL device. DOS still waits for a keypress, but no message is displayed.

  5. The CHOICE command included with DOS 6 gives you much more flexibility in choosing allowable keys and making decisions than PAUSE. If you are using DOS 6, consider using CHOICE instead of PAUSE in your batch files.

Examples

One very common use for PAUSE is to give the user time to do something. For example, if you want to make certain that a floppy disk had been placed in drive B, you might include the following lines in a batch file:

ECHO Insert the Working Backup disk in drive B:
ECHO.
ECHO Press Ctrl+Break to abort the backup, or
PAUSE

When these commands are executed, the following messages are displayed:

Insert the Working Backup disk in drive B:

Press Ctrl+Break to abort the backup, or
Press any key to continue...

Note that the PAUSE message is anticipated in the ECHO messages. If you redirect the output from PAUSE to the NUL device, you can control all the text displayed onscreen, as shown in the following:

ECHO  Insert the Working Backup disk in drive B:
ECHO.
ECHO  Press Ctrl+Break to abort the backup, or any
ECHO  other key to update the Working Backup disk.
PAUSE  >  NUL

When these commands are executed, the following messages are displayed:

Insert the Working Backup disk in drive B:

Press Ctrl+Break to abort the backup, or any
other key to update the Working Backup disk.

If you press Ctrl+C or Ctrl+Break at the pause, the following message is displayed (as long as you aren't running this batch file from within a Shell program):

Terminate batch job (Y/N)?

Type Y to abort the batch file; type N to continue with the next line.

Messages

Press any key to continue...

Prompt: PAUSE displays this message any time it is executed. DOS waits for a key to be pressed before continuing execution of the batch file. Entering Ctrl+C or Ctrl+Break when this message is displayed enables you to terminate the batch file rather than continuing.

Terminate Batch Job (Y/N)?

Prompt: When you press Ctrl+C or Ctrl+Break while a batch file is running, DOS displays this message. Typing Y aborts the batch file, returning you to the DOS prompt. Typing N skips the line that was executing and continues with the next line in the batch file. Note that if you run the batch file from within a Shell program, such as DOS Shell, this message isn't displayed, and the batch file is aborted.

See Also

CHOICE and ECHO

Pausing for Input in a Batch File” in Chapter 16

PCM

PCM

PCM enables the DOS version of the online PCMCIA configuration program shipped with PC DOS 7. You use this program to configure input/output (I/O) cards such as fax/modem, LAN, and other I/O cards.

Syntax

PCM

Notes

If you want to use the PCM command, the computer must be loaded with the version of PCMCIA support provided with PC DOS 7.

PCMATA.SYS

PCMATA.SYS

PCMATA.SYS enables the system to access ATA-configured PCMCIA cards as IDE hard drive devices using an IDE partition table. It acts as an I/O client to Card Services.

With the PCMCIA version shipped with PC DOS 7, PCMATA settings are recorded in the PCM.INI file. This file is editable.

PCMCS

PCMCS
PCMCS

PCMCS.EXE functions as an extension to the operating system. It must be loaded directly after Socket Services. It coordinates access to the PCMCIA cards and allocates system resources among client drivers. PCMCS runs as a driver loaded from CONFIG.SYS.

The parameters affecting the way PCMCS operates are added to the PCMCS= line in the PCM.INI file.

PCMDINST

PCMDINST

PCMDINST enables the PCMCIA support provided with PC DOS 7. The PCMDINST command initiates a program that backs up the current system PC DOS and Windows files as .PCM files. Common command-line statements for prior versions of PCMCIA are commented out of the current configuration files.

Syntax

PCMDINST

PCMFDISK

PCMFDISK
PCMFDISK

PCMFDISK, like the DOS FDISK utility, sets the partition table for ATA rotating disk and solid-state mass-storage PCMCIA cards. PCMFDISK is a full-screen interface available to PCMCIA users who have installed the PCMCIA version shipped with PC DOS 7.

Syntax

PCMFDISK

Notes

The PCMFDISK command should be used with extreme caution.

PCMRMAN (Standalone Utility)

PCMRMAN (Standalone Utility)
PCMRMAN (Standalone Utility)

The PCMCIA Resource Management Utility (PCMRMAN), which is a standalone utility, manages and displays the resources used by PCM Plus, such as memory, I/O addresses, and interrupts. It is full-screen interface available to PCMCIA users who have installed the PCMCIA version shipped with PC DOS 7.

Syntax

PCMRMAN

Notes

The PCMRMAN program should be used with extreme caution. When used improperly, it can adversely affect the way the computer operates with PCMCIA cards.

PCMRMAN (Command-Line Utility)

PCMRMAN (Command-Line Utility)
PCMRMAN (Command-Line Utility)

The PCMRMAN command-line utility temporarily changes the current runtime values for the allocation of some system resources. The changes take effect when they are invoked and last only for the duration of the current session.

Syntax

PCMRMAN /mem=xx-yy  /xmem=xx-yy  /io=xxxx-yyyy  /xio=xxxx-yyyy  /irq=x-y
/xirq=x-y /map /?

Parameters and Switches

/mem=xx-yy Permits PCM Plus to use the memory range xx00:0000 to yyFF:0000 in hexadecimal. The argument range is C0 to EF in hexadecimal.
/xmem=xx-yy Excludes PCM Plus from using the memory range xx00:0000 to yyFF:0000 in hexadecimal.
/io=xxxx-yyyy Permits PCM Plus to use the I/O range specified. Argument ranges must be between 100 and 3FF in hexadecimal.
/xio= xxxx-yyyy Excludes PCM Plus from using the I/O range specified. Argument ranges must be between 100 and 3FF in hexadecimal.
/irq=x-y Permits PCM Plus to use IRQ in the range x to y. The argument range is between 0 and F in hexadecimal (0 to 15 in decimal).
/xirq=x-y Excludes PCM Plus from using IRQ in the range x to y. The argument range is between 0 and F in hexadecimal (0 to 15 in decimal).
/map Displays a map of card services and system resources.
/? Displays the abbreviated online help.

Notes

The PCMRMAN command should be used with caution. When used improperly, it can adversely affect the way the computer operates with PCMCIA cards.

PCMSCD

PCMSCD

The Phoenix Super Client Driver, PCMSCD, is a Card Services client that increases the efficiency of resource acquisition by requesting system resources from Card Services, such as memory, I/O, and IRQ. When requested in this way, they appear to the system as resident for use by software.

Syntax

PCMSCD

Notes

PCMSCD must reside in the same directory as the active PCM.INI. PCMSCD reads its boot options as well as configuration information used to enable PCMCIA cards from PCM.INI.

PCMSETUP

PCMSETUP

PCMSETUP enables the online configuration part of Phoenix Card Manager Plus Version 3.01. This is the PCMCIA support supplied with PC DOS 7.

Syntax

PCMSETUP

POWER 6.0 and later—External

POWER 6.0 and later—External
POWER 6.0 and later—External

For laptop computers that conform to the Advanced Power Management (APM) specification, the POWER command enables you to control the trade-off between extended battery life and maximum performance from your computer. You also can use POWER to switch back and forth between the power-management system built into your laptop and the APM-style idle detection methods. Before you can run POWER from the command line, you must use a DEVICE= command to load the POWER.EXE device driver into memory from your CONFIG.SYS file.

Syntax

POWER  setting

Parameters and Switches

setting This value determines how aggressive you want the power-management features to be. setting can be one of the values listed in the following table. You can specify only one setting at a time. If no value is included for setting, POWER displays a short report on the current power settings in your computer. (See item #2 in the following “ Notes” section.)
 setting Value Description
ADV:MAX Enables the most aggressive power setting. Power savings can be as much as 25%, but performance may suffer.
ADV:REG Enables the default setting.
ADV:MIN Enables the most conservative power setting. You can use this setting when you are running programs that slow down too much when the ADV:REG setting is used.
ADV Performs the same as specifying ADV:REG.
STD Uses the computer's built-in power-management features for computers that conform to the APM specification. For computers that don't support the APM specification, this setting is the same as OFF.
OFF Disables the power-management features. You might want to use this setting (or STD) when you are running communications software.

Notes

  1. You must install the POWER.EXE device driver before you can run POWER from the command line. If you try to run POWER without installing the device driver, an error message appears. (See the following “Messages” section.)

  2. POWER.EXE is actually two files: a device driver and an executable program. The device driver portion does all the real work. You have to load it into memory by adding a DEVICE= command in your CONFIG.SYS file for the DOS power-management features to be enabled. After this device driver has been loaded into memory, the executable portion of POWER.EXE communicates with the device driver to adjust settings and display status information.

  3. If you enter the POWER command without specifying a new setting, you see a status report that summarizes the active settings and current power use in your system. On non–APM-compliant systems, POWER displays the following report:

    Power Management Status
    -----------------------
    Setting = ADV:REG
    CPU: idle 75% of the time
    

    If your system supports the APM specification, a more detailed report, like the following, is displayed:

    Power Management Status
    -----------------------
    Setting = ADV:REG
    CPU: idle 75% of time
    AC Line Status : OFFLINE
    Battery status : High
    Battery life (%) : 90
    

    The computer's ROM BIOS provides the additional information in this report. This information is not displayed on non–APM-compliant computers.

  4. When you are running communications software, CPU-intensive applications, or other applications that don't access your hard disk very often, you might want to turn off power-management features. With an ADV:MAX setting, POWER may think your computer was idle when it was actually busy handling serial communications or recalculating a large spreadsheet. To minimize the possibility of false idle-time detection but still keep power-management features active, use a setting of ADV:MIN. To disable APM features and regain maximum performance from your computer, use a setting of OFF or STD.

  5. POWER.EXE detects idle time with a variety of methods. It monitors hard disk activity, video functions, and MS-DOS service requests to determine whether your system is busy. In addition, POWER.EXE monitors the keyboard polling and application-idle interrupts to sense idle time in active programs. When idle time is detected, a CPU HALT instruction is executed, causing the CPU to sleep until the next hardware interrupt arrives. (The timer interrupt occurs 18.2 times per second, so the CPU sleeps for only 55 milliseconds or less.)

    If a busy program routinely polls the keyboard, such as communication programs often do, POWER.EXE may think your computer is idle when it isn't. False idle detection can interfere with a program's operation, unnecessarily slowing it down. The ADV:MAX, REG, and MIN settings control the level of keyboard polling detection that POWER.EXE uses. If you are having performance problems with an application, try turning down keyboard polling detection by using an ADV:REG setting or disabling it by using ADV:MIN.

  6. Even if your system doesn't support the APM specification, you still may get some benefit from POWER.EXE. Microsoft's testing indicates that, on the average, a 5% reduction in power consumption can be realized by using POWER.EXE on non–APM-compliant computers. Of course, the power-management features built into your laptop might surpass this savings, in which case you are better off not using POWER.EXE at all.

Examples

Assuming the POWER.EXE device driver has been loaded from your CONFIG.SYS file, entering the following command requests maximum power savings:

POWER  ADV:MAX

If you want to fax some work back to the office, you might want to turn down your power-management features to avoid interfering with your communications software. You could enter the following line:

POWER  ADV:MIN

Back in your hotel room, working on deadline, you want to disable the power-management system entirely so that you can get maximum performance out of your laptop computer. After all, you don't need to extend battery life when you are plugged into an AC outlet. In this case, just enter the following command:

POWER  OFF

Messages

Power Manager (POWER.EXE) not installed

Information: You have attempted to run the POWER program without first installing the POWER.EXE device driver. POWER can adjust the settings of the device driver in memory only, so you must load POWER.EXE by adding a DEVICE= command in your CONFIG.SYS file before you can use any of its features.

See Also

POWER.EXE

POWER.EXE (device driver) 6.0 and later— External

POWER.EXE (device driver) 6.0 and later— External
POWER.EXE (device driver) 6.0 and later— External

For laptop computers that conform to the Advanced Power Management (APM) specification, POWER.EXE enables you to control the trade-off between extended battery life and maximum performance from your computer. You must load POWER.EXE by adding a DEVICE= statement in your CONFIG.SYS file before you can use it from the command line.

Syntax

DEVICE=drive:pathPOWER.EXE  setting  /LOW

Parameters and Switches

drive:path The full path to the POWER.EXE file on your system. Setup places the POWER.EXE file in the C:DOS subdirectory by default. If the full path to POWER.EXE isn't specified, DOS looks for the file in the root directory of the startup drive.
setting This value determines how aggressive you want the power-management features to be. setting can be one of the values listed in the table below. You cannot specify more than one setting at a time. If no value is included, the ADV:REG setting is assumed.
 Value Description
ADV:MAX Enables the most aggressive power setting. Power savings can be as much as 25%, but performance may suffer.
ADV:REG Enables the default setting.
ADV:MIN Enables the most conservative power setting. You can use this setting when you are running programs that slow down too much when the ADV:REG setting is used.
ADV Performs the same as specifying ADV:REG.
STD Uses your computer's built-in power-management features for computers that conform to the APM specification. For computers that don't support the APM specification, this setting is the same as OFF.
OFF Disables the power-management features. You might want to use this setting (or STD) when you are running communications software.
/LOW Instructs POWER.EXE to load itself into conventional memory. Normally, POWER.EXE loads into upper memory if it is available.

Notes

  1. You must install the POWER.EXE device driver before you can run POWER from the command line. If you try to run POWER without installing the device driver, an error message appears. (See the following “Messages” section.)

  2. POWER.EXE is actually two files: a device driver and an executable program. The device driver portion does all the real work. You have to load it into memory by adding a DEVICE= command in your CONFIG.SYS file for the DOS power-management features to be enabled. After this device driver has been loaded into memory, the executable portion of POWER.EXE communicates with the device driver to adjust settings and display status information.

  3. POWER.EXE automatically loads into upper memory if it is available. You do not need to use the DEVICEHIGH= command with POWER.EXE.

  4. When you are running communications software, CPU-intensive applications, or other applications that don't access your hard disk very often, you might want to turn off the power-management features. With an ADV:MAX setting, POWER might think your computer was idle when it was actually busy handling serial communications or recalculating a large spreadsheet. To minimize the chance of false idle-time detection but keep power-management features active, use a setting of ADV:MIN. To disable APM features and regain maximum performance from your computer, use a setting of OFF or STD.

  5. POWER.EXE detects idle time with a variety of methods. It monitors hard disk activity, video functions, and MS-DOS service requests to determine whether your system is busy. In addition, POWER.EXE monitors the keyboard polling and application-idle interrupts to sense idle time in active programs. When idle time is detected, a CPU HALT instruction is executed, causing the CPU to sleep until the next hardware interrupt arrives. (The timer interrupt occurs 18.2 times per second, so the CPU sleeps for only 55 milliseconds or less.)

    If a busy program routinely polls the keyboard, as communications programs often do, POWER.EXE may think your computer is idle when it isn't. False idle detection can interfere with a program's operation, unnecessarily slowing it down. The ADV:MAX, REG, and MIN settings control the level of keyboard polling detection that POWER.EXE uses. If you are having performance problems with an application, try turning down keyboard polling detection by using an ADV:REG setting or disabling it by using ADV:MIN.

  6. Even if your system doesn't support the APM specification, you still may get some benefit from POWER.EXE. Microsoft's testing indicates that, on the average, a 5% reduction in power consumption can be realized by using POWER.EXE on non–APM-compliant computers. Of course, the power-management features built into your laptop might surpass this savings, in which case you are better off not using POWER.EXE at all.

  7. POWER.EXE is fully compatible with Windows. If you are running Windows 3.1 on a system with an APM-compliant ROM BIOS, you should select MS-DOS System with APM in Windows's Setup as the type of computer you are using. When you do so, Windows can cooperate and control the power-management features supplied by POWER.EXE. On non–APM-compliant computer systems, you can use POWER.EXE without selecting a special computer type.

Examples

To load the POWER.EXE device driver and enable the ADV:REG (default) level of power management, you could add the following line to your CONFIG.SYS file:

DEVICE=C:DOSPOWER.EXE

If you want to enable the maximum level of power management, specify the ADV:MAX setting instead of using the default, as shown in the following line:

DEVICE=C:DOSPOWER.EXE  ADV:MAX

As long as enough upper memory is available, POWER.EXE loads high without using the DEVICEHIGH= command. If you want to force it to load into conventional memory instead, add the /LOW parameter, as shown here:

DEVICE=C:DOSPOWER.EXE  /LOW

Messages

Power Manager (POWER.EXE) not installed

Information: You have attempted to run the POWER program without first installing the POWER.EXE device driver. POWER can adjust the settings of the device driver in memory only, so you must load POWER.EXE from your CONFIG.SYS file before you can use any of its features.

See Also

POWER

PRINT 2.0 and later—External

PRINT 2.0 and later—External
PRINT 2.0 and later—External
PRINT 2.0 and later—External

The PRINT command is a memory-resident utility that enables you to print files in the background on your computer. Unfortunately, PRINT is limited to printing text files; you can't use it as a general-purpose print spooler.

Syntax

To load PRINT into memory, use the following format:

PRINT  /D:device  /B:bufsiz  /M:maxticks  /Q:maxfiles  /S:timeslice
/U:busyticks  /T  textfile  /P  /C

To add or delete files in the queue, use the following format:

PRINT  /T  /P  /C  textfile1  /P  /C  textfile2  /P  /C ...

Parameters and Switches

When you first use the PRINT command after turning on or rebooting your computer, you can specify any of the following switches:

/B:bufsiz The size (in bytes) of the memory buffer to be used while the files are printing. bufsiz can be any number from 512 to 16,384. The default is 512 bytes. You don't have to increase this value unless you have a very fast printer.
/D:device The device to be used for printing. Legal values are PRN, LPT1, LPT2, LPT3, COM1, COM2, COM3, or COM4. The default is PRN. This parameter must precede any textfile included on the command line.
/M:maxticks The maximum amount of time (in clock ticks) that PRINT uses to send characters to the printer every time PRINT gets a turn. maxtick can be any number from 1 to 255. The default is 2.
/Q:maxfiles The number of files that can be held in the queue for printing. maxfiles can be any number from 4 to 32. The default is 10.
/S:timeslice The number of clock ticks allocated for PRINT. timeslice can be a number from 1 to 255. The default is 8. Increasing timeslice speeds printing and slows other tasks.
/U:busyticks The maximum amount of time (in clock ticks) PRINT should wait for a busy or unavailable printer before releasing its timeslice. PRINT tries again the next time it gets control. busytick can be any number from 1 to 255. The default is 1.

You can specify any of these switches whenever you use PRINT:

/C Cancels the background printing of files. (See item #3 in the following “Notes” section.)
/P Queues files for printing. (See item #3 in the following “Notes” section.)
/T Terminates the background printing of all files, including any file that currently is printing (clears the queue).

Rules

  1. If you do not provide a filename, DOS displays the background printing status.

  2. You can specify the switches /B, /D, /M, /Q, /S, and /U only when you first use PRINT. If you use the /D switch, you must type this switch first in the line. You can list the remaining five switches in any order before you specify a filename.

  3. The /D switch specifies the print device that you want to use (LPT1, LPT2, LPT3, COM1, COM2, COM3, or COM4). If you omit /D the first time you use PRINT, DOS displays the following prompt:

    Name of list device [PRN]:
    

    You can respond in either of two ways:

    • Press Enter to send the files to PRN (normally LPT1:). If LPT1: is redirected (refer to the MODE command entry earlier in this command reference), the files are rerouted.

    • Enter a valid DOS device name. Printing is directed to this device. If you enter a device that is not connected to your system, PRINT accepts files in the queue. The files are not processed, however, and you lose processing speed.

    After you choose the print device that you want PRINT to use, you cannot change it without restarting DOS.

  4. If you name a file with no switch, DOS assumes that you want to use the /P (print) switch.

  5. Files print in the order in which you list their names. If you use wildcards, files are printed in the order in which they are listed in the directory.

  6. The command PRINT /C has no effect if you do not specify a filename.

  7. The first time you invoke PRINT, DOS increases in size by approximately 5,500 bytes. When you increase or decrease certain default settings, you proportionally change the size of DOS. To regain this memory space, however, you must restart DOS.

  8. If you use PRINT to print files to a serial printer, you might need to configure the serial port by using the MODE COM# command.

  9. PRINT expands tab characters in the files it prints the same way the TYPE command does. Also, PRINT stops printing a file when it encounters an end-of-file marker (Ctrl+Z). For these two reasons, you should print only straight ASCII files with PRINT. Any other type of file is likely to be garbled by tab expansion and truncated when it encounters a Ctrl+Z character and terminates prematurely.

Notes

  1. The /B switch acts like a disk buffer. PRINT reads into memory a portion of the document to be printed. As you increase the value of bufsiz, you decrease the number of times PRINT must read the file from the disk, thereby increasing printing speed. Always use a multiple of 512 (1,024, 2,048, and so on) as the value of bufsiz. The default size (512 bytes) is adequate for most printers.

  2. When the default values are assumed, PRINT gets 22 percent of the computer's time.

  3. The positions of the /P, /C, and /T switches in the command line are important. Each switch affects the file immediately preceding it in the command line, and all subsequent files, until DOS encounters another switch. The following command, for example, uses the /P switch to place the files LETTER.TXT and PROGRAM.DOC in the queue to be printed. The /C switch cancels the background printing of MYFILE.TXT and TEST.DOC:

    PRINT  LETTER.TXT  /P  PROGRAM.DOC  MYFILE.TXT  /C TEST.DOC
    

    In this example, the /P switch affects the preceding file (LETTER.TXT) and the following file (PROGRAM.DOC). Similarly, the /C switch affects the preceding file (MYFILE.TXT) and the following file (TEXT.DOC).

  4. If you use the /T switch, background printing is canceled for all files in the queue, including the file that is currently printing, and any files listed in the command line.

  5. If a disk error occurs during background printing, DOS cancels the current print job and places a disk-error message on the printout. The printer then performs a form feed, the bell rings, and DOS prints all remaining files in the queue.

Messages

filename is currently being printed
filename is in queue

Information: This message tells you which file is printing and names the files that are in line to be printed. This message appears when you use PRINT with no parameters or when you queue additional files.

PRINT queue is empty

Information: No files are in line to be printed by PRINT.

PRINT queue is full

Warning: You attempted to place too many files in the PRINT queue. The request to add more files fails for each file past the limit. You must wait until PRINT processes a file before you can add another file to the queue.

Resident part of PRINT installed

Information: The first time you use PRINT, this message indicates that PRINT installed itself in DOS and increased the size of DOS by about 5,500 bytes.

See Also

MODE COM#

The PRINT Command” in Chapter 13

PRINTER.SYS (device driver) 3.3 to 5.0— External

PRINTER.SYS (device driver) 3.3 to 5.0— External
PRINTER.SYS (device driver) 3.3 to 5.0— External
PRINTER.SYS (device driver) 3.3 to 5.0— External
PRINTER.SYS (device driver) 3.3 to 5.0— External

The PRINTER.SYS device driver provides international code page support for certain IBM printers or close compatibles. When combined with the other international utilities DOS provides, PRINTER.SYS enables you to use various international character sets with your printer. You must load PRINTER.SYS by using a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file. Microsoft no longer distributes PRINTER.SYS with MS-DOS, but it is available on the MS-DOS 6 Supplemental Disk.

Syntax

DEVICE=drive:pathPRINTER.SYS  LPTx=(type,hard_cp,num_cp)

DEVICEHIGH=drive:pathPRINTER.SYS LPTx=(type,hard_cp,num_cp)

Parameters and Switches

drive:path The full path to the PRINTER.SYS file on your system. If the full path to PRINTER.SYS isn't specified, DOS looks for the file in the root directory of the startup drive. The PRINTER.SYS file is included on the MSDOS 6 Supplemental Disk.
LPTx= The printer port (LPT1=, LPT2=, or LPT3=) your printer is attached to. You can enter a colon between the port name and equal sign (for example, LPT1:=). This parameter is required.
type The type code for the printer being used. You must use a type code from the following table, and you must enclose the parameter in parentheses.
 type Code Printer
4201 IBM Proprinters II and III, Model 4201 IBM Proprinters II XL and III XL, Model 4202
4208 IBM Proprinter X24E, Model 4207 IBM Proprinter XL24E, Model 4208
5202 IBM Quietwriter III, Model 5202
hard_cp The hardware code page built into the printer. See Chapter 14, “Understanding the International Features of DOS,” for a list of the code pages that MS-DOS supports.
num_cp The number of software code pages you want to use with the printer. Valid entries for num_cp are 1 and 2.

Notes

  1. PRINTER.SYS no longer is distributed with MS-DOS, but it is available on the MS-DOS 6 Supplemental Disk. Three printer code page information files are included as well: 4201.CPI, 4208.CPI, and 5202.CPI. The MODE command requires these files when it is preparing to download code page information to your printer.

  2. When PRINTER.SYS is loaded, it uses about 11KB of memory.

  3. Although you can have up to three printers attached to your computer, PRINTER.SYS can support international code pages on only one of them at a time. To change to a different printer or printer port, you have to edit the DEVICE= line for PRINTER.SYS and reboot your computer.

  4. You should always specify a value for hard_cp. IBM printers often use a hardware code page of 850, but you should check your printer manual to be sure.

  5. Even if you don't own one of the printers listed in the table, your printer may be compatible with one of them. To find out whether you can use PRINTER.SYS, check your printer's documentation or call the manufacturer.

  6. To print with a software code page, you must perform a number of additional steps. You use the MODE command to prepare and download code page information to your printer. After you do so, you can use MODE to select the downloaded code page, or you can load NLSFUNC and use the CHCP command to change the active code page for all your devices at once. Additionally, you might want to add the COUNTRY= command to your CONFIG.SYS file to make case conversion and sort order information available.

  7. DISPLAY.SYS performs a similar function for EGA, VGA, Super VGA, and LCD screens.

Examples

You can add the following line to your CONFIG.SYS file to set up an IBM Proprinter X24E, attached to LPT1, for use with two additional code pages. The hardware code page for the X24E is 850, Multilingual (Latin I):

DEVICE=C:DOSPRINTER.SYS  LPT1=(4208,850,2)

If an IBM Quietwriter is attached to LPT2, and you want to load PRINTER.SYS into upper memory, you would use the following command:

DEVICEHIGH=C:DOSPRINTER.SYS  LPT2=(5202,850,2)

See Also

CHCP, COUNTRY=, DISPLAY.SYS, MODE device CP, and NLSFUNC

Chapter 14, “Understanding the International Features of DOS”

PROMPT 2.0 and later—Internal

PROMPT 2.0 and later—Internal
PROMPT 2.0 and later—Internal

You can customize the prompt that MS-DOS displays by using the PROMPT command. PROMPT, like PATH, saves its settings in the DOS environment. People often use ANSI control codes in their prompt strings, in which case ANSI.SYS has to be loaded into memory from the CONFIG.SYS file.

Syntax

PROMPT  promptstring

Parameters and Switches

promptstring The text of the DOS command-line prompt. It can include any of the meta strings defined for use in the PROMPT command (see the following table).

Notes

  1. If you do not enter the promptstring, the standard system prompt, which is equivalent to PROMPT $N$G (C>), reappears.

  2. A very popular prompt string, and the one that the Setup program for MS-DOS 6 inserts into your AUTOEXEC.BAT file, is PROMPT $P$G (C:DOS>). Beginning with DOS 6.0, COMMAND.COM inserts the value $P$G in PROMPT if it finds the PROMPT environment variable undefined when the system starts up.

  3. The new system prompt stays in effect until you restart DOS or reissue the PROMPT command.

  4. The PROMPT command establishes the value of an environment variable named PROMPT. You can view, set, or delete the PROMPT environment variable by using the SET command, as well as the PROMPT command. The PROMPT command is simply shorthand for SET PROMPT=.

  5. Any text you type for promptstring becomes the new system prompt. You can include special characters by using the meta-strings.

    A meta-string is a group of characters transformed into another character or group of characters. All meta-strings begin with the dollar-sign symbol ($) and have two characters, including the $. The case of the characters isn't significant in a prompt meta-string, but it is significant in ANSI commands. The following table contains the meta-string characters and their meanings:

    Meta-StringExampleDescription
    $$ $ Dollar sign
    $B | Vertical bar (pipe) character
    $D Tue 09-11-2001 The current date
    $G > Greater-than symbol
    $L < Less-than symbol
    $N C The current drive letter
    $P C:DOS The current drive and path, including the current directory
    $Q = Equal sign
    $T 12:19:12.45 The current time (Note that the time is not updated as the time changes, only when a new prompt line is displayed.)
    $V MS-DOS Version 6.0 The DOS version number

    The following meta-strings do not display characters onscreen, but they are useful when you want to make a fancier DOS prompt.

    Meta-StringDescription
    $_ (underscore) Carriage return and line feed—moves the cursor to the first position of the following line
    $E The Escape character (ASCII 27)—useful for sending ANSI control codes
    Meta-StringDescription
    $H The Backspace character (ASCII 8)—erases the preceding character
    $ (any other) Nothing or null character—DOS ignores

    Note

    To include a dollar sign in a prompt string, you have to enter it twice.

  6. When you open a DOS window within Windows, the prompt is changed to the value of the WINPMT environment variable if it has been defined. If you want to have a different prompt under Windows, use the SET command to define an environment variable named WINPMT and set it equal to the prompt you want to use. For example, the line

    SET WINPMT=**Windows** $P$G
    

    gives you the following prompt in a DOS window within Windows:

    **Windows** C:DOS>
    

    This is a handy prompt to remind you that Windows is running.

Examples

To use the current drive and path as the prompt, followed by >, use this command:

PROMPT  $P$G

Assuming that your CONFIG.SYS file loads ANSI.SYS and that you have white text (foreground) on a blue background, the following command changes the prompt to a blinking red HI, followed by >:

PROMPT  &E[5; 3/mHI$E[0; 37; 44m$G

See Also

ANSI.SYS and SET

Changing the Command Prompt with PROMPT” in Chapter 11.

QBASIC 5.0 and later—External

QBASIC 5.0 and later—External

QBasic is the Microsoft QuickBasic programming environment, a full-screen, interactive programming tool for writing programs in BASIC. Traditionally, all operating system software came with a simple set of programming tools. Few microcomputer users have an interest in these programs anymore, but it is nice that Microsoft keeps providing them free for those who want them. QBasic also is the “behind the scenes” program that EDIT and HELP require; so whether or not you actually write any BASIC programs, it's likely that you will be running QBasic on your computer.

Syntax

QBASIC  /RUN pathname  /EDITOR pathname  /B  /G  /H  /NOHI  /MBF

Parameters and Switches

/RUN pathname Specifies the BASIC file that you want QBASIC to load into memory and run. If no drive is specified, the current drive is assumed. If no subdirectory path is specified, the current directory is assumed. Wildcards are not allowed. You cannot specify the /EDITOR parameter with the /RUN parameter.
/EDITOR pathname Specifies the ASCII file that you want QBASIC to load into the full-screen text editor (EDIT). If no drive is specified, the current drive is assumed. If no subdirectory path is specified, the current directory is assumed. Wildcards are not allowed. If you don't specify a pathname, the editor starts without a file. You cannot specify the /RUN parameter with the /EDITOR parameter.
/B Specifies that QBASIC should use colors more appropriate for a black-and-white (monochrome) or LCD screen.
/G Specifies that QBASIC should use the fastest screen-updating method for a CGA monitor. Don't specify the /G switch if you see “snow” on your monitor.
/H Specifies that QBASIC should display 43 lines on an EGA monitor or 50 lines on a VGA monitor.
/NOHI Specifies that QBASIC should limit itself to 8 colors rather than 16.
/MBF Specifies that QBASIC should use the Microsoft Binary Format for floating-point numbers. Specifically, the /MBF switch converts CVS, CVD, MKS$, and MKD$ so that they act like CVSMBF, CVDMBF, MKSMBF$, and

Notes

  1. QBasic is a comprehensive development environment for interpreted BASIC and a subset of Microsoft QuickBasic. BASIC, BASICA, and GWBASIC are no longer provided with MS-DOS.

  2. QBASIC.EXE is required to run EDIT and HELP.

  3. The use and operation of QBasic is beyond the scope of this book. If you want to learn to write BASIC programs with QBasic, you can either try to find your way with the QBasic help system, or you can get a book on programming with QBasic.

QCONFIG

QCONFIG

QCONFIG displays detailed technical information about the computer.

Syntax

QCONFIG /a /c /d /e /i /o /o filename /p /q /? key="text"

Parameters and Switches

/a Lists all the Micro Channel adapters supported by the QConfig program.
/c Provides specific details on asynchronous ports.
/d Generates a detailed listing of hardware. This list also provides volume label and file system reporting.
/i Displays CONFIG.SYS and AUTOEXEC.BAT files.
/o Redirects output to the file QCONFIG.OUT.
/o filename Redirects output.
/p Pauses the output between screens.
/q Indicates that the redirected message is not to be displayed.
key="text" Defines key with text to appear in output. This option must be the last option.
/? Provides online help for the QCONFIG command.

RAMBOOST

RAMBOOST
RAMBOOST

The RAMBOOST command monitors for any changes that take place in the system. It opti-mizes memory and then maintains DOS memory on an ongoing basis. This command is a terminate-and-stay-resident (TSR) utility that resides in memory.

Syntax

RAMBOOST active disable learn mode pif sync track filename id /?

Parameters and Switches

active Forces RAMBoost to remain fully active and reoptimizes memory the next time the computer is restarted or any time it detects a change to a tracked file. Active mode is the default.
disable Disables RAMBoost by preventing it from loading.
learn Forces RAMBoost to enter learn mode the next time you restart the computer, even if no tracked file has changed.
mode Returns a value, indicating the current status of RAMBoost as not resident (0), in active mode (1), or in learn mode (2).
pif Displays a table listing of network drivers, TSRs, DOS tables, and any other files loaded into memory and indicates what block of memory they are loaded into.
sync Updates the signatures for all tracked files in the RAMBOOST.INI file. It should be used only after a change is made to a tracked file that does not affect memory such as a SET command, PATH adjustment, and so on.
track filename /d Displays the names and signatures of the files that RAMBoost currently tracks. The filename variable specifies a device driver or TSR to add (or delete if /d is specified) to the list of tracked files. The files in the list are tracked for possible changes that would affect memory usage.
/? Displays the online abbreviated help.

RAMBOOST.EXE

RAMBOOST.EXE

RAMBOOST.EXE increases the available conventional memory of the computer and reduces the complexity of using the DOS memory manager EMM386.EXE.

Syntax

DEVICE=drive:pathramboost.exe load /p=profile

Parameters and Switches

drive:path Specifies the location of the device driver file.
load Installs RAMBoost resident in memory.
/p=profile Indicates the name of the alternative configuration profile.

Notes

The RAMBOOST.INI file is an ASCII text file that can be edited.

RAMDRIVE.SYS (device driver) 3.2 and later— External

RAMDRIVE.SYS (device driver) 3.2 and later— External
RAMDRIVE.SYS (device driver) 3.2 and later— External

A RAM disk is a simulated drive that uses RAM, rather than a magnetic disk, to store files. Because it has no moving parts, a RAM disk is much faster than a hard drive or floppy disk. Unfortunately, whenever you shut down or restart your computer, the contents of a RAM disk are lost. Using RAMDRIVE.SYS, you can create a RAM disk in extended, expanded, or conventional memory. You must load RAMDRIVE.SYS by adding a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathRAMDRIVE.SYS  disksize  sectorsize  dir_entries  /E /A

To load the RAMDRIVE.SYS device driver into upper memory, use the DEVICEHIGH= command to specify the placement in memory of the driver, not the RAM disk:

DEVICEHIGH=drive:pathRAMDRIVE.SYS  disksize  sectorsize  dir_entries  /E  /A

Parameters and Switches

drive:path Specifies the full path to the RAMDRIVE.SYS file on your system. Setup places the RAMDRIVE.SYS file in the C:DOS subdirectory by default. If the full path to RAMDRIVE.SYS isn't specified, DOS looks for the file in the root directory of the startup drive.
disksize Indicates the size, in kilobytes, of the RAM disk you want to create. disksize can be from 4KB to 32,767KB. (For DOS 5, the limits were 16KB to 4,096KB.) If no disksize is specified, a 64KB RAM disk is created.
sectorsize Indicates the sector size the RAM disk should use. sectorsize can be 128, 256, or 512. If this parameter is omitted, a sectorsize of 512 is assumed. (You should have a very good reason before setting sectorsize to a different value. All DOS disks use a sector size of 512, and many disk utilities fail if a different sector size is used.) To specify sectorsize, you also must specify disksize.
dir_entries Specifies the maximum number of root directory entries that the RAM disk can hold (in other words, the size of the root directory). dir_entries can be in the range 2 to 1024 and are rounded up to the nearest multiple that fits evenly in sectorsize. Each directory entry takes 32 bytes of disk space. If this parameter is omitted, a root directory with room for 64 entries is created (four 512-byte sectors in size). To specify dir_entries, you also must specify disksize and sectorsize.

dir_entries limits only the size of the root directory, not any subdirectories you create on the RAM disk. Subdirectories grow as needed to accommodate an unlimited number of directory entries.

/E Creates the RAM disk in extended memory. An XMS-compatible memory manager, such as HIMEM.SYS, must be available.
/A Creates the RAM disk in expanded memory. A LIM EMS-compatible memory manager, such as EMM386.EXE, must be available.

Notes

  1. DEVICEHIGH= loads the RAMDRIVE.SYS device driver into upper memory, but the RAM disk still is created in the memory area you have specified with the command's parameters. RAMDRIVE.SYS uses about 1KB of memory for the device driver.

  2. If not enough room is available in memory for the RAM disk you have specified, RAMDRIVE.SYS decreases the size of the root directory to 16 entries and tries again. If the RAM disk still doesn't fit, the driver aborts with an error message. (See the third item in the following “Messages” section.)

  3. A RAM disk runs more efficiently from extended memory than from the simulated expanded memory provided by EMM386.EXE. Unless you have a hardware EMS board in your computer, always create RAM disks in extended memory.

  4. Normally, you don't want to create RAM disks in conventional memory. Although they run efficiently there, they also use up memory that is required to run your application programs. This memory trade-off might be worthwhile only when you are working on a floppy-disk–only system. The increased speed from a RAM disk could be worth the loss of memory for certain operations.

  5. Although RAM disks are very fast, SMARTDrive can provide similar speed increases for all your programs—not just those that use the RAM disk. For many people, committing memory into a disk cache such as SMARTDRV.EXE makes more sense than creating a RAM drive. Of course, if you have a lot of RAM that you don't use, you can always do both.

    Caution

    If you use a RAM disk to store data files, remember to copy them to your hard drive before shutting off your system or rebooting. Whenever you restart your computer, everything on a RAM disk is lost.

  6. One popular use of a RAM disk is to store temporary files generated by programs. When you set the TEMP and TMP environment variables to point to a RAM disk, many programs create their temporary files on the RAM disk. (See Appendix B,“DOS Environment Variables,” for a description of the DOS programs that use the TEMP environment variable.) Not only can this technique speed up your applications, but it also can eliminate the need to periodically delete temporary files that, for one reason or another, have escaped automatic deletion by their parent programs.

  7. If you run Windows and set the TEMP variable to point to a RAM disk, Microsoft advises that the RAM disk be at least 2MB (2,048KB) in size to avoid possible printing problems.

  8. You can load RAMDRIVE.SYS as many times as memory allows from CONFIG.SYS. Each time you load it, another RAM disk is created. When created, a RAM disk is assigned the next available drive letter by DOS.

  9. If RAMDRIVE.SYS is loaded after DBLSPACE.SYS, it receives a drive letter that follows the letters allocated by DoubleSpace. To avoid having your RAM disk drive letter change as you create and destroy DoubleSpace drives, always place the DEVICE= line for RAMDRIVE.SYS before the line for DBLSPACE.SYS in your CONFIG.SYS file.

  10. You can use DoubleSpace to compress a RAM disk, but the compressed volume file (CVF) that DoubleSpace creates is lost each time you reboot your computer. To keep from having to create a new CVF file each time you start up, you could clear its attributes with the ATTRIB command and copy it from the RAM disk to your hard disk. Your AUTOEXEC.BAT file could then copy the CVF file back to the RAM disk; restore the system, hidden, and read-only attributes; and mount it for you each time you reboot.

Examples

For the following examples, assume that the computer you are using has 8MB of RAM, HIMEM.SYS loaded, EMM386.EXE loaded, and UMB support enabled. To create a 64KB RAM disk in conventional memory, you can load RAMDRIVE.SYS with no parameters, as shown here:

DEVICEHIGH=C:DOSRAMDRIVE.SYS

The DEVICEHIGH= command locates the RAMDRIVE.SYS driver in upper memory, but the RAM disk itself still is created in conventional memory. To increase the size of the RAM disk to 1MB (1,024KB) and place it in extended memory, you add the disksize and /E parameters, as the following line shows:

DEVICEHIGH=C:DOSRAMDRIVE.SYS  1024  /E

Because other values are not specified, the sector size is 512, and the root directory has room for 64 directory entries. If you want to create a RAM disk that is about the same size as a 1.44MB 3 1/2-inch floppy disk, you can use the following line in your CONFIG.SYS file:

DEVICEHIGH=C:DOSRAMDRIVE.SYS  1450  512  224  /E

To increase the number of root directory entries to 224, you have to specify a sector size of 512, despite the fact that 512 is the default value for sector size.

Messages

Messages from the RAMDRIVE.SYS device driver all begin with the word RAMDrive:. You are most likely to encounter the messages listed here.

RAMDrive: Expanded memory manager not present

Error: You have specified the /A switch to create a RAM drive in expanded memory; however, expanded memory is not available, and the RAM disk was not created. Make sure that you have loaded EMM386.EXE (or another EMS provider), with EMS enabled, before the DEVICE= line in the CONFIG.SYS file that loads RAMDRIVE.SYS.

RAMDrive: Extended memory manager not present

Error: You have specified the /E switch to create a RAM drive in extended memory; however, extended memory is not available, and the RAM disk was not created. Make sure that you have loaded HIMEM.SYS (or another XMS provider) before the DEVICE= line in the CONFIG.SYS file that loads RAMDRIVE.SYS.

RAMDrive: Insufficient memory

Error: Not enough memory was available to create the RAM drive you specified. Typically, this problem is caused by forgetting to specify the /E or /A switch, in which case RAMDRIVE.SYS attempts to create the RAM disk in conventional memory. You also may receive this message if you specify the disksize in bytes rather than kilobytes. Edit the DEVICE= line for RAMDRIVE.SYS in your CONFIG.SYS file to correct any errors; then restart your computer.

RAMDrive: No extended memory available

Error: You have specified the /E switch to create a RAM drive in extended memory, but no extended memory is available. Usually, this error is caused when EMM386.EXE claims all available XMS memory to use for EMS memory. With the DOS 6 version of EMM386.EXE, you can include a MIN parameter so that EMM386.EXE returns unused EMS memory to the memory pool when another program, such as RAMDRIVE.SYS, requests extended memory.

See Also

DEVICE=, DEVICEHIGH=, DBLSPACE.SYS, and SMARTDRV.EXE

Using a RAM Disk” in Chapter 7 and Appendix B,“DOS Environment Variables”

RAMSETUP

RAMSETUP

The RAMSETUP command starts the RAMBoost Setup program. The RAMBoost Setup program installs the RAMBOOST device driver in the CONFIG.SYS file and then reboots the system.

Syntax

RAMSETUP /25 /28 /43 /50 /60 /in /bw /mono /lcd /ff /bf /nf /bt /ngm /le /im
/ps2 /?

Parameters and Switches

/25 Sets screen display to 25 lines (the default).
/28 Sets screen display to 28 lines (VGA only).
/43 Sets screen display to 43 lines (VGA and EGA).
/50 Sets screen display to 50 lines (VGA only).
/60 Sets screen display to 60 lines (Video 7 only).
/in Runs the program in color mode even if a color display device is not detected.
/bw Uses the black-and-white color scheme.
/mono Uses the monochrome color scheme (IBM monochrome).
/lcd Uses the LCD color scheme (for laptops).
/ff Speeds up display (CGA only). Can cause a “snow” effect on some display devices.
/bf Uses the BIOS font (use if graphics are not displayed properly).
/nf Does not use fonts (does not use graphics characters).
/bt Allows graphics mouse in Windows, and graphics fonts with DESQview or UltraVision.
/ngm Does not use the graphics mouse pointer.
/le Uses the left-handed mouse.
/im Disables the mouse.
/ps2 Resets the mouse hardware.
/? Displays the abbreviated online help.

Notes

RAMSETUP strips all DEVICEHIGH= statements from the CONFIG.SYS file and converts them into DEVICE= statements. It also strips out all LOADHIGH= or LH= statements in the AUTOEXEC.BAT file. The DOS LOADHIGH, DEVICEHIGH, and DOS=UMB functions are built into RAMBOOST and are no longer required.

RAMSETUP does not edit nested or called batch files.

See Also

RAMBOOST.EXE

RD or RMDIR 2.0 and later—Internal

RD or RMDIR 2.0 and later—Internal
RD or RMDIR 2.0 and later—Internal

You can use the RD (or RMDIR) command to delete empty subdirectories. If the subdirectory still contains any files, RD aborts and displays an error message. To delete a subdirectory and all its files, use the DELTREE command.

Syntax

RD  drive:path

RMDIR  drive:path

Parameters and Switches

drive: The drive containing the subdirectory you want to delete. If drive: is omitted, the current drive is assumed.
path The subdirectory you want to delete on drive:. path can either be absolute or relative—that is, specified from the root directory or specified from the current directory (see item #4 in the following “ Notes” section). If only the subdirectory name is specified with no path information, the subdirectory in the current directory with that name is deleted. You cannot delete the current directory.

Notes

  1. You must explicitly name the subdirectory you want to delete.

  2. The subdirectory you want to delete must be empty of all files, including hidden files.

  3. You cannot delete the current directory of any drive.

  4. If a backslash () is the first (or only) character in a subdirectory path, it is considered absolute and is specified starting from the root directory. If the subdirectory path begins with a subdirectory name, it is considered relative, and the current directory is used as its starting point. A drive letter, followed by a colon, can precede either an absolute or a relative path.

Messages

Invalid path, not directory
or directory not empty

Error: RMDIR did not remove the specified directory because one of the following errors occurred:

  • You listed an invalid directory in the path.

  • Files other than the . and .. entries still exist.

  • You misspelled the path or directory name.

Check each possibility and try again.

You can delete all the files in a directory and remove the directory in one step by using DELTREE.

Attempt to remove current directory - drive:path

Error: RMDIR did not remove the specified directory for one of the following reasons:

  • The directory is the current directory of the current drive.

  • The directory is the current directory of another drive.

  • The directory is redirected with the SUBST command.

For the first two cases, perform a CHDIR operation on a directory that is not a subdirectory of the directory that you want to delete and then attempt the RMDIR operation again. For the third case, perform an RMDIR operation on the actual directory affected by the SUBST command.

See Also

CD (or CHDIR), DELTREE, and MD (or MKDIR)

Deleting Directories with RMDIR (RD)” in Chapter 5

RECOVER 2.0–5.0—External

RECOVER 2.0–5.0—External
RECOVER 2.0–5.0—External
RECOVER 2.0–5.0—External

RECOVER is a dangerous utility that can do more harm than good. If a disk develops a bad sector within a file, DOS is unable to copy any part of the file. If the root directory of a disk becomes damaged, DOS may not be able to read the disk at all. RECOVER is supposed to help you in these situations, but at times it is a case of a little help being worse than no help at all. With DOS 6, Microsoft stopped distributing RECOVER, and it's not even available on the Supplemental Disk. If you have a copy of RECOVER on your disk, you might want to delete it to keep from running it accidentally.

RECOVER 2.0–5.0—External

Situations like the ones that RECOVER was supposed to address do arise. DOS 6.22 includes the ScanDisk utility, which can repair many of the problems that can arise on your disks. If ScanDisk can't fix the problem, or if you aren't running DOS 6.22 when disaster strikes, reach for a good third-party utility package. The Norton Utilities, PC Tools, and the Mace Utilities are just a few of the packages that offer excellent tools to help you recover damaged files and disks. Any one of these packages will pay for itself many times over the first time you lose access to your hard disk due to a runaway program overwriting your root directory.

See Also

SCANDISK

Analyzing a Disk with SCANDISK” in Chapter 7

REM 1.0 and later—Internal

REM 1.0 and later—Internal
REM 1.0 and later—Internal

You can use the REM command to insert comments into batch files or your CONFIG.SYS file. Any text on the line after REM (with a few exceptions in batch files) is ignored when DOS is processing that line in the file. Using this command can be extremely handy for documenting or temporarily “commenting out” lines in the file.

Syntax

REM  comment

Parameters and Switches

comment Can be any text. DOS truncates any line longer than 127 characters, but this usually doesn't matter in a comment line. In batch files, comments are read by the parser, so the pipe character (|) and redirection symbols (< and >) should be avoided.

Notes

  1. REM should be placed at the beginning of a line, with only spaces or tabs preceding it. A legal delimiter of some sort (for example, a space) needs to follow the REM so that DOS can recognize it.

  2. In batch files, the pipe (|) and redirection symbols (< and >) should be avoided in comments because the parser may see and act on them. Including a greater-than sign in a comment line may cause an empty file to be created with the next eight characters as its name.

  3. DOS has a maximum line length of 127 characters; any line longer than that is truncated. Still, as long as you are not depending on the comment line being displayed, it really doesn't matter whether DOS cuts it off. Comments are for you to read when you are working on the file, and the length of the line is really limited by your editing software, not DOS.

  4. In CONFIG.SYS, you can use a semicolon rather than REM as an easier and somewhat cleaner way to mark comments. The semicolon comment isn't valid in batch files or versions of DOS before MS-DOS 6.

  5. Blank lines can make your batch files and CONFIG.SYS file much easier to understand. DOS ignores any blank lines in these files, so you don't need to mark them as comments with REM.

  6. Although REM is legal at the DOS prompt, it serves no purpose. REM is useful only for inserting comments in batch files and CONFIG.SYS.

Examples

If you want to document why a particular environment variable is being created in your AUTOEXEC.BAT file, you might include something like this:

REM  I set DIRCMD here to avoid always telling DIR that I prefer my
REM  filenames in lowercase letters with screen pauses.
SET   DIRCMD=/L /P

Or perhaps you want to “comment out” the line that loads the driver for your tape drive until the replacement driver arrives in the mail:

REM  DEVICE=C:DOSTAPESQ55.SYS

You also could use a semicolon to comment out the preceding line, like this:

;DEVICE=C:DOSTAPESQ55.SYS

See Also

;

Chapter 16, “Understanding Batch Files,” and Chapter 19, “Configuring Your Computer”

REMOVDRV

REMOVDRV

REMOVDRV deletes the Stacker stacvol file and all the data from the specified Stacker drive.

Syntax

REMOVDRV drive: /?

Parameters and Switches

drive: Indicates the Stacker drive from which you want to delete all data.
/? Displays the abbreviated online help.

Notes

The drive must be a mounted Stacker drive.

REN or RENAME 1.0 and later—Internal

REN or RENAME 1.0 and later—Internal
REN or RENAME 1.0 and later—Internal

REN (or RENAME) is a utility you can use to rename files. Unlike many third-party utilities, REN cannot move files from one subdirectory to another, and it cannot rename subdirectories. To rename subdirectories, see the MOVE command.

Syntax

REN  old_name  new_name

or

RENAME  old_name  new_name

Parameters and Switches

old_name The file, or files, that you want to rename. A full pathname (such as drive:path...filename.ext) can be specified, and wildcards are allowed.

This parameter is required and must include a filename (*.* is not assumed).

new_name The new filename, or names, you want to use. Only a filename and extension can be specified; you can't include any drive or path information. Wildcards are allowed; if they are used, they are filled in with the corresponding characters from old_name. This parameter is required.

Notes

  1. REN (or the long form, RENAME) changes the name of a file on the disk. The command does not rename directories. You can use the MOVE command to rename a directory.

  2. Because you are renaming an established disk file, the file's drive or path designation goes with the old name so that DOS knows which file to rename.

  3. Wildcard characters are acceptable in either the old or new name.

Messages

Duplicate filename or File not found

Error: You attempted to change a filename to a name that already exists, or you asked DOS to rename a file that does not exist in the directory. Check the directory for conflicting names, make sure that the filename exists and that you spelled the name correctly, and then reissue the command.

See Also

MOVE

Renaming Files” in Chapter 8

RENDIR

RENDIR

You can use the RENDIR command to rename a directory or subdirectory.

Syntax

RENDIR drive:patholdname drive:pathnewname /?

Parameters and Switches

drive:path Specifies the full path to the subdirectory that is to be renamed. This path cannot change when you are renaming the subdirectory.
oldname Specifies the name of the subdirectory to be changed.
newname Specifies the new name of the renamed subdirectory.
/? Displays abbreviated help.

REPLACE 3.2 and later—External

REPLACE 3.2 and later—External
REPLACE 3.2 and later—External

The REPLACE command enables you to selectively update files on one disk from matching files on another disk, thereby overwriting old copies of files. REPLACE has other options that can help you maintain backup floppy disks, such as adding new files only or prompting you for confirmation before copying each file.

Syntax

REPLACE  source_files  destination_path  /A  /S  /U  /P  /R  /W

Parameters and Switches

source_files Specifies the file, or files, that you want to selectively copy. A full pathname (such as drive:path...filename.ext) can be specified, and wildcards are allowed. The filename portion of this parameter is required.
destination_path Specifies the location you want to selectively copy the source_files to. You can include a drive and a path, but you cannot specify a filename. If this parameter is omitted, the current drive and subdirectory are used as the destination.
/A Adds all the files specified by source_files that do not exist on the destination_path. You cannot combine the /A switch with the /S or /U switches.
/S Replaces all the files specified by source_files that are found in destination_path or any subdirectories below it. You cannot combine the /S switch with the /A switch.
/U Updates (replaces) all the files specified by source_files that are found in destination_path with dates and times preceding the source file's date and time. You cannot combine the /U switch with the /A switch.
/P Prompts you as each file is replaced or added to destination_path.
/R Enables REPLACE to overwrite read-only files on the destination_path. Normally, REPLACE terminates with an error if it attempts to overwrite a read-only file.
/W Tells REPLACE to display the Press any key to continue... message and wait for a keystroke before beginning the replace operation. Using this switch gives you time to switch floppy disks if necessary.

Exit Codes

ERRORLEVEL ValueMeaning
0 Replace operation successful
1 Incorrect DOS version running (6.0 and later)
1 Invalid command-line syntax (3.2 and 3.3)
2 Source file(s) not found
3 Source or destination path not found
5 Unable to replace files—access denied
8 Insufficient memory to complete replace operation
11 Invalid command-line syntax (4.0 and later)
15 Source or destination drive invalid (undocumented)

Rules

  1. If you do not name the source drive, DOS uses the current drive.

  2. If you do not name the source path, DOS uses the current directory.

  3. You must specify a source filename. Wildcards are allowed.

  4. If you do not name the destination drive, DOS adds files to, or replaces files in, the current drive.

  5. If you do not name the destination path, DOS adds files to, or replaces files in, the current directory.

Notes

  1. Use REPLACE with caution because this command's speedy find-and-replace capability can have the effect of an unrelenting search-and-destroy mission on your data. Be careful when you unleash REPLACE on several subdirectories at a time, particularly when you use REPLACE /S on the entire disk. Because REPLACE updates a file based only on the filename, you could accidentally replace a file somewhere on the disk that you intended to save.

  2. To prevent such unwanted replacements, limit the destination pathname to cover only the directories that hold the files you want replaced. Check the source and destination directories for matching filenames. If you find conflicts or have doubts, use the /P switch; REPLACE asks for approval before replacing files.

  3. If you use DOS 4.0 or later, the /U switch can help you avoid replacing wrong files. /U compares the files' date and time stamps. The destination file is replaced only if the file is older than the source file.

Messages

File cannot be copied onto itself filename

Warning: The source and destination disk and directories are identical. You probably did not specify a destination, so the source disk and directory are the current disk and directory. Otherwise, you specified the same drive and directory twice. REPLACE does not process filename.

Check the command line to ensure that you specified the correct source and destination for REPLACE and then try the command again.

nnn file(s) added

or

nnn file(s) replaced

Information: REPLACE indicates how many files are added or replaced. The first message appears when you use the /A switch; the second message appears if you do not use the /A switch. The message does not indicate that potential files are added or replaced; rather, the message appears when at least one file is added or replaced, regardless of errors that occur later.

No files found filename

Error: REPLACE could not find any files that matched the source filename. One of the following errors probably occurred:

  • You misspelled the source filename.

  • You provided the drive and directory names but omitted the filename.

  • You provided the wrong drive or directory name for the source.

  • You inserted the wrong floppy disk into the drive.

Check the command line to ensure that the correct disk is in the drive and then retry the command.

Invalid parameter combination

Error: You used both the /A and /S switches or the /A and /U switches, which you cannot use together in a REPLACE command. To replace files, omit /A. Because you cannot add files to more than one directory at a time, you cannot use /S with /A. To add files to more than one directory, issue separate REPLACE commands, each time specifying a different directory to which files are to be added.

See Also

COPY and XCOPY

“Combining Copying and Directory Management with XCOPY” and “Using the COPY Command” in Chapter 8

REPORT

REPORT

The REPORT command reports statistics for Stacker drives. Typing REPORT at the DOS command prompt displays an online interface window that enables you to examine how the files are compressed.

Syntax

REPORT drive: /m /?

Parameters and Switches

drive: Specifies the Stacker drive for which you want to see statistics.
/m Specifies a monochrome display.
/? Displays the online help screen for this command.

See Also

SDIR

RESIZE

RESIZE

The RESIZE command resizes a Stacker drive.

Syntax

RESIZE drive: /h /b /lcd /bw /?

Parameters and Switches

drive: Specifies the drive to resize. The current drive is the default.
/h Specifies hidden files to be moved.
/b Restarts the computer after resizing the drive.
/lcd Specifies an LCD color scheme (for laptops).
/bw Specifies a monochrome display.
/? Displays the abbreviated online help.

RESTORE 2.0 and later—External

RESTORE 2.0 and later—External
RESTORE 2.0 and later—External
RESTORE 2.0 and later—External

You can use the RESTORE command to restore from one disk to another disk one or more backup files created with the BACKUP command. If your backup file was created by MSBACKUP, you must use MSBACKUP to restore data from that file.

Syntax

RESTORE  drive1:  drive2:pathfilename.ext  /S  /P  /M  /N  /B:date  /A:date
/L:time  /E:time  /D

PARAMETERS AND SWITCHES

drive1: Indicates the drive that holds the backup files.
drive2: Indicates the drive that is to receive the restored files.
path Specifies the path to the directory that is to receive the restored files. This parameter must be the same as the directory from which the files were backed up.
filename.ext Indicates the file, or files, that you want to restore. Wildcards are allowed.
/A:date Restores all files that were created or modified on or after the date you specify. The format of date depends on the COUNTRY in your CONFIG.SYS file.
/B:date Restores all files that were created or modified on or before the date you specify. The format of date depends on the COUNTRY in your CONFIG.SYS file.
/D (DOS 5.0 and later) Lists files to be restored without actually performing the restoration. You must specify drive2:.
/E:time Restores all files that were created or modified either at the time or earlier than the time you specify. The format of time depends on the COUNTRY in your CONFIG.SYS file.
/L:time Restores all files that were created or modified either at the time or later than the time you specify. The format of time depends on the COUNTRY in your CONFIG.SYS file.
/M Restores all files that were modified or deleted since the backup set was made.
/N Restores all files that no longer exist in the destination directory.
/P Prompts you before restoring a file that was changed since the last backup or before restoring a file marked as read-only.
/S Restores files in the current directory and all subdirectories. When you use this switch, RESTORE re-creates all necessary subdirectories that were removed and then restores the files in the re-created subdirectories.

Exit Codes

ERRORLEVEL ValueMeaning
0 Restore operation successful
1 No files found to restore
2 Halted by file-sharing violation (undocumented)
3 Halted by user (Ctrl+C)
4 Halted by fatal disk error

Rules

  1. You must provide the name of the drive that holds the backup files. If the current disk is to receive the restored files, you do not have to specify the destination drive.

  2. If you do not name a path, RESTORE uses the current directory of the receiving disk.

  3. If you do not provide a filename, RESTORE restores all backup files from the directory. Omitting the filename is the same as using *.*.

  4. RESTORE prompts you to insert the backup disks in order. If you insert a disk out of order, RESTORE prompts you to insert the correct disk.

  5. Do not combine the /B, /A, and /N switches in the same RESTORE command.

  6. Be cautious when you restore files that were backed up while an ASSIGN, SUBST, or JOIN command was in effect. When you use RESTORE, clear any existing APPEND, ASSIGN, SUBST, or JOIN commands. Do not use RESTORE /M or RESTORE /N while APPEND /X is in effect. RESTORE attempts to search the directories for modified or missing files. APPEND tricks RESTORE into finding files in the paths specified to the APPEND command. RESTORE may then restore files that should not be restored, and not restore files that should be restored. To disable APPEND, issue the APPEND ; command.

  7. RESTORE cannot restore DOS system files (for example, IO.SYS and MSDOS.SYS) to the appropriate positions in the file structure so that the disk is bootable.

Notes

BACKUP and RESTORE in DOS 3.3 and later are radically different from the corresponding commands in previous versions. These commands place all backed-up files in one larger file and maintain a separate information file on the same disk. In DOS 3.3 and later, RESTORE handles the new and old backup-file formats, which means that these newer versions of RESTORE can restore backups created by any version of BACKUP.

Messages

Insert backup diskette nn in drive d:
Strike any key when ready

Information: RESTORE wants the next disk in sequence. This message appears when you are restoring files that were backed up onto floppy disks. Insert the next floppy disk (in the proper sequence) into drive d: and then press any key.

Insert restore target in drive d:
Strike any key when ready

Information: RESTORE is asking you to insert the floppy disk that is to receive the restored files. This message appears only when you restore files onto floppy disks. Insert the target disk into drive d: and then press any key.

***Listing files on drive A:***

Information: You used the /D switch with RESTORE, and the files that would be restored are displayed. The listed files follow the file specification that you used for restoration.

Source does not contain backup files

Error: RESTORE found no files that were backed up with the BACKUP command. BACKUP may have malfunctioned when backing up files, or you may have inserted the wrong disk.

Source and target drives are the same

Error: RESTORE determined that the drive that holds the backup files is the same as the drive that you designated to receive the restored files. You may have forgotten to specify the drive that holds the backup files or the target disk. If your system has one floppy drive and you tried to restore files onto a floppy disk, specify drives A and B.

System files restored
Target disk may not be bootable

Warning: You restored the three system files (IO.SYS, MSDOS.SYS, and COMMAND.COM) from the backup floppy disks. These files may not have been restored to the proper location on the disk, and you cannot use them to start DOS.

Warning! Diskette is out of sequence
Replace the diskette or continue if okay
Strike any key when ready

Warning: You inserted a backup floppy disk out of order. Place the correct disk in the drive and continue.

Warning! File filename
was changed after it was backed up
or is a read-only file
Replace the file (Y/N)?

Warning: This message appears when you use the /P switch. Either the file filename already exists on the hard disk and is marked as read-only, or the date of the file on the target disk is more recent than that of the backup copy (which may mean that the backup copy is obsolete). Type Y to replace the existing file with the backup copy or N to skip the file.

Warning! No files were found to restore

Warning: The files you wanted to restore are not on the disk from which you tried to restore them. Try again with another disk or another file specification. If you did not create a log file when you created the BACKUP floppy disk, you can determine which directories and files are on the floppy disk by using the TYPE command to display the floppy disk's binary CONTROL.xxx file and then interpreting what you see. The xxx in the filename reflects the backup disk's number. For example, the first disk in the backup set would have the file CONTROL.001 on it.

RMDIR (see RD)

RMDIR is the alternative name for the RD command. For information on using the RD or RMDIR command, see the entry for RD in this command reference.

SCANDISK 6.22—External

SCANDISK 6.22—External
SCANDISK 6.22—External
SCANDISK 6.22—External

The ScanDisk program can locate and fix errors on disks. It works on most local drives, including DoubleSpace compressed drives. ScanDisk also can perform a surface scan, which reads every sector on the disk to make sure that it is error free and readable.

Syntax

To check one or more disk drives for errors, use the following format:

SCANDISK  drive: ... /ALL  /CHECKONLY  /AUTOFIX  /NOSAVE  /CUSTOM  /SURFACE
/MONO  /NOSUMMARY

To check an unmounted DoubleSpace volume file for errors, use the following format:

SCANDISK  cvf_file  /CHECKONLY  /AUTOFIX  /NOSAVE  /CUSTOM  /MONO  /NOSUMMARY

To check the degree of fragmentation in a group of files, use the following format:

SCANDISK  /FRAGMENT  pathname

To undo the changes ScanDisk previously made fixing files, use the following format:

SCANDISK  /UNDO  undo:  /MONO

Parameters and Switches

drive: ... Specifies the disk drive, or drives, you want to scan for errors. You can specify as many drive letters as you want. If drive: is omitted, the current drive is assumed. The colon following the drive letter is optional. You can't combine this parameter with the /ALL parameter.
cvf_file Specifies the name of an unmounted DoubleSpace volume file you want to scan for errors. You should include the drive letter and the full name of the compressed volume file (CVF), such as C:DBLSPACE.000.
pathname Specifies the file, or files, you want to check for fragmentation. A full pathname is allowed, and all the normal defaults for drives and/or paths apply. Wildcards are allowed in the filename portion of the pathname.
undo: Specifies the disk drive containing the undo disk that ScanDisk previously created. The colon following the drive letter is optional.
/ALL Requests that ScanDisk check all local disk drives. If you specify this switch, you should not include any drive: parameters.
/CHECKONLY Requests that ScanDisk check the drive for errors but not repair any errors it finds. You must specify this parameter if you want to run ScanDisk while other programs are running, such as Windows. You can't combine this parameter with the /AUTOFIX, /NOSAVE, or /CUSTOM parameters.
/AUTOFIX Requests that ScanDisk fix any errors it finds without prompting you first. Any lost clusters that are found are saved as files in the root directory of the drive. If you specify the /NOSAVE parameter with /AUTOFIX, any lost clusters are deleted. You can't combine this parameter with the /CHECKONLY or /CUSTOM parameters.
/NOSAVE Requests that ScanDisk delete any lost clusters it finds on the disk. You can use this parameter only if you also specify the /AUTOFIX parameter.
/CUSTOM Requests that ScanDisk follow the settings in the [CUSTOM] section of the SCANDISK.INI file. If you intend to run ScanDisk from a batch file, you might want to use this parameter. For information about setting options in the SCANDISK.INI file, read the comments included in the file itself. You can't combine this parameter with the /AUTOFIX, /NOSAVE, or /CHECKONLY parameters.
/SURFACE Requests that ScanDisk automatically perform a surface scan after checking the disk for errors. Surface scans can take time, but they do verify that all the data on your disk is error free and readable.
/MONO Configures ScanDisk to use display colors more appropriate for a monochrome monitor or LCD screen.
/NOSUMMARY Prevents ScanDisk from displaying a full-screen summary after scanning each drive.
/FRAGMENT Requests that ScanDisk check all files specified with the pathname parameter to see how fragmented they are. You can't specify any other parameters except pathname when you are requesting a fragmentation report.
/UNDO Requests that ScanDisk reverse the changes it made to your disk. The drive specified with this parameter must be the drive containing the undo disk that ScanDisk created. Note that you should not undo the changes ScanDisk made if you have made any changes to the disk since fixing the errors.

Exit Codes

ERRORLEVEL ValueMeaning
0 ScanDisk found no errors
1 Command-line syntax error
2 Terminated due to an internal error or lack of memory
3 ScanDisk halted by user during integrity checks
4 ScanDisk halted by user during surface scan
254 ScanDisk found errors, but they were all corrected
255 ScanDisk found errors, and they were not all corrected

Notes

  1. If you enter SCANDISK with no parameters, ScanDisk scans the current drive.

  2. Normally, if any errors are found, a dialog box appears with information explaining what the error is. You can choose to have ScanDisk fix the error or leave it alone. If you have specified the /AUTOFIX parameter, these dialog boxes are skipped.

  3. After the disk has been checked for errors in its logical structure, ScanDisk asks whether you want to perform a surface scan. If you have specified the /SURFACE parameter, the surface scan takes place automatically. If you have specified the /CHECKONLY parameter, no surface scan is done.

  4. ScanDisk can find and repair errors on most hard disk drives, floppy disk drives, DoubleSpace drives, RAM disk drives, and memory card drives.

  5. ScanDisk can check only local disk drives. Do not attempt to run ScanDisk on any network, CD-ROM, or Interlnk drives attached to your system. You also shouldn't run ScanDisk on any alias drives created by the ASSIGN, JOIN, or SUBST commands.

  6. If you try to run ScanDisk when other programs are running, ScanDisk refuses to fix any problems it encounters because the other programs might try to access the disk while ScanDisk is working, and more serious problems could be created. If Windows is running and you try to start ScanDisk, you see the message shown in the third item in the following “Messages” section.

    If you run ScanDisk with the /CHECKONLY parameter, it checks your disks for errors while other software, such as Windows, is running. If ScanDisk finds any errors, quit all your active programs, including Windows, and run ScanDisk again. In multitasking situations, ScanDisk might find errors when none really exist. By running ScanDisk again with no outside interference, you can find out for sure.

  7. If you ask ScanDisk to check a mounted or unmounted DoubleSpace drive, it asks whether it should first check the host drive for errors. Normally, you should answer Yes. It is best to fix the host drive and then the DoubleSpace volume if errors exist in either of them. Answer No only if you have just finished checking the host drive and are sure that no errors exist.

  8. After ScanDisk repairs errors on a drive, it asks whether you want to create an undo disk. It is usually a good idea to make an undo disk. You must have a blank, formatted floppy disk that you can place in drive A or B for the undo information to be written to. After you have exited ScanDisk, try not to write anything to the disk until you are sure that you don't want to undo the changes ScanDisk has made. Do not undo changes after writing to the disk; otherwise, serious damage could result.

  9. ScanDisk can find and repair the following types of problems on your drives:

    • Bad sectors on the disk

    • Boot sector errors

    • Crosslinked files

    • Directory tree structural errors

    • DoubleSpace compression structure errors

    • DoubleSpace volume file allocation errors

    • DoubleSpace volume header structure errors

    • DoubleSpace volume signature errors

    • File allocation table (FAT) errors

    • Lost clusters

  10. You can customize many of ScanDisk's settings by editing the SCANDISK.INI file. Setup places this file in the C:DOS subdirectory by default. By setting the features you want to use in SCANDISK.INI and using the /CUSTOM parameter, you can automate a ScanDisk session and run it all from a batch file. For instructions on editing the SCANDISK.INI file, see the comments included in the SCANDISK.INI file itself.

Examples

To scan drives C and D for errors, you enter the following command:

SCANDISK  C:  D:

If you want to perform a surface scan as well, and not be prompted about fixing errors, you include the /SURFACE and /AUTOFIX options as follows:

SCANDISK  C:  D:  /AUTOFIX  /SURFACE

If Windows is running, you have to do the surface scan later and for now specify the /CHECKONLY parameter, as in the following:

SCANDISK  C:  D:  /CHECKONLY

To find out if it is time to run DEFRAG, you can check on the fragmentation level of the files in your correspondence subdirectory, like this:

SCANDISK  C:LETTERS*.*  /FRAGMENT

Messages

Invalid switch: parameter

Error: The parameter you specified is unknown to ScanDisk. Check the command line for typing errors. To see a list of legal parameters for ScanDisk, enter the SCANDISK /? command.

parameter is not a valid name for a DoubleSpace volume file

Error: You have entered an incorrect parameter for ScanDisk. You see this message if you omit one of the slashes (/), which begin most of ScanDisk's parameters. Of course, you may have mistyped the name of a DoubleSpace CVF file as well.

You cannot use ScanDisk to fix problems while Windows is running.

To check for disk problems without fixing them, type SCANDISK /CHECKONLY at
the command prompt.

Error: You have attempted to run ScanDisk without the /CHECKONLY parameter while Microsoft Windows is running. Specify the /CHECKONLY parameter and try again.

See Also

CHKDSK and DEFRAG

SCANREG

SCANREG
SCANREG

SCANREG, which is a Windows 98 tool (not available with Windows 95), can back up, restore, or fix the data files that make up the Windows Registry.

Syntax

SCANREG /backup /restore /fix /scanonly /autoscan /comment="comment" /opt
filename /?

Parameters and Switches

/backup Backs up the Registry data files to .CAB files.
/restore Displays a list of available backup files that can be used to restore the Registry.
/fix Repairs any damaged Registry settings and optimizes the Registry by removing unused space.
/opt Optimizes the Registry by removing unused space.
/scanonly Scans the Registry and displays any error messages but does not back it up.
/autoscan Scans the Registry and backs it up without prompting if there are no backups already on the same date.
/comment="comment" Adds the "comment" to the .CAB file created by /backup.
filename

Scans the specified Registry file and displays messages about any errors without backing up the Registry. The allowable files are as follows:

SYSTEM.DAT
USER.DAT
/? Displays the abbreviated online help.

Notes

SCANREG requires extended memory to run and does not run anything except the /restore option from the Windows Safe Mode command prompt.

If you restore an older backup, you lose any customizations and configurations you have made since that backup. This can cause your system to be unstable if you have installed new software or hardware since the backup.

When Windows is first installed, Setup creates an original Registry file named SYSTEM.1ST in the root directory. You can use it to restore the original Registry if the Registry is ever damaged.

SCHEDULE

SCHEDULE

The SCHEDULE command starts the Schedule program, which is a full-screen utility program to specify a future date and time to automatically run DOS programs.

The CPSCHED terminate-and-stay resident program must be loaded for scheduled events to run at the preset date and time.

Syntax

SCHEDULE filename /25 /28 /43 /50 /60 /in /bw /mono /lcd /ff /bf /nf /bt /ngm
/le /im /ps2 /?

Parameters and Switches

filename Displays events for the specified file.
/25 Sets the screen display to 25 lines (default).
/28 Sets the screen display to 28 lines (VGA only).
/43 Sets the screen display to 43 lines (VGA and EGA).
/50 Sets the screen display to 50 lines (VGA only).
/60 Sets the screen display to 60 lines (Video 7 only).
/in Runs the program in color even if a color display device is not detected.
/bw Uses the black-and-white color scheme.
/mono Uses the monochrome color scheme (IBM monochrome).
/lcd Uses the LCD color scheme (for laptops).
/ff Speeds up display (CGA only).
/bf Uses the BIOS font.
/nf Does not use fonts.
/bt Allows a graphics mouse in Windows, allow graphics fonts with DESQview or UltraVision.
/ngm Does not use the graphics mouse pointer. Uses a text-character mouse pointer.
/le Uses the left-handed mouse.
/im Disables the mouse.
/ps2 Resets the mouse hardware.
/? Displays the abbreviated online help.

See Also

CPSCHED

SCREATE.SYS

SCREATE.SYS
SCREATE.SYS

SCREATE.SYS compresses RAM drives. It is one of the installable device drivers provided with PC DOS 7 and must be loaded by a DEVICE= statement in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathscreate.sys drive: /c=cluster size

Parameters and Switches

drive:path Location of the SCREATE.SYS file.
drive Drive letter of the RAM drive.
/c=cluster size Cluster size.

See Also

RAMDRIVE.SYS and STACHIGH.SYS

SCRIPT

SCRIPT

SCRIPT is a command-line utility for printing PostScript files. It also can be used to redirect output from the result of other commands to a PostScript file or output device.

Syntax

SCRIPT /O=P|L /T=size /L=size /P=size /TI=time /U /R drive:pathfilename
device /?

Parameters and Switches

/O=P|L Sets the page orientation to portrait or landscape.
/T=size Sets the top margin to size inches.
/L=size Sets the left margin to size inches.
/P=size Sets the font to size in points.
/TI=time Defines a printer timeout of time seconds.
/R Resets the printer.
/U Uninstalls the utility from memory.
drive:pathfilename Specifies the source file to be printed. Specifying no source sends all output to the specified device until the utility is unloaded from memory.
device Specifies the device to print to, such as LPT1. Can also be a filename.
/? Displays abbreviated help.

Notes

To send the result of commands to the SCRIPT utility, use this syntax:

command | script

SDEFRAG

SDEFRAG
SDEFRAG

The SDEFRAG command runs the Stacker Optimizer to defragment or recompress a Stacker drive. It also can change the size of a Stacker drive, resulting in a corresponding change to its uncompressed drive.

Syntax

SDEFRAG drive: /r /p=n /f /d /u /b /gl /gp /sorder /batch /skiphigh /noxms
/lcd /bw /h  /v /buffer=nnnn /restore=drive:stacvol.ext: /?

Parameters and Switches

drive: Specifies the Stacker drive to optimize; the current drive is the default.
/r Recompresses data to complete conversion or maximize the available space.
/p=n Recompresses data using level n (n is from 1 to 9).
/f Specifies a full optimization.
/d Optimizes directories only.
/u Specifies a Quick optimization.
/b Restarts the computer after optimization.
/gl Changes the expected compression ratio for the Stacker drive.
/gp Increases Stacker drive size or gets more uncompressed space.
/sorder Sorts file information in the following order:
 n By filename; this is the default
e By file extension
d By time of creation
s By file size
u No sort
- Following any of the above order, reverse the order
/batch Runs in batch mode.
/skiphigh Skips loading data in high memory.
/noxms Prevents SDEFRAG from using extended memory during processing.
/lcd Uses the monochrome display color setting.
/bw Uses the monochrome display color setting.
/h Moves hidden files.
/v Verifies all writes.
/buffer=nnnn Runs the optimizer with reduced memory requirements (where nnnn is between 256 and 4096). The default is 4096.
/restore=drive:stacvol.ext Restores the Stacker drive if optimization was interrupted by a restart or power failure.
/? Displays the abbreviated online help.

SDIR

SDIR

The SDIR command displays the compression ratio for a list of files and directories. It should be used only for Stacker-compressed drives.

Syntax

SDIR drive:path filename /p /w /a:attributes /o:attributes /s /b /l /ch /n /?

Parameters and Switches

drive:path Specifies the Stacker drive and directory for which the listing is needed.  
filename Specifies the file or group of files for which the listing is needed.  
/p Displays one screen of the listing at a time.  
/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 specified. The options are as follows:  
 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:attributes Controls the order in which directory names and filenames are sorted and displayed. The options are as follows:
 n In alphabetical order by name
-n In reverse alphabetical order
e In alphabetical order by extension
-e In reverse alphabetical order by extension
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 (smallest first)
/s Displays files in the specified directory and all subdirectories. You can use this switch with the /p switch to see the file listing one screen at a time.   
/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.   
/ch Displays the file compression ratio for Stacker-compressed files. /ch uses the host allocation size.   
/n Specifies no switches. Resets SDIR to the defaults.   
/? Displays the abbreviated online help.   

See Also

REPORT

SET 2.0 and later—Internal

SET 2.0 and later—Internal
SET 2.0 and later—Internal
SET 2.0 and later—Internal

The SET command enables you to view, add, delete, or change variables contained in the DOS environment. Starting with DOS 6.0, you can use the SET command in your CONFIG.SYS file. MS-DOS uses several environment variables to control different aspects of its operation.

Syntax

To display all the variables defined in the environment, use the following format:

SET

To add or replace an environment variable, use the following format:

SET name=string

Parameters and Switches

name The string that you want to add to the environment. DOS converts these characters to uppercase before storing the variable in the environment.
string The text that you want associated with name. string is stored in the environment exactly as you enter it—with upper- and lowercase characters and including any spaces you specify.

Notes

  1. The environment is an area of memory that DOS sets aside to store a series of text strings in the form name=string. The name portion is converted to uppercase before being stored in memory, but the string portion is stored as is.

  2. If SET is executed with no parameters, the current contents of the DOS environment are displayed. (Don't use this form of the SET command in your CONFIG.SYS file.) To display the value of a single environment variable, pipe the output from SET through the FIND filter. (See the following “Examples” section.)

  3. Entering SET with the name of the variable and an equal sign but no string deletes the specified variable from the environment. Note that if no variable with the name you've specified is found, nothing happens, and no error message is displayed.

  4. When SET is executed with both name and string parameters, DOS searches the current environment looking for a variable that matches name. If a match is found, DOS replaces the variable with the new value specified in string. If no match is found, a new variable is defined in the current environment.

  5. The total length of an environment variable, including the name and equal sign, cannot exceed the DOS 127-character limit. When you use SET to create environment variables, the limit is actually 123 because the SET command itself uses 3 characters and a space.

  6. Spaces are legal in both the name and string portion of an environment variable. In fact, spaces are not ignored when searching for environment variables; so any trailing spaces you include after the name, but before the equal sign, become a significant portion of that variable's name. Keep this point in mind when you define new environment variables.

  7. Avoid using redirection symbols (<, >, and |) and equal signs (=) in environment variables. Although you can use them in some cases, they can cause strange, hard-to-predict side effects when you use these variables in a batch file.

  8. The DOS environment is limited to the size specified by the /E:size parameter specified in the SHELL= statement that names the command interpreter (usually COMMAND.COM) in your CONFIG.SYS file. If you haven't specified an /E:size parameter, it defaults to 256 characters. When a program is run, it is passed a copy of the current environment that has been shrunk to the smallest multiple of 16, which is big enough to hold all the variables currently defined.

    One annoying side effect of this behavior is that, if you normally run DOS from a Shell program, you will never have much environment space available—no matter how big you make it in your CONFIG.SYS file. To avoid the Out of environment space error messages, you might have to define a DUMMY variable that you can delete from a batch file whenever you need more environment space. (See the following “Examples” section.)

  9. Several DOS commands use the environment to store their current values. PATH and PROMPT both store their settings in the environment. If you are running APPEND with the /E parameter, it stores its settings in the environment as well.

  10. DOS defines a number of environment variables when you start up your computer, and certain commands modify their behavior if certain variables are defined. For more information about the environment variables DOS uses, refer to Appendix B,“DOS Environment Variables.”

Examples

To display the contents of the current DOS environment, enter SET with no parameters, as shown here:

SET

A series of definitions similar to the following is then displayed on your screen:

CONFIG=WIN
COMSPEC=C:DOSCOMMAND.COM
MOUSE=C:DOS
TEMP=C:TEMP
TMP=C:TEMP
DIRCMD=/L
PATH=C:BAT;C:NORTON;C:DOS;C:UTIL
PROMPT=*Windows* $p$g
windir=d:win

You can tell many interesting things from this list. First of all, the computer uses a startup menu, and the configuration that was chosen is named WIN (CONFIG=WIN). Also, notice that the WINDIR environment variable is shown in lowercase. Microsoft Windows inserts this variable into the environment as a flag to indicate that it is active. Inserting it in lowercase is a trick that prevents you from changing or deleting it with the SET command.

If you want to see how a particular environment variable is defined, pipe the output of the SET command through the FIND filter, like this:

SET  |  FIND  "COMSPEC"

Only the lines that contain "COMSPEC" are displayed. Note that FIND is case sensitive by default, so make sure that you enter the name of the variable you are looking for in all uppercase (or specify the /I switch).

To change the defaults for the DIR command to lowercase filenames (/L) five columns wide (/W), sorted by date with directories first (/OGD), you can define (or replace) the DIRCMD environment variable by using the following SET command:

SET  DIRCMD=/L  /W  /OGD

Note that you can't include any spaces before the equal sign; otherwise, a new variable (DIRCMD<space>) that the DIR command does not recognize is defined. To delete the DIRCMD variable entirely and let DIR use its built-in defaults, use the following command.

SET  DIRCMD=

If you want to make sure that an environment variable you define in a batch file was successfully created, add an IF command after the SET command that defines the new variable:

SET  NEWVAR=Do we have space for this?
IF  "%NEWVAR%"==""  GOTO  OUT_OF_SPACE

One technique to help you avoid Out of environment space error messages when you run batch files from a Shell program is to define a DUMMY variable in your AUTOEXEC.BAT file to simply take up space:

SET  DUMMY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

When you need space in the environment, simply delete the DUMMY variable, as follows, before you define any new variables that your batch file needs:

SET  DUMMY=
SET  NEWVAR=Now we have space for this

When your batch file terminates, returning you to your Shell program, the copy of the environment that the batch file was using is discarded. Because it is being thrown away, there is no reason to restore the DUMMY variable before the batch file ends.

If you might run this batch file when your Shell program is not running, you should reset the DUMMY variable and delete the NEWVAR variable before exiting the batch file like this:

SET  NEWVAR=
SET  DUMMY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Otherwise, the next time you need the DUMMY variable, it might not be there.

Messages

Out of environment space

Error: You see this message if the environment is not large enough to hold the string you want to add with the PATH, PROMPT, or SET command. To increase the size of the environment, use the /E:size parameter in the SHELL= statement in your CONFIG.SYS file.

Syntax error

Error: SET displays a syntax error message if you forget to include the equal sign. This error most often happens after you have been using the PATH and PROMPT commands, which get you out of the habit of including an equal sign between the variable name and its value.

See Also

COMMAND, PATH, PROMPT, and SHELL=

Changing DOS Variables” in Chapter 11 and Appendix B,“DOS Environment Variables”

SETUP (Stacker)

SETUP (Stacker)

SETUP activates the Stacker online interface after running SSETUP.

Syntax

SETUP /m /t=drive /?

Parameters and Switches

/m Specifies the monochrome display mode to be used.
/t=drive Specifies the drive's temporary installation location.
/? Displays the abbreviated online help.

SETVER 5.0 and later—External

SETVER 5.0 and later—External
SETVER 5.0 and later—External

When programmers write software, they often add code to check the version of DOS that is running. To be on the safe side, they may prevent their program from running if the preliminary check reveals the presence of a version of DOS that they didn't test. In many cases, this paranoia is unnecessary, and lying to the program about which version of DOS is running enables the software to operate safely. The SETVER.EXE device driver maintains in memory a version table that tells it exactly which programs to lie to and what version of DOS to tell the program it is running. When you run SETVER from the command line, you can view, add, change, or delete entries in SETVER.EXE's version table. These changes take effect the next time SETVER.EXE is loaded into memory.

Syntax

SETVER  drive:path  filename  n.nn

SETVER  drive:path  filename  /DELETE  /D  /QUIET

Parameters and Switches

drive:path Specifies the drive and path to the SETVER.EXE file. Setup places the SETVER.EXE file in the C:DOS subdirectory by default. If drive:path is not specified, SETVER searches the current directory and along the DOS PATH to find the SETVER.EXE file. You usually can omit this parameter.
filename Specifies the full name of the program you want SETVER to locate in the version table. Include the filename and extension, but do not include any path information. No default extensions are assumed, and wildcards are not allowed. If you include this parameter, you also must include either an n.nn, /DELETE, or /D parameter.
n.nn Specifies the DOS version number that SETVER.EXE reports to the program specified by the filename parameter. Valid entries are in the range 2.11 to 9.99. You are required to enter the period delimiting the major and minor version numbers, and you should always enter the value with two decimal places (that is, 2.00, not 2.0 or 2). If you specify this parameter, you cannot specify the /DELETE, /D, or /QUIET parameters.
/DELETE Deletes the version table entry for the program file specified by filename. If you specify /DELETE, you cannot specify the n.nn parameter.
/D Same as /DELETE.
/QUIET Suppresses the two-line successful update message that appears after an entry is deleted from the version table. (Refer to the actual message in the following “Messages” section.) You can specify /QUIET only with /DELETE or /D.

Exit Codes

ERRORLEVEL ValueMeaning
0 SETVER operation successful
1 Invalid command-line switch specified
2 Invalid filename specified
3 Insufficient memory to complete the requested operation
4 Invalid version number format used
5 Entry not found in the version table
6 SETVER.EXE not found
7 Invalid drive letter specified
8 Too many command-line parameters specified
9 Required command-line parameter missing
10 Error reading from SETVER.EXE
11 Version table in SETVER.EXE is corrupt
12 SETVER.EXE file specified doesn't support a version table
13 Version table full
14 Error writing to SETVER.EXE

Notes

  1. If you enter SETVER without any parameters, DOS displays all entries it comes across from the version table contained in the first copy of SETVER.EXE. DOS searches the current directory for the SETVER.EXE file, followed by all the subdirectories specified in your DOS PATH. If you enter SETVER drive:path, the entries in the version table contained in the drive:pathSETVER.EXE file are displayed. In this case, no other directories are searched if SETVER.EXE isn't found in the drive:path subdirectory.

  2. Microsoft ships SETVER.EXE with a version table that lists programs known to work safely with MS-DOS 6, but which have to be fooled in order to run.

    Microsoft's SETVER.EXE Version Table for MS-DOS 6

    filename n.nn filename n.nn
    KERNEL.EXE 5.00 JOIN.EXE 5.00
    NETX.COM 5.00 RECOVER.EXE 5.00
    NETX.EXE 5.00* GRAFTABL.COM 5.00
    NET5.COM 5.00 LMSETUP.EXE 5.00
    BNETX.COM 5.00 STACKER.COM 5.00
    BNETX.EXE 5.00[*] NCACHE.EXE 5.00
    EMSNETX.EXE 5.00[*] NCACHE2.EXE 5.00
    EMSNET5.EXE 5.00 IBMCACHE.SYS 5.00
    XMSNETX.EXE 5.00[*] XTRADRV.SYS 5.00
    XMSNET5.EXE 5.00 2XON.COM 5.00
    DOSOAD.SYS 5.00 WINWORD.EXE 4.10
    REDIR50.EXE 5.00 EXCEL.EXE 4.10
    REDIR5.EXE 5.00 LL3.EXE 4.01
    REDIRALL.EXE 5.00 REDIR4.EXE 4.00
    REDIRNP4.EXE 5.00 REDIR40.EXE 4.00
    EDLIN.EXE 5.00 MSREDIR.EXE 4.00
    BACKUP.EXE 5.00 WIN200.BIN 3.40
    ASSIGN.COM 5.00 METRO.EXE 3.31
    EXE2BIN.EXE 5.00   

    [*] The n.nn entry for these files was changed to 6.00 in MS-DOS 6.22.

    Note

    If you look through the version table provided by Microsoft, you see that WINWORD.EXE and EXCEL.EXE are listed as requiring DOS version 4.10. However, Word for Windows 2.0 and Excel 4.0 can run under DOS 6.22 without SETVER. These entries are for older versions of these programs. If your Windows software is up to date, you don't have to worry about using SETVER to fool these two programs.

    In the version table, you also see entries for the DOS utilities that were not distributed with DOS 6. When you use the DOS 5 versions of these utilities, they have to be included in the version table for SETVER; otherwise, they do not run. Instead, an Incorrect DOS version message is displayed. If you install updated versions of these utilities with the DOS 6 Supplemental Disk Setup program, their version table entries are deleted.

  3. Do not specify the DOS version number with the filename if you are trying to delete an entry in the version table. Doing so causes this error message to be displayed: Too many command line parameters. (Read more about this message in the following “Messages” section.)

  4. Don't add a program to the SETVER.EXE version table unless you are sure that it can run safely with DOS 6. There is a chance that an incompatible program might appear to run and still cause system instabilities or data loss. This is the reason Microsoft displays the WARNING paragraph whenever you add or update an entry in the version table. (Read more about this message in the following “Messages” section.) To be safe, contact the manufacturer of the software program in question to find out whether the version you have can be run safely under DOS 6.

  5. Any changes you make to the version table with SETVER are written to the SETVER.EXE file on disk, not to the device driver in memory. These changes do not take effect until you reload the SETVER.EXE device driver into memory by restarting your computer.

  6. Specify the drive and path to the SETVER.EXE file you want to update and not the drive and path to the program you are looking for in the version table. If you don't specify the drive and path correctly, SETVER usually fails to find SETVER.EXE, and an error message is displayed (see the second item in the following “Messages” section). Normally, SETVER.EXE is located on your DOS PATH, and you can omit the drive:path parameter to avoid this confusing syntax.

  7. Remember to specify only the filename (with extension) of the program file you want to add, update, or delete from the SETVER version table. No path information is stored in the table, so only the filename is needed to locate the entry. The extension is included in the table, so you must specify it as well. No default extensions are assumed, and wildcards are not allowed.

  8. Device drivers, as well as executable programs, can be included in the version table. If SETVER.EXE is already in memory when the device driver loads in your CONFIG.SYS file, SETVER.EXE can lie to it about the version of DOS that is running.

Examples

To display the contents of the version table in the SETVER.EXE file located on your DOS PATH, enter SETVER on the command line as follows:

SETVER

You don't use the METRO.EXE program, and you want to delete the entry from the version table. To do so, enter the following command:

SETVER  METRO.EXE  /DELETE

You can abbreviate the /DELETE switch as /D if you want to. To add METRO.EXE back into the version table and restore its setting to DOS 3.31, you enter the following command:

SETVER  METRO.EXE  3.31

If all goes well, you see the WARNING paragraph. (See the last item in the following “Messages” section.)

Messages

An invalid path to SETVER.EXE was specified

Error: A subdirectory you specified in the path to SETVER.EXE is invalid.

Could not find the file SETVER.EXE

Error: SETVER.EXE was not found along the DOS search path or in the subdirectory you specified. (ERRORLEVEL value 6 returned)

ERROR: Reading SETVER.EXE file

Error: A disk error occurred while the SETVER.EXE file was being read. This problem could be the result of file-sharing violations, errors in the disk's FAT, corrupted formatting information, or bad sectors on the disk. The SETVER.EXE file may be corrupted. (ERROR LEVEL value 10 returned)

ERROR: Writing SETVER.EXE file

Error: A disk error occurred while the SETVER.EXE file was being written to. This problem can happen if the disk fills up or a bad sector is encountered. The SETVER.EXE file may be corrupted. (ERRORLEVEL value 14 returned)

Insuffient memory

Error: Not enough memory is available to run SETVER. (Note: The spelling error is Microsoft's, not ours.) (ERRORLEVEL value 3 returned)

Invalid drive specifier

Error: The disk drive you specified in the path to SETVER.EXE isn't a valid DOS drive. (ERRORLEVEL value 7 returned)

Invalid filename

Error: An invalid filename was specified on the command line, or the specified file doesn't exist. (ERRORLEVEL value 2 returned)

Invalid switch

Error: On the command line, you have specified a switch that SETVER doesn't understand. (ERRORLEVEL value 1 returned)

Invalid version number, format must be 2.11 - 9.99

Error: The version number you specified is invalid. You can report DOS versions 2.11 through 9.99 only. You also may see this message if you specify DELETE or D without the slash (/R). (ERRORLEVEL value 4 returned)

Missing parameter

Error: You specified a filename, but you have not included either a version number (to add or update an entry) or /D (to delete an entry). (ERRORLEVEL value 9 returned)

No entries found in version table

Information: You asked SETVER to display the version table, but the copy of SETVER.EXE it found has no entries in the version table. This can happen if you delete all the entries (one by one) in SETVER.EXE by using the SETVER /D command.

NOTE: SETVER device not loaded. To activate SETVER version reporting you must
load the SETVER.EXE device in your CONFIG.SYS.

Warning: When you use SETVER without loading the SETVER.EXE device, it displays this message to remind you that the version table is active only when the SETVER.EXE device driver is loaded.

Specified entry was not found in the version table

Warning: You have tried to delete an entry that is not in the version table. Check to see whether you mistyped the name of the program or included the wrong extension. If everything looks correct, type SETVER and take another look at the current version table to make sure that the program you are trying to delete is indeed included in it. (ERRORLEVEL value 5 returned)

There is no more space in version table new entries

Error: The version table in SETVER.EXE is full. You must delete one or two entries before you can add any more. (Microsoft seems to have misplaced the for in this message.) (ERRORLEVEL value 13 returned)

Too many command line parameters

Error: Too many command-line parameters were specified, and SETVER doesn't know what to do with them all. (ERRORLEVEL value 8 returned)

Version table is corrupt

Error: The version table stored within SETVER.EXE has become damaged. You need to delete the damaged file and replace it with a fresh copy from your MS-DOS 6 distribution disks. SETVER.EXE is compressed on the distribution disks, and you must use the EXPAND command to expand it so that you can use it. (ERRORLEVEL value 11 returned)

Version table successfully updated
The version change will take effect the next time you restart your system

Information: You have successfully deleted an entry in the version table. This is the message you can suppress by using the /QUIET parameter. (ERRORLEVEL value 0 returned)

WARNING - Contact your software vendor for information about whether a
specific program works with MS-DOS version 6.0. 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 version 6.0, 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

Information: You have successfully updated the version table. The warning paragraph is a reminder that lying to software programs can be a risky business, and you do so at your own risk. To be safe, contact the manufacturer of the program you are trying to fool and ask whether it's safe to run that software under DOS 6. (ERRORLEVEL value 0 returned)

SETVER.EXE (device driver) 5.0 and later—External

SETVER.EXE (device driver) 5.0 and later—External
SETVER.EXE (device driver) 5.0 and later—External

When programmers write software, they often add code to check the version of DOS that is running. To be on the safe side, they may prevent their program from running if the preliminary check reveals the presence of a version of DOS that they didn't test. In many cases, this paranoia is unnecessary, and lying to the program about which version of DOS is running enables the software to operate safely. The SETVER.EXE device driver maintains in memory a version table that tells it exactly which programs to lie to and what version of DOS to tell the program it is running. SETVER.EXE must be loaded in a DEVICE= or DEVICEHIGH= statement in your CONFIG.SYS file.

Syntax

DEVICE=drive:pathSETVER.EXE

or

DEVICEHIGH=drive:pathSETVER.EXE

Parameters and Switches

drive:pathThe drive and path to the SETVER.EXE file on your system. Setup places the SETVER.EXE file in the C:DOS subdirectory by default. If the full path to SETVER.EXE isn't specified, DOS looks for the file in the root directory of the startup drive.

Notes

  1. Microsoft ships SETVER.EXE with a version table that lists programs known to work safely with MS-DOS 6, but which need to be fooled in order to run. You can add or subtract programs from the version table by running SETVER from the command line. To activate any changes you make, you must reboot your computer.

    Microsoft's SETVER.EXE Version Table for MS-DOS 6

    filenamen.nnfilenamen.nn
    KERNEL.EXE5.00JOIN.EXE5.00
    NETX.COM5.00RECOVER.EXE5.00
    NETX.EXE5.00[*]GRAFTABL.COM5.00
    NET5.COM5.00LMSETUP.EXE5.00
    BNETX.COM5.00STACKER.COM5.00
    BNETX.EXE5.00[*]NCACHE.EXE5.00
    EMSNETX.EXE5.00[*]NCACHE2.EXE5.00
    EMSNET5.EXE5.00IBMCACHE.SYS5.00
    XMSNETX.EXE5.00[*]XTRADRV.SYS5.00
    XMSNET5.EXE5.002XON.COM5.00
    DOSOAD.SYS5.00WINWORD.EXE4.10
    REDIR50.EXE5.00EXCEL.EXE4.10
    REDIR5.EXE5.00LL3.EXE4.01
    REDIRALL.EXE5.00REDIR4.EXE4.00
    REDIRNP4.EXE5.00REDIR40.EXE4.00
    EDLIN.EXE5.00MSREDIR.EXE4.00
    BACKUP.EXE5.00WIN200.BIN3.40
    ASSIGN.COM5.00METRO.EXE3.31
    EXE2BIN.EXE5.00  

    [*] The n.nn entry for these files was changed to 6.00 in MS-DOS 6.22.

    Note

    If you look through the version table provided by Microsoft, you see that WINWORD.EXE and EXCEL.EXE are listed as requiring DOS version 4.10. However, Word for Windows 2.0 and Excel 4.0 can run under DOS 6.22 without SETVER. These entries are for older versions of these programs. If your Windows software is up-to-date, you don't have to worry about using SETVER to fool these two programs.

    In the version table, you also see entries for the DOS utilities that were not distributed with DOS 6. When you use the DOS 5 versions of these utilities, they have to be included in the version table for SETVER; otherwise, they do not run. Instead, an Incorrect DOS version message is displayed. If you install updated versions of these utilities with the DOS 6 Supplemental Disk Setup program, their version table entries are deleted.

  2. If upper memory is available on your computer, SETVER.EXE can be loaded there with the DEVICEHIGH= command. SETVER.EXE requires about 500 bytes of memory with its original version table.

  3. The Setup program for DOS 6 automatically includes a DEVICE= line loading SETVER.EXE in your CONFIG.SYS file. You might want to look over the contents of the version table to see whether you are using any of the programs listed in it. If you are not using any of the programs and the rest of your software is happy running under DOS 6, you can safely delete the SETVER.EXE device driver from your CONFIG.SYS file.

  4. Besides lying to programs, SETVER.EXE can also lie to device drivers. Just make sure that SETVER.EXE is loaded before the device driver loads and that the name of that device driver is included in the version table.

Examples

To load the DOS version table driver into memory, include the following line in your CONFIG.SYS file:

DEVICE=C:DOSSETVER.EXE

This line assumes that the SETVER.EXE file is in the C:DOS subdirectory. If your computer has upper memory available, you might want to load SETVER.EXE into upper memory by using the following command:

DEVICEHIGH=C:DOSSETVER.EXE

Messages

Version table is corrupt

Error: The version table stored within SETVER.EXE has become damaged. You must delete the damaged file and replace it with a fresh copy from your MS-DOS 6 distribution disks. SETVER.EXE is compressed on the distribution disks, so you must use the EXPAND command to expand it before you can use it.

See Also

DEVICE=, DEVICEHIGH=, and SETVER

Setting the Version with SETVER” in Chapter 10

SHARE 3.0 and later—External

SHARE 3.0 and later—External
SHARE 3.0 and later—External
SHARE 3.0 and later—External

The SHARE program enables DOS support for file and record locking. When you run SHARE, it remains resident in memory, becoming a part of DOS. If you use any multitasking software, such as Microsoft Windows, you should run SHARE in your AUTOEXEC.BAT file. You can load SHARE into upper memory by using the LOADHIGH command on systems that have upper memory available.

Syntax

SHARE  /F:name_space  /L:numlocks

Parameters and Switches

/F:name_spaceThe amount of memory space in bytes to use for file sharing. The default is 2,048.
/L:numlocksThe maximum number of file/record locks that are available to programs. The default is 20.

Rules

  1. When SHARE is loaded, DOS checks for file and record locks as each file is opened, read, and written.

  2. SHARE normally enlarges DOS by approximately 6,192 bytes in DOS 5.0 and approximately 5,248 bytes in DOS 6.0. If the number of locks (/L switch) or memory space (/F switch) increases or decreases, DOS also increases or decreases proportionately. You can load SHARE into upper memory by using the LOADHIGH command.

  3. The only way to remove SHARE is to restart DOS.

  4. In DOS 4.0, use SHARE if your hard disk is formatted with partitions larger than 32MB. SHARE is not required to use large partitions in DOS 5.0 and later versions.

  5. You can load SHARE by using INSTALL= in your CONFIG.SYS file (DOS 4.0 and later versions).

  6. You should be running SHARE if you use any multitasking software on your computer. In a multitasking environment, two programs might attempt to update the same file. If that happens, data can be lost. Examples of multitasking environments include the DOS Shell's Task Swapper, Microsoft Windows, and DESQview.

Notes

  1. Use SHARE when two or more programs or processes share a computer's files. After SHARE is loaded, DOS checks each file for locks whenever the file is opened, read, or written. If a file is open for exclusive use, an error message results from subsequent attempts to open the file. If one program locks a portion of a file, an error message results if another program tries to read or write the locked portion.

  2. SHARE is most effective when all file-sharing programs can handle the DOS functions for locking files and records (DOS 3.0 and later versions). SHARE is either partially or completely ineffective with programs that do not use the DOS file- and record-locking features.

  3. SHARE affects two or more programs running on the same computer, not two or more computers using the same file (networked computers). For networks, record- and file-locking are made possible by software provided with the network.

  4. You must use SHARE if you use DOS 4.0 or 4.01 and if your hard disk is formatted larger than 32MB. For convenience, you can use INSTALL= in the CONFIG.SYS file to activate SHARE. In the CONFIG.SYS file, for example, the following command activates SHARE if SHARE.EXE is located in the DOS subdirectory of drive C:

    INSTALL=C:DOSSHARE.EXE
    

See Also

INSTALL= and LOADHIGH

SHELL= 2.0 and later—Internal

SHELL= 2.0 and later—Internal

You use SHELL= to specify the name and location of the command interpreter that MS-DOS should use. Normally, you use COMMAND.COM, but other third-party shells, such as 4DOS and NDOS, can use SHELL= to gain control of the command line. Another common use of the SHELL= command is to change the size of the environment. SHELL= can be used only in your CONFIG.SYS file.

Syntax

SHELL=drive:pathfilename  parameters

Parameters and Switches

drive:pathThe drive and path to the command interpreter must be specified here if the command interpreter isn't located in the root directory of the startup drive.
filenameThe name of the program to use as the command interpreter for DOS. Normally, it is COMMAND.COM.
parametersAny parameters or switches that the specified command interpreter requires. (For the parameters and switches that COMMAND.COM uses, see the description for COMMAND earlier in this command reference.)

Notes

  1. Be careful when you experiment with the SHELL= command and be sure that you have a bootable floppy disk handy. If you set something incorrectly, chances are you either will have to reboot from a floppy disk or perform a “clean boot” by pressing F5.

  2. If no SHELL= command exists in CONFIG.SYS, DOS attempts to load COMMAND.COM from the root directory of the startup drive. If COMMAND.COM cannot be found or is from a different version of DOS, an error message is displayed (see the following “Messages” section). When you receive this error message, you must either enter the full pathname of a valid copy of COMMAND.COM or reboot the computer from a bootable floppy disk.

  3. Do not confuse the SHELL= command with the DOSSHELL program. SHELL= is a CONFIG.SYS command that designates the program to be used as the command-line interface to MS-DOS. DOSSHELL is a program that provides a graphical interface from which you can operate your computer if you choose. The DOSSHELL program and SHELL= command have nothing to do with each other.

  4. MemMaker “comments out” the SHELL= line in your CONFIG.SYS file if the SHELL= line specifies a command interpreter other than COMMAND.COM. If you are using a third-party shell program, be sure that COMMAND.COM is in the root directory of the startup drive before you run MemMaker. After MemMaker is done, you must manually “uncomment” the SHELL= line that loads your command-line interpreter to restore the use of your third-party shell.

  5. Many third-party shell programs do not require the /P switch to tell them that they should install themselves permanently in memory. Instead, they look for a valid environment. If one is present, they assume that they have already been run, do not install themselves permanently, and do not execute the AUTOEXEC.BAT file. In DOS 6, an environment already may be present when the shell programs are loaded from the SHELL= line in CONFIG.SYS, which can lead to problems.

    If you find yourself in the situation just described, try including the /P switch on the SHELL= line that loads your command-line interpreter. Also, you should contact the manufacturer of your shell program to see whether an upgrade that is more compatible with MS-DOS 6 is available.

Examples

The setup program for DOS 6 may insert a SHELL= line in your CONFIG.SYS file that looks something like this:

SHELL=C:DOSCOMMAND.COM  C:DOS/E:512  /P

It sets the command interpreter to COMMAND.COM, located in the C:DOS subdirectory, with a reload path of C:DOS and an environment size of 512 bytes. The final /P switch tells COMMAND.COM to remain in memory permanently. Never specify the /P switch for COMMAND.COM except in the SHELL= line in your CONFIG.SYS file.

Messages

Bad or missing Command Interpreter
Enter correct name of Command Interpreter (eg, C:COMMAND.COM)

Error: If the SHELL= command in your CONFIG.SYS file does not point to a valid command interpreter, and the copy of COMMAND.COM in the root directory of your startup drive is missing or invalid, this message is displayed. To continue, you have to enter the full path to a valid (DOS 6) copy of COMMAND.COM so that DOS can load it into memory. DOS has already checked the copy of COMMAND.COM in your root directory, so entering C:COMMAND.COM as suggested in the error message usually does not work. You can try entering C:DOSCOMMAND.COM because Setup places a copy of COMMAND.COM in the subdirectory in which DOS was installed. If a valid copy of COMMAND.COM can't be found, you must reboot from a floppy disk.

Even if you locate a valid copy of COMMAND.COM and load it into memory, this copy of COMMAND.COM is only temporary; so typing EXIT brings this error message right back onscreen. Also, your AUTOEXEC.BAT file is not executed by temporary copies of COMMAND.COM, so none of the settings or resident software you typically use will be available. Use the COPY command to transfer a new copy of COMMAND.COM to the root directory of your startup disk (usually C:) and reboot by pressing Ctrl+Alt+Del to set things back to the way they should be.

See Also

COMMAND

Using the SHELL Command” in Chapter 19

SHIFT 2.0 and later—Internal

SHIFT 2.0 and later—Internal

The SHIFT command shifts a batch file's command-line parameters one position to the left. You have to use the SHIFT command if your batch file requires more than nine parameters. SHIFT also is handy for batch files that repeat an operation for each command-line parameter. SHIFT is useful only when used in a batch file.

Syntax

SHIFT

Notes

  1. When you use SHIFT, DOS moves the command-line parameters one position to the left. That is, the parameter %1 becomes %0, %2 becomes %1, %3 becomes %2, and so on.

  2. DOS discards the former first parameter (%0). Any parameter shifted off the left end is gone for good.

  3. DOS shifts parameter 10, if it exists, into %9, parameter 11 into parameter 10, and so on. Using SHIFT is the only way to access more than nine command-line parameters from within a batch file.

SIZER (see MEMMAKER)

MemMaker uses the SIZER program to help it optimize memory use on your computer. MemMaker requires this program while optimizing your system, but it is not necessary at any other time. You cannot use this program yourself. SIZER aborts if MemMaker (and possibly CHKSTATE.SYS) is not in control when it is run, displaying the following message:

SIZER.EXE is used by MemMaker during the memory-optimization process
and is not intended to be started from the command prompt.

Very few details about SIZER's operation are documented. When MemMaker is optimizing, it adds a SIZER.EXE command to the beginning of every command that loads device drivers or resident programs in your CONFIG.SYS and AUTOEXEC.BAT files. Load size information about these drivers and programs is written to the MEMMAKER.STS file by SIZER. When optimization is complete, MemMaker removes all references to the SIZER program from your startup files.

See Also

CHKSTATE.SYS and MEMMAKER

SMARTDRV 6.0 and later—External

SMARTDRV 6.0 and later—External
SMARTDRV 6.0 and later—External
SMARTDRV 6.0 and later—External

When used from the command line, SMARTDRV loads or configures SMARTDrive, a disk-caching utility that can speed disk operations significantly. The first time you run SMARTDRV, it loads itself into memory (upper memory if space is available) and establishes the disk cache. To unload SMARTDRV from memory, you have to reboot your computer.

Syntax

To start SMARTDrive from your AUTOEXEC.BAT file or from a command prompt, use the following format:

SMARTDRV  /X  drive ± ... initsize  winsize  /U  /C  /R  /F  /N  /V  /Q  /S
/L  /E:esize  /B:bsize

After SMARTDrive is running, use the following format:

SMARTDRV  drive +|- ... /C  /R  /Q  /S

With DOS version 6.22, you also can use the /X, /F, and /N parameters after SMARTDrive is running:

SMARTDRV  /X  drive +|- ... /C  /R  /F  /N  /Q  /S

Parameters and Switches

Parameters and Switches /XSpecifies that you want to disable write-behind caching for all drives by default. You can then enable or disable individual drives by using the drive ± parameter.
drive ± ...Specifies one or more drives for which you want to enable or disable disk caching. drive enables read caching and disables write caching. drive+ enables read and write caching. drive- disables caching.
 If you start SMARTDrive but do not specify a drive, floppy and Interlnk drives are read cached only; hard drives are read and write cached; and CD-ROM, network, compressed, and Microsoft Flash memory card drives are not cached.
 CD-ROM drives are read cached by default.
Parameters and Switches initsizeSpecifies the size (in kilobytes) of the cache when SMARTDrive starts. The following table shows the default values for this parameter:
 Extended Memoryinitsizewinsize
Up to 1MBAll0 (no caching)
Up to 2MB1024KB256KB
Up to 4MB1024KB512KB
Up to 6MB2048KB1024KB
More than 6MB2048KB2048KB
winsizeSpecifies the size (in kilobytes) by which SMARTDrive reduces its cache when Microsoft Windows starts, freeing that memory for Windows to use. When you quit Windows, that memory is returned to SMARTDrive and defaults to the values listed in the preceding table. If winsize is larger than initsize, SMARTDrive acts as though the two parameters were the same.
Parameters and Switches /USpecifies that you do not want SMARTDrive to load the CD-ROM caching module. If you specify this switch, SMARTDrive cannot cache any CD-ROM drives. If you don't specify /U, you can enable or disable CD-ROM caching at any time by using the drive ± parameter.
/CClears SMARTDrive by writing all write buffers to disk.
Parameters and Switches /RResets SMARTDrive by clearing all caches and restarting SMARTDrive.
/FWrites cached data to the disk after each command finishes, before the DOS command prompt reappears. This is the default behavior.
Parameters and Switches /NWrites cached data to the disk whenever the system is idle. To ensure that all data is written to disk, use the /C (Clear) switch.
/N(Not DOS 6.22) Forces “verbose” mode, so status messages appear when SMARTDrive starts. In DOS 6.22, this switch has been renamed to /V. You cannot use this switch with /Q.
Parameters and Switches /VForces “verbose” mode, so status messages appear when SMARTDrive starts. You cannot use this switch with /Q.
/QForces “quiet” mode, so status messages do not appear when SMARTDrive starts. (Error messages always appear.) /Q is the default. You cannot use this switch with /N.
/SDisplays SMARTDrive's status, including what and how drives are cached and a cache hit statistic.
/LForces SMARTDrive to load into low (conventional) memory even if room exists in upper memory.
/E:esizeThe element size (in bytes), which is the amount of cache data that SMARTDrive moves in one operation. Values can be 1024, 2048, 4096, and 8192. The default is 8192. The smaller the number, the less memory SMARTDrive takes and the slower the performance.
/B:bsizeThe size of the read-ahead buffer (in bytes that are a multiple of esize), which is how much SMARTDrive reads beyond a disk request. The default is 16384. The smaller the number, the less memory SMARTDrive takes and the slower the performance.

Notes

  1. Before you turn off or reset your computer, you must perform a SMARTDRV /C operation to guarantee that no data is lost from SMARTDrive's write buffers. SMARTDrive performs the operation automatically if you press Ctrl+Alt+Del.

    Notes
  2. For SMARTDrive to use extended memory, you must load HIMEM.SYS or some other extended memory manager.

  3. By default, SMARTDRV.EXE tries to load into upper memory. You do not need to use the LOADHIGH command.

  4. If you are using double buffering and your system runs slowly, try loading SMARTDrive with the /L switch.

  5. Double buffering is required only by some ESDI and SCSI hard disk interfaces.

  6. If you have a compressed disk drive, use SMARTDrive on the underlying uncompressed (host) drive.

  7. Notes
  8. If you are using a third-party CONFIG.SYS and AUTOEXEC.BAT file manager, that utility needs to be set up to perform a SMARTDRV /C operation before it reboots your computer.

  9. DOS 6.0 comes with SMARTMON.EXE, a Windows program for monitoring and adjusting SMARTDrive.

Examples

To start SMARTDrive with all the defaults (a good fit for most systems), use the following command:

C:DOSSMARTDRV

To enable read caching for drive C, read and write caching for drive D, and using a 4MB cache for DOS that can get no smaller than 2MB when Microsoft Windows is running, issue the following command:

C:DOSSMARTDRV  C  D+ 4096 2048

See Also

BUFFERS=, EMM386.EXE, HIMEM.SYS, SMARTDRV.EXE, and SMARTMON

Using a Disk Cache (SMARTDrive)” in Chapter 7

SMARTDRV.EXE (device driver) 6.0 and later—External

SMARTDRV.EXE (device driver) 6.0 and later—External
SMARTDRV.EXE (device driver) 6.0 and later—External

When used as a device driver, SMARTDRV.EXE enables double buffering, which is required by certain types of hard disk controllers that cannot work with the memory provided by EMM386.EXE.

Syntax

DEVICE=drive:pathSMARTDRV.EXE  /DOUBLE_BUFFER

Parameters and Switches

drive:pathSpecifies the full path to the SMARTDRV.EXE file on your system. Setup places the SMARTDRV.EXE file in the C:DOS subdirectory by default. If the full path to SMARTDRV.EXE isn't specified, DOS looks for the file in the root directory of the startup drive.
/DOUBLE_BUFFEREnables double buffering. Inserting this switch into your CONFIG.SYS file does not hurt if your system does not need it, but it does take up memory. You can remove the switch if all the entries in the buffering column of the SMARTDRV /S display are no. (It may take a while for - entries to turn into no entries.)

Notes

  1. Double buffering is required only by some ESDI and SCSI hard disk interfaces when used on a computer that provides upper memory blocks for DOS to use.

  2. If you are using double buffering and your system runs slowly, try loading SMARTDrive with the /L switch.

Examples

To load the SMARTDrive double-buffering feature, add the following line to your CONFIG.SYS file:

DEVICE=C:DOSSMARTDRV.EXE  /DOUBLE_BUFFER

See Also

DEVICE= and SMARTDRV

Using a Disk Cache (SMARTDrive)” in Chapter 7

SMARTMON 6.0 and later—Windows

SMARTMON 6.0 and later—Windows

The SMARTDrive Monitor (SMARTMON) is a Windows program that can display the status of the SMARTDrive disk cache and adjust its settings. SMARTMON can even help you update the setting you use to load SMARTDRV in your AUTOEXEC.BAT file. For SMARTMON to be useful, you must be running the SMARTDrive disk cache on your computer.

SMARTMON cannot be run from the DOS command line. You can start SMARTMON from within Windows, for example, by opening the Program Manager's File menu and choosing the Run command. For instructions on using the program, run SMARTMON and press F1 or choose Help from the menu.

See Also

SMARTDRV

SORT 2.0 and later—External

SORT 2.0 and later—External
SORT 2.0 and later—External

SORT is a program that reads lines from the standard input device, performs an ASCII sort on those lines, and then writes them to the standard output device. The sort can be in ascending or descending order and can start at any column in the line. SORT is one of the filter programs provided by MS-DOS for use with redirection symbols from the command line.

Syntax

SORT  /R  /+column  <  source_file  >  dest_file

or

command  |  SORT  /R  /+column

Parameters and Switches

< source_fileSpecifies the name of a file that you want SORT to sort. All the normal defaults for drives and subdirectories apply. Wildcards are not allowed.
> dest_fileSpecifies the name of a file that you want SORT to write the sorted output to. All the normal defaults for drives and subdirectories apply. Wildcards are not allowed. If the output of SORT is not redirected, it is written to the screen.
command |Pipes the screen output from a command into the SORT program, which displays it sorted. command can be any legal DOS command that writes its output to the standard output device (normally the screen).
/+columnStarts sorting with the characters in column number column. column needs to be a positive integer. The default is 1.
/RSorts in descending order. Thus, the letter Z comes first and the letter A comes last, followed by the numbers 9 to 0. The default sort order is ascending.

Notes

  1. If you do not redirect the input or output, all input is from the keyboard (standard input), and all output is to the video display (standard output). If you redirect input and output, use different names for the input and output files.

  2. SORT can handle a maximum file size of 64KB (65,535 characters).

  3. SORT sorts text files and discards any information after, and including, the end-of-file marker (Ctrl+Z).

  4. SORT uses the collating sequence appropriate to your country code and code-page settings if you are using them.

  5. SORT is not case sensitive; that is, the command treats b and B alike.

  6. You cannot set the maximum column that SORT can use to resolve equalities. SORT starts at the /+column specified and continues the comparison until the lines are proven unequal or the end of the line is reached. Because of this sorting method, you cannot use SORT to perform a multikey sort by sorting the file more than once.

Examples

To sort the lines in the file WORDS.TXT and display the sorted lines onscreen, use the following command:

SORT  <  WORDS.TXT

To sort, in reverse order, the lines in the file WORDS.TXT and display the lines onscreen, use this command:

SORT  <  WORDS.TXT  /R

To start sorting at the eighth character of each line in WORDS.TXT and display the output onscreen, use this command:

SORT  /+8  < WORDS.TXT

To display directory information, sorted by file size, use the following command:

DIR  |  SORT  /+14

(The file size starts in the 14th column.) Unfortunately, other lines, such as the volume label, also are sorted, starting in the 14th column. DIR /O provides a more direct and elaborate way of sorting directory information.

See Also

FIND and MORE

The SORT Filter” in Chapter 13

SSETUP

SSETUP

SSETUP sets up Stacker software for use by moving the Stacker files from the C:DOS directory to the C:Stacker directory.

Syntax

SSETUP /m /t=drive: /?

Parameters and Switches

drive:Specifies the Stacker drive for the temporary installation location.
/mSpecifies that the monochrome display mode be used.
/t=driveIdentifies the temporary installation location.
/?Displays the abbreviated online help.

STAC

STAC

STAC accesses the Stacker toolbox to use the DOS Stacker tools.

Syntax

STAC /m /?

Parameters and Switches

/mSpecifies that the monochrome display mode be used.
/?Displays the abbreviated online help.

STACHIGH.SYS

STACHIGH.SYS
STACHIGH.SYS

STACHIGH.SYS loads Stacker high. You must load this device driver by inserting a DEVICE= statement in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathstachigh.sys

Parameters and Switches

drive:pathLocations of the STACHIGH.SYS file.

STACKER

STACKER
STACKER

STACKER mounts or unmounts Stacker drives or displays the Stacker drive map.

Syntax

STACKER -drive1: /?

or

STACKER drive2:=drive3:stacvol.xxx

or

STACKER @drive4:=stacvol.xxx

Parameters and Switches

drive1:Specifies the Stacker drive for an installation location.
-drive1:Unmounts the Stacker drive.
drive2:=drive3:stacvol.xxxMounts drive3stacvol.xxx as drive d2.
@drive4:stacvol.xxxMounts drive4stacvol.xxx as drive d4.
/?Displays the abbreviated online help.

STACKS= 3.2 and later—Internal

STACKS= 3.2 and later—Internal

Whenever a device needs the computer's attention, it generates an interrupt. Before switching to the appropriate interrupt service routine, DOS stores the information it needs to resume the interrupted task in an area called a stack. You can use the STACKS= command to determine how many stacks DOS sets aside for this purpose and how big each stack is. You can use STACKS= only in your CONFIG.SYS file.

Syntax

STACKS=numstacks,size

Parameters and Switches

numstacksThe number of stacks to set aside for hardware interrupts. Legal values are 0 and 8 through 64. The default value is 0 for 8088- and 8086-based computers and 9 for all others.
sizeThe size of each stack in bytes. Legal values are 0 (only if you specify 0 stacks as well) and 32 through 512. The default value is 0 for 8088- and 8086-based computers and 128 for all others.

Notes

  1. Both parameters for the STACKS= command are required. Note that a size of 0 is allowed only if you are using 0 numstacks as well.

  2. There is considerable controversy over whether separate hardware stacks are needed for the average computer system, but in general, using at least MS-DOS's default values is a good idea. This uses some memory, but if it saves you from losing your work, it's worthwhile. Almost all the devices attached to your computer generate interrupts and if they all want attention at once, they can quickly exhaust a low STACKS= setting. When the internal DOS stacks overflow, an error message appears (see the first item, Internal Stack Overflow, in the following “Messages” section), and the system halts. MemMaker often increases the STACKS= setting to 9,256.

    STACKS=0,0 forces DOS to use the active program's stack space when servicing hardware interrupts. Many people run their computers with this setting and never experience any problems. But be warned that STACKS=0,0 may work for months and then, without warning, overflow a program's stack space, crashing your computer. If you are using this setting and see a Stack Overflow error message, increase the STACKS= setting to at least 9,128 or 9,256.

  3. If you are not using the STACKS=0,0 setting, try to limit your choices for the size parameter to 128, 256, or 512. Using these settings isn't required, but specifying a size that is an even power of two makes the stacks easier for DOS to manage. Also, except when you're using the STACKS=0,0 setting, avoid size values less than 128. A small stack is much more likely to overflow, and you are just asking for trouble if you set the size of DOS's hardware stacks to anything less than 128.

Examples

To use the default number of stacks but increase their size to 256 bytes each, use the following line in your CONFIG.SYS file. (This setting has virtually become the standard for people who are not disabling internal stacks in their computers.)

STACKS=9,256

To instruct DOS not to set up any internal stacks, and use the active program's stack space for servicing interrupts, include the following line in your CONFIG.SYS file:

STACKS=0,0

Messages

Internal stack overflow
System halted

Error: The stack that MS-DOS was using to service interrupts has overflowed, and the system has been halted. You need to restart your computer. If you have this problem, increase the numstacks and/or size setting for the STACKS= command in your CONFIG.SYS file.

Exception Error 12

Error: Same as the preceding message, except that this message is displayed when you are running in protected mode (for example, under Windows).

Invalid STACK parameters

Warning: You have specified an invalid parameter on the STACKS= line in your CONFIG.SYS file. Check the entry to make sure that you have specified values for both numstacks and size and that these values are within the legal range for the STACKS= command.

SUBMENU= 6.0 and later—Internal

SUBMENU= 6.0 and later—Internal

SUBMENU= is one of the new CONFIG.SYS menu commands. With it, you can create a multilevel menu from which to choose your startup configuration. You can use SUBMENU= only inside a menu block in your CONFIG.SYS file.

Syntax

SUBMENU=blockname, menutext

Parameters and Switches

blockname

The name of the menu block that you want to display when this menu item is chosen. blockname can be up to 70 characters long, but it can't contain any spaces or the following special characters:

/  ,  ;  =  [  ]

(For more details, see the entry for [blockname] in this command reference.) This argument is required.

menutextThe text you want DOS to display for this menu line. menutext can be up to 70 characters long and contain any text you want, including spaces. Separate menutext from blockname with a comma. If no menutext is provided, DOS displays the blockname in the menu.

Notes

  1. The SUBMENU= command can appear only inside menu blocks in CONFIG.SYS.

    Note

    CONFIG.SYS allows two types of blocks: menu blocks and configuration blocks. Each block begins with a [blockname], and includes all the lines that follow, up to the next [blockname]. Menu blocks, which are blocks named [MENU] or defined with a SUBMENU= command, can include only menu-related commands. All other CONFIG.SYS commands belong in configuration blocks.

  2. Up to nine choices can be displayed in a menu, so you are limited to nine MENUITEM= and SUBMENU= commands in each menu block. Each menu item appears onscreen in the order that it appears in the menu block, numbered from 1 to 9.

    Tip

    Before you construct an extensive menu system in CONFIG.SYS, remember that you will have to wade through it each time you reboot your computer. A simple startup menu, with a handful of options and perhaps one submenu, works best.

  3. If DOS cannot find the block referred to by a SUBMENU= command in your CONFIG.SYS file, it doesn't display that choice in the menu. Your startup menu may fail if SUBMENU= doesn't refer to a valid menu block.

  4. In a multiconfiguration submenu, you can return to the previous menu by pressing the Backspace key.

Examples

Suppose that you're using a main menu that enables you to choose from three basic configurations for your computer: Windows, DOS, and Maintenance. For the DOS configuration, you want to add a submenu with two variations: One configures memory for normal DOS programs, and the other provides your CADD program with the special memory interface it requires. To do so, add the following lines to your CONFIG.SYS file:

[MENU]
MENUITEM=WIN, Configure for Windows (Default)
SUBMENU=DOS, Configure for MS-DOS
MENUITEM=MAINT, Configure for File & Disk Maintenance
MENUDEFAULT=WIN, 30
[DOS]
MENUITEM=NORMAL, Configure for Normal MS-DOS Programs
MENUITEM=CADD, Configure for CADD with INT15 Interface
MENUDEFAULT=NORMAL, 30

When you include these lines in your CONFIG.SYS file, DOS searches for blocks named [WIN], [DOS], and [MAINT]. If those blocks exist in the file, the main menu that DOS displays looks something like the following:

MS-DOS 6 Startup Menu
=====================

1. Configure for Windows (Default)
2. Configure for MS-DOS
3. Configure for File & Disk Maintenance

Enter a choice: 1

Entering 1, 2, or 3 at this menu instructs DOS to execute the [WIN], [DOS], or [MAINT] block, respectively. If no entry is made within about 30 seconds, DOS chooses the [WIN] configuration by default. As long as the [NORMAL] and [CADD] blocks exist in CONFIG.SYS, choosing 2 brings up the following submenu.

MS-DOS 6 Startup Menu
=====================

1. Configure for Normal MS-DOS Programs
2. Configure for CADD with INT15 Interface

Enter a choice: 1

Entering 1 or 2 at this menu instructs DOS to execute the [NORMAL] or [CADD] configuration block, respectively. If you do not make an entry within about 30 seconds, DOS chooses the [NORMAL] configuration by default. To return to the first menu, press the Backspace key.

See Also

[blockname], MENUCOLOR=, MENUDEFAULT=, and MENUITEM=

Creating Multiple Configurations” in Chapter 2

SUBST 3.1 and later—External

SUBST 3.1 and later—External
SUBST 3.1 and later—External
SUBST 3.1 and later—External

SUBST is one of the pretender commands. It can create a drive alias for a subdirectory and fool many (but not all) programs. You might need to use SUBST to get older programs that don't understand subdirectories to run. Unless you have a specific use for SUBST, however, avoid it. You can easily make a mistake and lose data when you are pretending.

Syntax

SUBST  alias:  drive:path  /D

Parameters and Switches

alias:Specifies a valid drive name that becomes the alias, or nickname. alias: may be a nonexistent drive, but it must be available for use and less than or equal to the value specified by the LASTDRIVE= command in your CONFIG.SYS file.
drive:pathSpecifies the drive name and directory path to be nicknamed alias:. The default for drive: is the current drive. You cannot specify the /D parameter when you create an alias by using drive:path.
/DDeletes the alias drive. Do not specify a drive:path parameter when you are deleting an alias drive.

Notes

  1. Entering SUBST with no parameters displays a list of all the drive substitutions currently defined.

  2. The drive letter you use as the alias drive must be available and within the range specified with the LASTDRIVE= command in your CONFIG.SYS file. You cannot use drive letters reserved by Interlnk as SUBST drive aliases. If a drive letter is already in use as a SUBST drive alias, you must delete the previous assignment before assigning that drive letter to another drive:path.

  3. You cannot create SUBST alias drives that refer to subdirectories on a drive that is not local to your computer. Network, CD-ROM, and Interlnk drives are all redirected drives and cannot be used with SUBST.

  4. When you delete an alias drive created by the SUBST command, include the drive letter of the alias drive, not the subdirectory that the alias refers to. For example, to delete the alias drive E, enter the following line at the DOS prompt:

    SUBST  E:  /D
    
  5. You can't use any of the following DOS commands on an alias drive created by the SUBST command:

    ASSIGNFORMAT
    BACKUPJOIN
    CHKDSKLABEL
    DEFRAGMIRROR
    DISKCOMPRECOVER
    DISKCOPYRESTORE
    FDISKSYS

    The preceding commands refuse to work on an alias drive created by SUBST, so if you do try to use them, no harm will be done.

  6. Do not create or delete any SUBST alias drives while Microsoft Windows is running. If you create the SUBST aliases before starting Microsoft Windows, you can use the alias drives from within a DOS session in Windows.

Messages

Cannot SUBST a network drive

Error: You tried to use a nonlocal drive as the alias drive. You cannot use network, Interlnk, or CD-ROM drives with SUBST.

Drive already SUBSTed

Error: You are trying to create a new SUBST drive alias using a drive letter that already is a SUBST drive alias. Delete the previous assignment by entering SUBST drive: /D and try again.

Invalid parameter

Error: The value that you specified for the alias drive (alias:) is invalid. You might need to increase the value specified by the LASTDRIVE= command in your CONFIG.SYS file. This message is also displayed if you try to create an alias for a subdirectory on an alias drive. The drive:path parameter for the SUBST command must refer to a real local disk drive.

See Also

ASSIGN and JOIN

The SUBST Command” in Chapter 11

SWITCH

SWITCH
SWITCH

You can use the SWITCH command to enable several different optional subroutines in a CONFIG.SYS file.

Syntax

SWITCH label1, label2, ...

Parameters and Switches

label1, label2, ...

The names of up to nine subroutines in the CONFIG.SYS file. The subroutine names are preceded by a colon (:) at the beginning of the line in the CONFIG.SYS file and subroutine blocks end with RETURN.

SWITCHES= 5.0 and later—Internal

SWITCHES= 5.0 and later—Internal

The SWITCHES= command is a collection of options that configure DOS for certain circumstances. Options enable you to move the WINA20.386 file out of the root directory, cause an enhanced keyboard to behave like a standard keyboard, and disable DOS 6's new startup keys. You can use SWITCHES= only in your CONFIG.SYS file.

Syntax

SWITCHES=/K  /F  /N  /W

Parameters and Switches

/KForces an enhanced keyboard to behave as though it were an older, standard keyboard.
/F(DOS 6 only) Eliminates the two-second pause that occurs when the Starting MS-DOS... message appears onscreen.
/N(DOS 6 only) Disables the F5 Clean and F8 Interactive boot keys.
/WEnables you to move the WINA20.386 file out of the root directory of your startup drive.

Notes

  1. The SWITCHES= command can be located anywhere in your CONFIG.SYS file. DOS scans the file looking for it before displaying the Starting MS-DOS... message.

  2. If you are having problems with an older application incorrectly interpreting your enhanced keyboard, the /K switch might solve your problems. Enhanced keyboards normally generate certain key codes that were not available on the older 84-key keyboards. Specifying /K forces DOS to translate these new key codes into their equivalent 84-key keyboard codes.

    The /K switch affects only programs that get their keyboard input from DOS. Many programs bypass DOS, getting keyboard input from the BIOS or, in some cases, directly from the keyboard. For these programs, the /K switch has no effect.

  3. If you are using both the /K switch and ANSI.SYS device driver, make sure to include a /K switch on the line that loads ANSI.SYS as well.

  4. By disabling DOS 6.22's F5 Clean and F8 Interactive boot keys with the /N switch, you force your computer to always start up with the CONFIG.SYS and AUTOEXEC.BAT files that are present in your root directory. If security is a concern, and you load security features in these files, you might want to specify this switch. To truly secure your computer, however, you might need to lock your floppy drives, protect your startup files, and take other precautions as well. This switch is only a minor obstacle to a determined user and is meant as a simple means to perhaps “user-proof” a menu system.

    Note

    Before you specify the /N switch, be sure that you have a bootable floppy disk that starts up your system in a usable condition. (You need access to your hard drive and at least a text editor such as EDIT to fix your startup files.) Never specify this switch until you have completely debugged your CONFIG.SYS and AUTOEXEC.BAT files.

  5. The /F switch is intended to be used with the /N switch. After you have disabled the F5 and F8 keys, you don't need a two-second pause at startup so that you can press them.

  6. Windows 3.0 in enhanced mode requires the WINA20.386 driver file to be available before it loads. (See the first message in the following “Messages” section.) If you want to move the WINA20.386 file out of your root directory, you need to specify the /W switch in CONFIG.SYS and add the following line to the [386Enh] section of your SYSTEM.INI file:

    DEVICE=drive:pathWINA20.386
    

    You should specify the full drive and path to WINA20.386 in the device line in SYSTEM.INI.

Note

Windows 3.1 can load successfully in enhanced mode without access to the WINA20.386 driver, but any version 3.0 drivers that you're using may still require the services of the WINA20.386 driver. If they do and that driver is unavailable, Windows may become unstable or crash. Because enhanced-mode drivers for Windows are distributed with many software packages, most people are running Windows 3.1 with Windows 3.0 drivers without knowing it. To be safe, be sure that the WINA20.386 driver is available, either in the root directory or through the /W switch and a device line in SYSTEM.INI.

Examples

You depend on an older application that doesn't respond to the right-side Shift and Ctrl keys properly. To force your enhanced keyboard to return the same keycodes for both the left and right Shift and Ctrl keys, you include the following line in your CONFIG.SYS file:

SWITCHES=/K

If you use ANSI.SYS, remember to add the /K switch to the DEVICE= line that loads ANSI.SYS as well.

Perhaps you have set up a menu system that you want everyone who uses your computer to use. To avoid having people bypass it, you might want to disable the new DOS 6 interactive startup features by adding the following line in your CONFIG.SYS file:

SWITCHES=/F /N

Although you use Windows 3.1, you're not sure whether all your Windows enhanced-mode drivers have been updated yet and want to make sure that the WINA20.386 driver is available, just in case. Because you've moved the WINA20.386 file into the C:DOS subdirectory with your other DOS 6.x files, you need to include the following line in your CONFIG.SYS file:

SWITCHES=/W

Now that DOS knows you've moved WINA20.386, you need to tell Windows where you put it. To do so, add the following line to the [386Enh] section of your SYSTEM.INI file, which is located in your main Windows subdirectory:

DEVICE=C:DOSWINA20.386

Messages

You must have the file WINA20.386 in the root directory of your boot drive to
run Windows in Enhanced Mode

Error: This message is displayed only if you are running Windows 3.0 in enhanced mode and the WINA20.386 file is not present in your root directory. To enable Windows 3.0 to run in enhanced mode with the WINA20.386 driver located somewhere else, specify the SWITCHES=/W command in your CONFIG.SYS file and enter a DEVICE=drive:pathWINA20.386 line in the [386Enh] section of SYSTEM.INI.

See Also

ANSI.SYS and WINA20.386

Using the SWITCHES Command” in Chapter 19

SYS 1.0 and later—External

SYS 1.0 and later—External
SYS 1.0 and later—External

SYS can make a floppy disk bootable without reformatting the disk. It places a copy of DOS (the hidden system files IO.SYS, MSDOS.SYS, and COMMAND.COM for MS-DOS; the files IBMBIO.COM, IBMDOS.COM, and COMMAND.COM for IBM DOS) on the specified disk. In DOS 6, DBLSPACE.BIN also can be copied.

Syntax

SYS  source  drive:

Parameters and Switches

sourceThe source drive and path for the system files. This parameter defaults to the root directory of the current drive for the system files and to the file pointed to by the environment variable COMSPEC for the command-line interpreter (generally, COMMAND.COM).
drive:The drive that is to receive the copies of the DOS files from the root directory of the current drive. The trailing colon (:) is required.

Notes

  1. You must specify the drive that will receive a copy of DOS.

  2. In pre-4.0 versions of DOS, the disk that was to receive the DOS operating system files was required to have sufficient contiguous free space for the files IO.SYS and MSDOS.SYS (IBMBIO.COM and IBMDOS.COM in IBM DOS). Subsequent versions of DOS require only that enough free space exist, not that the space be contiguous.

  3. SYS copies the DOS system files from the root directory of the current disk (or source if it was specified) to the destination drive:. If the DOS system files (IO.SYS and MSDOS.SYS) are not found and the source drive is a floppy disk drive, you are prompted to insert a system disk into the drive. If the source disk is a hard drive, reenter the SYS command and specify where the DOS system files are located by adding the source parameter.

  4. You cannot use SYS in a networked drive; in a drive formed by ASSIGN, JOIN, or SUBST; or in an Interlnk drive.

  5. In pre-5.0 versions of DOS, you have to copy COMMAND.COM to the target disk in a separate step.

  6. SYS looks for a copy of COMMAND.COM either in the root directory of the current drive or in the subdirectory specified by the source parameter if one is specified. If COMMAND.COM is not found, a warning message is displayed. When you see this message, use the COPY command to add a copy of COMMAND.COM to the disk.

  7. With DOS 6, SYS copies the DBLSPACE.BIN file to the system disk you are creating even if you do not use DoubleSpace. If SYS is unable to find the DBLSPACE.BIN file, no error message is displayed. SYS searches the DOS PATH for DBLSPACE.BIN if the file isn't found in the same location as the other system files.

Messages

Could not copy COMMAND.COM onto target disk

Warning: SYS was unable to find the file COMMAND.COM in the root directory of the current drive or, if you specified a source parameter, in the source subdirectory. To make the disk bootable, use the COPY command to copy COMMAND.COM to the disk.

Insert system disk in drive d:
and strike any key when ready

Prompt: SYS cannot find the DOS system files (IO.SYS and MSDOS.SYS) on the floppy drive that you specified with the source parameter (or the root directory of the current drive if you didn't specify a source parameter). Insert a floppy disk that contains the DOS system files.

Invalid path or System files not found

Error: You executed the SYS command with a source parameter, but SYS cannot find the DOS system files in the subdirectory you specified. This message is displayed if the source subdirectory is invalid or does not contain the files IO.SYS and MSDOS.SYS. Correct your source parameter entry and retry the command.

No room for system on destination disk

Error: The disk you are trying to make bootable with SYS doesn't have enough free space for the system files. Delete some of the files on the disk and try the SYS command again.

No system on default disk drive

Error: You executed the SYS command without specifying a source parameter, but SYS cannot find the DOS system files (IO.SYS and MSDOS.SYS) on the current hard drive. Reenter the SYS command, specifying the location of the DOS system files by adding the source parameter.

SYS cannot operate on target drive

Error: SYS cannot transfer the system files (IO.SYS and MSDOS.SYS) to the target drive. You may get this message if you try to use SYS to make a DoubleSpace-compressed drive bootable. SYS can transfer the DOS system files to the host drive but not to the DoubleSpace-compressed drive. SYS is unable to transfer the DOS system files to network and Interlnk drives as well.

System transferred

Information: SYS has placed the files IO.SYS, MSDOS.SYS, COMMAND.COM, and possibly DBLSPACE.BIN on the target disk.

See Also

FORMAT

SYSINFO

SYSINFO

SYSINFO gathers and displays information about the computer system. This information is gathered in a file called SYSINFO.TXT or a filename designated. You can view it in browse mode by using the E editor.

Syntax

SYSINFO /e=filename /h /n=filename /r  /q /s /w /wr: /f /t /?

Parameters and Switches

/e=filenameUses the specified program for editing.
/hGathers and displays hardware information only.
/n=filenameWrites output to a specified file (rather than to SYSINFO.TXT).
/rDisplays preexisting SYSINFO.TXT (or a file specified by /n).
/qGathers and displays a Quick Info string only.
/sGathers and displays software information only.
/wGathers and displays Windows information only.
/wr:Gathers Windows information from all drives.
/fGathers and displays Stacker volume information only.
/tUses the TMP or TEMP directory for the output file.
/?Displays the abbreviated online help.

TASKMGR

TASKMGR

TASKMGR is a menu-driven utility to load more than one DOS program simultaneously and switch between them. The following syntax and parameters are valid for systems with a 386 or higher processor and at least 2MB of memory. Background programs continue to run when in multitasking mode.

Syntax

TASKMGR /M /S /? /S?

Parameters and Switches

/MAllows you to switch with the numbers on the main keyboard. Normally, you switch between tasks in TASKMGR by using the keys on the numeric keypad.
/SLoads TASKMGR in task-switching mode instead of multitasking. In task-switching mode, background applications are suspended.
/?Displays abbreviated help for multitasking.
/S?Displays abbreviated help for task switching.

Notes

Use the DR DOS setup utility to configure and load TASKMGR permanently.

TIME 1.0 and later—Internal

TIME 1.0 and later—Internal
TIME 1.0 and later—Internal

The TIME command can display and set the current time for your computer. Normally, DOS and your computer's hardware attempt to keep the time set properly. If you don't have an AUTOEXEC.BAT file, DOS prompts you to enter the current date each time your computer reboots.

Syntax

TIME  hh:mm:ss.xx  A|P

To display the time and have DOS prompt you to enter a new time, use the following format:

TIME

Parameters and Switches

hhThe one- or two-digit number that represents hours (0 to 23). To set the time, this parameter is required.
mmThe one- or two-digit number that represents minutes (0 to 59). This param eter is optional.
ssThe one- or two-digit number that represents seconds (0 to 59). This parameter is optional.
xxThe one- or two-digit number that represents hundredths of a second (0 to 99). This parameter is optional.
A|PEntering an A or a P can designate a.m. or p.m., respectively. You can use upper- or lowercase letters. If you do not use A or P, you must enter the time in 24-hour (military) format.

Notes

  1. Depending on the country code setting in your CONFIG.SYS file, a comma may be the separator between seconds and hundredths of seconds. (Refer to the section on the COUNTRY command earlier in this command reference.)

  2. The TIME command sets the computer's internal 24-hour clock. The time and date are recorded in the directory when you create or change a file. This information can help you find the most recent version of a file when you check your directory.

  3. Most PCs use an internal clock, backed up by a battery, that is accurate to about one minute a month, so you rarely have to set the time after you set it initially. If your system does not retain the time after you turn off your computer, however, put TIME and DATE commands in your AUTOEXEC.BAT file so that DOS does not default to a nonsense time and date when you turn on your computer.

  4. If you press Enter after the time prompt, DOS does not change the current time.

See Also

COUNTRY= and DATE

Issuing the TIME Command” in Chapter 10

TIMEOUT

TIMEOUT
TIMEOUT

TIMEOUT specifies how long to wait for a user response to a SWITCH or ? statement in a CONFIG.SYS file. In the case of SWITCH, after the specified TIMEOUT period, the first option is executed. In the case of ?, the command that ? applies to is skipped. TIMEOUT should precede the SWITCH or ? statement in the CONFIG.SYS file.

Syntax

TIMEOUT=n

Parameters and Switches

=n

Time to wait in seconds.

See Also

? and SWITCH

TOUCH

TOUCH

TOUCH modifies the date and time DOS lists for a file or set of files.

Syntax

TOUCH drive:pathfilespec /T:hh:mm:ss /D:date /F:E|J|U /P /R /S /?

Parameters and Switches

drive:pathfilespecThe path and filename or file specification for which to change the date or time.
/T:hh:mm:ssSets the file time in hours hh starting at 00 for midnight and running to 23, minutes mm from 0 to 59, and seconds ss from 0 to 59.
/D:date

Sets the file date. The date format is determined by your system country code.

Europe date format is dd-mm-yyyy

Japan date format is yyyy-mm-dd

U.S. date format is mm-dd-yyyy

/F:E|J|UOverrides the system country code and uses European, Japanese, or U.S. date format.
/PPrompts before changing the date or time of each file.
/RIncludes read-only files when changing the date and time.
/SIncludes files in subdirectories when changing files according to a filespec.
/?Displays abbreviated help.

TREE 2.0 and later—External

TREE 2.0 and later—External
TREE 2.0 and later—External

The TREE command displays a visual representation of the subdirectory structure on your disk, which is often referred to as the directory tree. TREE can be useful for printing a map of your hard drive if you redirect its output to your printer.

Syntax

TREE  drive:path  /F  /A

Parameters and Switches

drive:Specifies the drive that holds the disk for which you want to display the directory structure. If you omit drive:, DOS assumes the current drive.
pathSpecifies the subdirectory in which you want the examination to start. If you omit path, DOS displays a directory tree that starts with the current directory.
/FDisplays all files in each directory. Using the /F switch can make the output generated by TREE rather lengthy.
/AUses ASCII characters rather than the default graphics characters to display the connection of subdirectories. If you are redirecting the output of TREE to your printer, you might want to use this switch. Not all printers can print the block graphics characters that TREE uses in its display.

See Also

CD or CHDIR, DELTREE, MD or MKDIR, MOVE, and RD or RMDIR

Listing Directories with TREE” in Chapter 5

TUNER

TUNER

TUNER displays the Stacker online tuner interface, allowing the choice of compression speed for the system.

Syntax

TUNER /m /?

Parameters and Switches

/mUses the monochrome display mode.
/?Displays the abbreviated online help.

TYPE 1.0 and later—Internal

TYPE 1.0 and later—Internal
TYPE 1.0 and later—Internal

The TYPE command displays the contents of a file onscreen. If the file is an ASCII text file, you are able to read it. If it's a binary file, however, the screen may seem to fill up with gibberish while beeping, and you may think you've broken your computer. No harm has been done, but displaying binary files onscreen is a fairly useless operation. The CLS command cleans up the mess for you.

Syntax

TYPE  pathname

Parameters and Switches

pathnameThe file that you want TYPE to display. If you do not specify a drive, DOS assumes the current drive. If you do not specify a subdirectory path, DOS assumes the current directory. The filename portion of this parameter is required. Wildcards are not allowed.

Notes

  1. The TYPE command displays a file's characters onscreen. You can use TYPE to see a file's contents.

  2. Strange characters appear onscreen when you use TYPE for some data files and most program files because TYPE tries to display the machine-language instructions as ASCII characters.

  3. As you can with most other DOS commands, you can redirect the output of TYPE to the printer by adding > PRN to the command line or by pressing Ctrl+PrtSc. Don't forget to press Ctrl+PrtSc again to turn off the printing instruction.

  4. To keep the contents of a long file from scrolling off the screen before you can read them, you can pipe the output of TYPE through MORE. Alternatively, you can press Ctrl+S to stop the display and Ctrl+Q to restart it.

Examples

To display the contents of the DOS README.TXT file one screen at a time, use the following command:

TYPE  C:DOSREADME.TXT  |  MORE

See Also

MORE

Viewing Files” in Chapter 8

UMBCGA.SYS

UMBCGA.SYS
UMBCGA.SYS

UMBCGA.SYS maps the video memory of a color adapter as upper memory blocks (UMBs) that are used for loading programs with the LOADHIGH command if a CGA, EGA, or VGA adapter also is present in combination with a monochrome adapter.

UMBCGA.SYS is one of the installable device drivers provided with DOS. You must load it by using either a DEVICE= or DEVICEHIGH= command in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathumbcga.sys

Parameters and Switches

drive:pathLocation of the device driver file.

Notes

Programs that directly write into color adapter memory are likely to crash the computer. UMBCGA.SYS includes defense mechanisms, but they are not foolproof.

UMBEMS.SYS

UMBEMS.SYS
UMBEMS.SYS

UMBEMS.SYS maps a 64KB block of EMS memory as upper memory blocks (UMBs) that are used for loading programs with the LOADHIGH command if an EMS card with at least 64KB of EMS also is present in a computer.

UMBEMS.SYS is one of the installable device drivers provided with DOS. You must load it by using either a DEVICE= or DEVICEHIGH= command in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathumbems.sys

Parameters and Switches

drive:pathLocation of the device driver file.

UMBHERC.SYS

UMBHERC.SYS maps the video memory of a Hercules adapter as upper memory blocks (UMBs) that are used for loading programs with the LOADHIGH command if a Hercules graphics adapter or Hercules Graphics Adapter Plus also is present.

UMBHERC.SYS is one of the installable device drivers provided with DOS. You must load it by using either a DEVICE= or DEVICEHIGH= command in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathumbherc.sys /x

Parameters and Switches

drive:pathSpecifies the location of the device driver file.
/xOmits the video memory DMA test during startup. This switch should be used only after an adapter has successfully passed the test. Adapters that fail this test are not compatible with UMBHERC.SYS.

Notes

Programs that use the Hercules card in its graphics modes are incompatible with this device driver. If the Hercules card is one of the RAMFONT type, any program that uses the RAMFONT capability also is incompatible with this device driver.

UMBMONO.SYS

UMBMONO.SYS
UMBMONO.SYS

UMBMONO.SYS maps the video memory of the monochrome adapter as upper memory blocks (UMBs) that are used for loading programs with the LOADHIGH command if a CGA, EGA, or VGA adapter also is present.

UMBMONO.SYS is one of the installable device drivers provided with DOS. You must load it by using either a DEVICE= or DEVICEHIGH= command in the CONFIG.SYS file.

Syntax

DEVICE=drive:pathumbmono.sys

Parameters and Switches

drive:pathLocation of the device driver file.

Notes

Programs that directly write into monochrome adapter memory are likely to crash the computer. UMBMONO.SYS includes defense mechanisms, but they are not foolproof.

UNCOMP

UNCOMP

UNCOMP uncompresses all the data stored in the Stacker drive, storing it on the original uncompressed disk. The stacvol file is deleted.

Syntax

UNCOMP drive: /?

Parameters and Switches

drive:Indicates the Stacker drive to decompress.
/?Displays the abbreviated online help.

UNDELETE 5.0 and later—External

UNDELETE 5.0 and later—External
UNDELETE 5.0 and later—External
UNDELETE 5.0 and later—External

UNDELETE recovers files that were deleted with the DEL command. In DOS 5.0, UNDELETE uses MIRROR's delete tracking file (if available) to restore a deleted file. In DOS 6, UNDELETE uses a delete sentry file or a delete tracking file (if either exists) to restore a deleted file. Either version may be able to restore a deleted file without any special files if the file was deleted recently and little disk activity has occurred since the deletion.

Syntax

In DOS 5.0, use the following format:

UNDELETE  pathname  /LIST  /DT  /DOS  /ALL

In DOS 6, to load the memory-resident program that UNDELETE uses for delete sentry and delete tracking protection, use the following format:

UNDELETE  /LOAD  /Sdrive  /Tdrive-entries

In DOS 6, to manipulate UNDELETE, use the following format:

UNDELETE  /LIST  /ALL  /PURGEdrive  /STATUS  /UNLOAD

In DOS 6, to undelete one or more files, use the following format:

UNDELETE  pathname  /DT  /DS  /DOS  /LIST  /ALL

Parameters and Switches

pathnameSpecifies the file or files that you want to undelete. If you do not specify a drive, DOS assumes the current drive. If you do not specify a subdirectory path, DOS assumes the current directory. Wildcards are allowed. If you omit this parameter, DOS undeletes all deleted files in the current directory.
/ALLRestores files without prompting. The Delete Sentry method is used if it is available. Otherwise, the Delete Tracker method is used, if it is available. If neither method is available, the normal DOS directory method is used (see the “Notes” section for this command). You can use /ALL with any of the other switches.
/DOSRestores files that DOS lists as deleted. UNDELETE prompts you before each file is restored.
/DSRecovers only the files listed in the SENTRY directory. UNDELETE prompts you before each file is restored.
/DTRestores only the files listed in the delete tracking file. UNDELETE prompts you before each file is restored.
/LISTProvides a list of deleted files but does not undelete them. The type of list produced varies with the use of the /DT, /DS, and /DOS switches.
/LOADLoads the Undelete memory-resident program into conventional memory, using the UNDELETE.INI file. If that file does not exist, UNDELETE creates a default UNDELETE.INI file.
/PURGEdriveDeletes the contents of the SENTRY directory created by Delete Sentry protection. drive defaults to the current drive.
/SdriveEnables Delete Sentry protection and loads the Undelete memory- resident program into memory, using the UNDELETE.INI file. drive defaults to the current drive.
/STATUSDisplays the type of protection in effect for each drive.
/Tdrive-entriesEnables Delete Tracker protection and loads the Undelete memory- resident program into memory, using the UNDELETE.INI file. The drive parameter is the drive for which you want Delete Tracker protection. entries is a number (ranging from 1 through 999) that specifies the maximum number of entries in the delete tracking file, PCTRACKR.DEL. DOS determines the default value by the factors in the following list:
 Disk SizeEntriesPCTRACKR.DEL Size
360KB255KB
720KB509KB
1.2MB7514KB
1.44MB7514KB
20MB10118KB
32MB20236KB
Larger than 32MB30355KB
/UNLOADUnloads the Undelete memory-resident program from memory, disabling Delete Tracker or Delete Sentry protection if either was active. UNDELETE is unable to release the memory it was using if any other memory-resident software has been loaded after it.

Rules

  1. UNDELETE cannot restore deleted subdirectories.

  2. UNDELETE cannot restore a file if you deleted the subdirectory that contained the file.

  3. Do not use Delete Tracker for any drive that has been redirected with JOIN or SUBST.

Notes

  1. UNDELETE restores deleted files, using the delete tracking or delete sentry file (if either exists), or the standard DOS directory.

  2. Delete Sentry provides the highest level of protection by saving deleted files in a SENTRY directory. The size of the SENTRY directory (including the files that it contains) is limited to approximately 7 percent of your disk. DOS purges old files to make room for new ones.

  3. Delete Tracker provides an intermediate level of protection by maintaining a hidden file called PCTRACKR.DEL that records the locations of a file's allocation units (clusters). You can recover a deleted file until its freed allocation units are allocated to a new file. Delete Tracker takes the same amount of memory as Delete Sentry.

  4. When you delete a file, DOS removes the first character in the filename. If you use UNDELETE with the /DOS switch, you are prompted for a character to replace the missing first character. If you use the /ALL switch, and if a delete tracking or delete sentry file does not exist, UNDELETE restores each deleted file without prompts, using the character # as the first character of the filename. A deleted file named BETTER.TXT, for example, is undeleted as #ETTER.TXT.

    If BETTER.TXT and LETTER.TXT are deleted, DOS restores BETTER.TXT as #ETTER.TXT and LETTER.TXT as %ETTER.TXT. UNDELETE tries the following replacement characters for the first letter of the filename, in the order shown, until a unique filename is found:

    • The pound sign (#)

    • The percentage sign (%)

    • The ampersand (&)

    • The digits 0 through 9

    • The characters A through Z

  5. Although UNDELETE enables you to recover files that you deleted accidentally, do not use this command as a substitute for backing up data. Be sure to keep up to date backups of your data.

Examples

For the following examples, assume that the DOS commands are stored in a directory that is in your PATH.

To restore all deleted files in the root directory of drive C without prompting for confirmation on each file, use this command:

C:UNDELETE  /ALL

To provide a list of all currently deleted files, use the following command:

UNDELETE  /LIST

To create C:PCTRACKR.DEL to track up to 200 deleted files on drive C and load the memory-resident portion of UNDELETE, use this command:

UNDELETE  /TC-200

See Also

MWUNDEL and UNFORMAT

Recovering Deleted Files with UNDELETE” in Chapter 9

UNFORMAT 5.0 and later—External

UNFORMAT 5.0 and later—External

The UNFORMAT utility can recover a disk that was inadvertently reformatted. In DOS 5.0, UNFORMAT uses the files produced by the MIRROR command (if those files are available) to restore the disk to its condition before reformatting. In DOS 5.0 and 6, you probably can unformat disks if they were not formatted with FORMAT /U. The UNFORMAT command works on both hard disks and floppy disks.

Syntax

UNFORMAT  drive:  /J  /L  /P  /U  /TEST  /PARTN

Parameters and Switches

drive:Specifies the drive where the deleted file resides. This parameter is required.
/JConfirms that the MIRROR command contains the necessary information to restore the disk. This switch does not unformat the disk.
/LLists all files and directory names found. If used with the /PARTN switch, /L displays current partition tables. The default (no /L) is to list only subdirectories and fragmented files.
/PDirects all output to the printer connected to LPT1.
/PARTNRestores the partition table of a hard disk. You must use the PARTNSAV.FIL file created by the MIRROR /PARTN command.
/TESTShows how UNFORMAT will re-create the information on the disk. Like the /J switch, this switch does not actually unformat the disk.
/UUnformats without using the mirror files.

Rules

  1. To unformat your hard disk, you first must reboot from drive A, using a specially prepared floppy disk (see the “Notes” section for this command).

  2. If you format a floppy disk by using the FORMAT /U switch, UNFORMAT cannot restore the disk.

  3. UNFORMAT works only on disks that use sector sizes of 512, 1024, or 2048 bytes.

  4. The /J, /U, and /PARTN parameters for UNFORMAT were omitted from the documentation for MS-DOS 6, but UNFORMAT still supports them. They are included in the FASTHELP that you display by entering UNDELETE /? at the DOS command prompt.

Notes

  1. UNFORMAT attempts to recover a formatted disk by using the MIRROR.FIL and MIRORSAV.FIL files created by the MIRROR command or by using information in the disk's root directory and file allocation table. The second process is slower and less reliable than the first.

  2. To prepare for the eventuality that you may need to use UNFORMAT, format a floppy disk (using the /S switch to make the disk bootable) and then transfer the UNFORMAT.EXE file to that disk. Also, transfer the CONFIG.SYS files, the AUTOEXEC.BAT files, and any device drivers needed for the computer's operation. Thereafter, if you accidentally format the hard disk, you can boot from the floppy disk and perform an UNFORMAT operation.

    Before you use UNFORMAT to recover the disk, use the command with the /J or /TEST switches to determine whether your mirror files are up to date or whether the UNFORMAT command can recover files in the way that you want.

  3. In DOS 6, UNFORMAT cannot recover fragmented files. DOS asks you whether you want to recover such files by truncating them at the end of their contiguous sectors.

See Also

MIRROR and UNDELETE

Unformatting a Disk” in Chapter 9

UNINSTALL

UNINSTALL

If you install DR DOS on a system that already contains an operating system, UNINSTALL removes DR DOS and restores the previous operating system if you saved the OS during DR DOS setup. UNINSTALL also is used to delete the saved old OS files if you determine that you no longer need them. When you do that, you cannot uninstall DR DOS and restore the old OS by using this command.

Syntax

UNINSTALL /C /?

Parameters and Switches

/CRemoves the old operating system files.
/?Displays abbreviated help.

UNPACK2

UNPACK2

UNPACK2 unpacks bundled files from PC DOS disks.

Syntax

UNPACK2 drive:path source_drive:destination_path /v /p /c /n:specific_file /?

or

UNPACK2 drive:path source_ drive:destination_path /show /sizes /?

Parameters and Switches

drive:pathIndicates the location of the UNPACK2 file.
sourceSpecifies the name of the bundle from which to unpack files.
destination_pathSpecifies the directory to unpack to.
/vWrites with VERIFY.
/pPrepends the command-line path to the packed file path.
/cCreates a target directory if it does not exist.
/n:specific_fileUnpacks a designated file from a bundle.
/showShows all packed files in a bundle.
/sizesShows the size of packed files in a bundle.
/?Displays the abbreviated online help.

Notes

The /sizes switch must be used with the /show switch. It cannot be used by itself.

UNSTACK

UNSTACK

UNSTACK uncompresses a compressed Stacker drive and writes the data to an uncompressed drive.

Syntax

UNSTACK drive: /M /?

Parameters and Switches

drive:Specifies the compressed drive to be unstacked.
/MDisplays the unstack screen on a monochrome monitor.
/?Displays abbreviated help.

VER 2.0 and later—Internal

VER 2.0 and later—Internal
VER 2.0 and later—Internal

VER is a simple command that displays the version number of MS-DOS onscreen. If you ever wonder what version of DOS is running on the computer you are using, type VER at the DOS command prompt.

Syntax

VER

Notes

  1. The VER command displays a one-digit DOS version number, followed by a two-digit revision number, reminding you which DOS version the computer is using.

  2. If a computer is running a customized OEM version of MS-DOS, the name of that company is normally included in the line that VER displays. For instance, Compaq computers usually display the name COMPAQ along with the DOS version number. IBM versions normally display PC DOS instead of MS-DOS.

  3. VER is unaffected by the SETVER program. VER always displays the actual version of DOS that the computer is running.

Examples

To display the version of MS-DOS that's running on a computer, enter the VER command at the DOS prompt as follows:

VER

For MS-DOS 6.22, the following line is displayed onscreen:

MS-DOS Version 6.22

VERIFY 2.0 and later—Internal

VERIFY 2.0 and later—Internal
VERIFY 2.0 and later—Internal

Normally, when DOS writes information to a disk, it trusts the disk hardware to make sure that the data was stored safely. If you want to be absolutely sure, you can enter VERIFY ON; DOS then reads back all the data written to disk and compares it to make sure that it was stored safely. Using VERIFY ON, however, slows down disk-write operations substantially, so this additional level of protection doesn't come without a price.

Syntax

VERIFY  onoff

Parameters and Switches

onoffSpecifies whether you want to turn on (VERIFY ON) or off (VERIFY OFF) this command. If you omit this parameter, the current state of the verify flag is displayed.

Notes

  1. By default, when DOS starts up, VERIFY is OFF.

  2. VERIFY accepts only the parameters ON and OFF.

  3. VERIFY works by instructing the disk controller to read back all data written to disk, calculate a new CRC (error checking) value from the data read, and compare it to the CRC value stored on the disk. (The disk controller normally does this every time data is read from the disk, which is how DOS discovers bad sectors when copying files.) Any differences between the two CRC values indicates that an error has occurred. Setting VERIFY ON doesn't compare the data on disk to the data that DOS was requested to write; it only makes sure that the data written to the disk is readable.

  4. If VERIFY is set ON, you have more assurance that your data is being safely stored on disk. If VERIFY is set OFF, writing data to disk takes less time. When deciding which setting to use, you have to choose between data integrity and speed.

  5. Specifying the /V parameter for COPY, DISKCOPY, or XCOPY sets VERIFY ON for the duration of the command. When the copy operation is finished, these commands set VERIFY back to the state it was in before the command executed.

  6. The VERIFY state can be changed by a running program. Programming etiquette dictates that, when done, an application should reset any flag, such as VERIFY, to the state in which it was found. Still, you might run across applications that forget to reset VERIFY. If this causes problems, run the application from a batch file to restore the VERIFY state when the program terminates.

Examples

If you are about to update your company's accounts receivables, you might want to turn on the verify flag, as follows, before starting your accounting software:

VERIFY  ON

After you are finished, you might set the verify flag off again, as follows, so that your routine computer tasks aren't unnecessarily slowed down:

VERIFY  OFF

If you ever want to know whether the verify flag is off or on, enter the VERIFY command with no parameters at the DOS prompt like this:

VERIFY

Messages

Must specify ON or OFF

Error: The only parameters that the VERIFY command accepts are ON or OFF. Entering anything else displays the preceding error message.

VERIFY is on

or

VERIFY is off

Information: If you enter VERIFY with no parameters, one of the preceding messages is displayed, informing you of the current state of the verify flag.

VFINTD.386 6.0 and later—Windows

VFINTD.386 6.0 and later—Windows
VFINTD.386 6.0 and later—Windows

Setup installs the VFINTD.386 device driver in the [386Enh] section of SYSTEM.INI to allow Microsoft Backup for Windows access to your floppy disk drives. If you have any other Windows backup software installed, this driver often conflicts with the drivers installed for that software.

Syntax

To use Microsoft Backup for Windows, you must include the following line in the [386Enh] section of the SYSTEM.INI file:

DEVICE=drive:pathVFINTD.386

Parameters and Switches

drive:pathThe full path to the VFINTD.386 file on your system. The setup program for DOS 6 places this file in the C:DOS subdirectory by default.

Notes

  1. Almost all backup software for Windows adds a device driver to SYSTEM.INI that allows access to your tape drives and floppy disk drives. Unfortunately, few of these drivers can get along with each other, and you're usually forced to remove all but one driver before any of them will work. The following list includes some of the more common third-party drivers to look for in SYSTEM.INI:

    Driver FilenameBackup Program
    VFINTD.386Microsoft Backup for Windows (with DOS 6) and Norton Backup for Windows
    CMSDTAPE.386Colorado Tape Backup
    MYABU.386My Advanced Backup
    FASTBACK.386Fastback for Windows
    VFD.386Central Point Backup for Windows
    CPBVXD.386Central Point Backup for Windows
  2. Microsoft suggests that you disable any third-party drivers you find in SYSTEM.INI by adding a semicolon to the front of the DEVICE= line that loads them. Be aware that doing so may cause your other backup software to stop working.

  3. If your computer fails the compatibility test that Microsoft Backup for Windows runs, you are probably having a driver conflict in SYSTEM.INI. If this happens, quit Windows, “comment out” any lines in SYSTEM.INI that load third-party backup drivers (see the preceding Driver table), restart Windows, and try the test again. As long as you comment out the driver lines (by placing a semicolon at the beginning of the line) instead of deleting them, you can easily restore them when you want to use your other backup software.

  4. Be aware that Windows does not recognize any changes you make in SYSTEM.INI until you quit Windows completely and restart it from the DOS prompt.

Examples

Setup for DOS 6 adds the following line to the [386Enh] section of your SYSTEM.INI file when it installs Microsoft Backup for Windows on your computer:

DEVICE=C:DOSVFINTD.386

Setup does not, however, comment out third-party drivers in SYSTEM.INI that are known to cause conflicts with the VFINTD.386 driver.

VIEW

VIEW

You can use VIEW to view an online document.

Syntax

VIEW drive:pathfilename.inf /?

Parameters and Switches

drive:pathfilename.infSpecifies the location and name of the file to view. The following three online documents are available:
 CMDREF.INFPC DOS 7 Command Reference
DOSREXX.INFPC DOS 7 REXX Reference
DOSERROR.INFPC DOS 7 Error Messages
/?Displays the abbreviated online help.

VOL 2.0 and later—Internal

VOL 2.0 and later—Internal
VOL 2.0 and later—Internal

VOL displays the volume label and serial number of a disk if they exist. The volume label is simply a name that you can assign when you format a disk or later when you use the LABEL command. DOS began adding serial numbers to disks with DOS 4.0.

Syntax

VOL  drive:

Parameters and Switches

drive:The drive whose label and serial number you want to display. If you omit this parameter, DOS assumes the current drive.

Notes

  1. You can add a label to a disk when you format it by using the FORMAT /V command or later by using the LABEL command.

  2. The serial number is a unique identifier assigned to the disk when it's formatted. DOS uses the serial number to verify that a disk hasn't been changed in disk drives that don't have change line support. Preformatted disks often do not have serial numbers on them, and some third-party formatting utilities neglect to add them, as well. DOS may be unable to tell whether you have changed a floppy disk if it has no serial number and your drive doesn't have change line support.

  3. DOS can assign serial numbers to a disk only with the FORMAT command. You can't add or change the serial number of a disk without reformatting it.

Examples

To display the volume label of a floppy disk in drive B:, enter the following command at the DOS prompt:

VOL  B:

If you omit the drive: parameter (B:), DOS assumes the current disk.

VOL displays the following messages if the disk specified has both a volume label and a serial number:

Volume in drive B: is NEW WORK
Volume Serial Number is 4EF7-9C30

If the disk has no serial number, the second line is omitted. If the disk has no volume label, the following message is displayed:

Volume in drive B: has no label

Messages

Invalid drive specification

Error: You specified an invalid drive letter in the drive: parameter.

Invalid switch - switch

Error: You specified an invalid switch parameter. The only parameter that VOL accepts is a single disk drive.

Too many parameters - parameter

Error: You've specified more than one parameter on the command line. The only parameter that VOL accepts is a single disk drive.

See Also

FORMAT and LABEL

Examining Volume Labels with VOL” in Chapter 7

VSAFE 6.0 and later—External

VSAFE 6.0 and later—External
VSAFE 6.0 and later—External
VSAFE 6.0 and later—External

VSAFE is a memory-resident utility that can monitor the activity in your computer. If any program is acting suspiciously, VSAFE can halt the process and request guidance from you as to what to do about it.

Syntax

VSAFE  /option+|- ... /NE  /NX  /Akey  /Ckey  /N  /D  /U

Parameters and Switches

/AkeySets the hot key as Alt plus the key specified by key.
/CkeySets the hot key as Ctrl plus the key specified by key.
/DTurns off checksumming.
/NInstructs VSAFE to monitor network drives.
/NEPrevents VSAFE from loading into expanded memory.
/NXPrevents VSAFE from loading into extended memory.
/option+|- ...Specifies how VSAFE checks for viruses. Use a plus sign (+) after option to enable the switch; use a minus sign (-) after option to disable it. Choose option from the following list:
 1Warns of low-level formatting that could erase your hard disk (default: on)
2Warns of a program's attempt to stay resident in memory (default: off)
3Prevents programs from writing to any of your disks (default: off)
4Checks executable files that DOS opens for viruses (default: on)
5Checks all disks for boot sector viruses (default: on)
6Warns of attempts to write to the boot sector or to the partition table of the hard disk (default: on)
7Warns of attempts to write to the boot sector of a floppy disk (default: off)
8Warns of attempts to modify executable files (default: on)
/UDisables and unloads VSAFE from memory. If VSAFE wasn't the last resident program loaded, the memory it was using will not be released.

Rules

  1. Turn off VSAFE before you install Microsoft Windows.

  2. Do not use VSAFE after you start Microsoft Windows.

  3. If you use VSAFE with Microsoft Windows, run the MWAVTSR.EXE memory-resident program by adding the following line to your WIN.INI file:

    LOAD=C:DOSMWAVTSR.EXE
    

    MWAVTSR.EXE enables VSAFE messages to be displayed in Windows.

  4. The default hot key is Alt+V.

Notes

VSAFE is a memory-resident program that takes up a varying amount of conventional, extended, and expanded memory. In DOS 6.0 and higher, VSAFE takes up 44KB of conventional memory, 23KB of conventional and 23KB of extended memory, or 7KB of conventional and 64KB of expanded memory.

Examples

To turn on warnings about programs' attempts to stay in memory, to turn off checks for boot sector viruses, and to make Alt+Q the hot key, use the following command:

VSAFE  /2+  /5-  /AQ

See Also

MSAV, MWAV, and MWAVTSR

Guarding Against Infection” in Chapter 9

WINA20.386 5.0 and later—Windows

WINA20.386 5.0 and later—Windows
WINA20.386 5.0 and later—Windows

Windows 3.0 enhanced-mode drivers often require the help of the WINA20.386 driver to perform their duties. Setup for MS-DOS 6 places this driver in the root directory if it finds Windows installed on your system. If you move the WINA20.386 file to another subdirectory, you need to tell Windows where it is and add a SWITCHES=/W line to your CONFIG.SYS file.

Syntax

To tell Windows where you have located the WINA20.386 driver, include the following line in the [386Enh] section of SYSTEM.INI:

DEVICE=drive:pathWINA20.386

Parameters and Switches

drive:pathThe full path to the WINA20.386 file on your system. The setup program for DOS 6 places this file in the root directory of the startup drive by default.

Notes

Windows 3.0 in enhanced mode requires the WINA20.386 driver file to be available before it can load. (See the first message in the following “Messages” section.) If you want to move the WINA20.386 file out of your root directory, you need to specify the /W switch in CONFIG.SYS and add a DEVICE=drive:pathWINA20.386 line to the [386Enh] section of your SYSTEM.INI file. You should specify the full drive and path to WINA20.386 in the device line in SYSTEM.INI.

Note

Windows 3.1 will load successfully in enhanced mode without access to the WINA20.386 driver, but any version 3.0 drivers that you're using may still require the services of the WINA20.386 driver. If they do and that driver is unavailable, Windows may become unstable or crash. Because enhanced-mode drivers for Windows are distributed with many software packages, most people are running Windows 3.1 with Windows 3.0 drivers without knowing it. To be safe, be sure that the WINA20.386 driver is available, either in the root directory or through the /W switch and a device line in SYSTEM.INI.

Examples

Although you use Windows version 3.1, you're not sure whether all your Windows enhanced-mode drivers have been updated yet and want to make sure that the WINA20.386 driver is available, just in case. Because you've moved the WINA20.386 file into the C:DOS subdirectory with your other DOS 6 files, you need to include the following line in your CONFIG.SYS file:

SWITCHES=/W

Now that DOS knows you've moved WINA20.386, you need to tell Windows where you put it. To do so, add the following line to the [386Enh] section of your SYSTEM.INI file, which is in your main Windows subdirectory:

DEVICE=C:DOSWINA20.386

Messages

You must have the file WINA20.386 in the root directory of your boot drive to
run Windows in Enhanced Mode

Error: This message is displayed only if you are running Windows 3.0 in enhanced mode and the WINA20.386 file is not present in your root directory. To allow Windows 3.0 to run in enhanced mode with the WINA20.386 driver located somewhere else, specify the SWITCHES=/W command in your CONFIG.SYS file and enter a DEVICE=drive:pathWINA20.386 line in the [386Enh] section of SYSTEM.INI.

See Also

SWITCHES=

XCOPY 3.2 and later—External

XCOPY 3.2 and later—External
XCOPY 3.2 and later—External

XCOPY can copy groups of files and subdirectories from one disk to another. When copying large groups of files, XCOPY is somewhat faster than COPY because it reads more than one file at a time into memory.

Syntax

XCOPY  source  destination  /A  /D:date  /E  /M  /P  /S  /V  /W  /Y  /-Y

Parameters and Switches

sourceSpecifies the file or files that you want to copy. You can specify a full pathname (that is drive:path...filename.ext), and wildcards are allowed. This parameter is required. If you include a drive and/or path but no filename, DOS assumes all files (*.*).
destinationSpecifies the location and optionally the filename or names to which you want to copy. You can specify a full pathname, although normally just a drive and/or path is included. Wildcards are allowed when a filename is specified. If you omit this parameter, DOS uses the current drive and subdirectory as the destination.
/ACopies only files whose archive attribute is on (modified files) but doesn't turn off the archive attribute. /A is similar to /M, except that /A does not reset the archive attribute.
/D:dateCopies only files that were changed or created on or after the date you specify. The date's form depends on the setting of the COUNTRY= command in CONFIG.SYS.
/ECreates parallel subdirectories on the destination disk, even if the original subdirectory is empty.
/MCopies only files whose archive attribute is on (modified files) and turns off the archive attribute. /M is similar to /A, except /M resets the archive attribute.
/PCauses XCOPY to prompt you for approval before copying each file.
/SCopies all directories and subdirectories below source that contain files.
/VVerifies that the copy was written correctly.
/WCauses XCOPY to prompt you and wait for your response before starting the copy operation. You can use this switch to give yourself time to insert the source floppy disk, for example.
Parameters and Switches /YSpecifies that you want XCOPY to overwrite files without prompting you for confirmation. Including this parameter overrides any setting specified with the COPYCMD environment variable.
Parameters and Switches /-YSpecifies that you want XCOPY to prompt you for confirmation before overwriting any files, even if the command is run from within a batch file. Including this parameter overrides any setting specified with the COPYCMD environment variable.

Exit Codes

ERRORLEVEL ValueMeaning
0Extended copy operation successful
1No files found to copy
2Halted by user (Ctrl+C)
4Copy operation failed—Invalid drive letter, invalid switches or parameters, not enough memory, or not enough disk space
5Halted by fatal error writing to disk

Rules

  1. You must specify the source drive, path, and filename first, and then the destination drive, path, and filename.

  2. Do not use a device name other than a drive for source or destination. For example, you cannot use LPT1: or COM1:.

  3. The source file specified must include one or both of the following:

    • A valid filename. Wildcards are permitted.

    • A drive name, a pathname, or both.

  4. If you do not specify the source drive name, DOS uses the current drive.

  5. If you do not specify the source path, DOS uses the drive's current directory.

  6. If you specify a drive or path for the source but do not specify a source filename, DOS assumes all files (*.*).

  7. If you omit a new name for the destination file, the copied file has the same name as the source file.

  8. If you do not specify a destination parameter, the source parameter must include one or both of the following:

    • A drive name other than the current drive.

    • A pathname other than the current disk's current directory.

  9. XCOPY sets the archive bit on for the files it creates.

Notes

  1. Notes Starting with DOS 6.22, the XCOPY command, when run from the command line, prompts you for confirmation before overwriting files. However, to avoid forcing you to rewrite all your batch files, XCOPY does not prompt you before overwriting a file when run from a batch file.

    If you don't like XCOPY's new behavior, you can change it by defining an environment variable named COPYCMD. Setting COPYCMD equal to /Y forces XCOPY to act as it did in all previous versions of DOS, never prompting for confirmation before overwriting a file. If you set COPYCMD equal to /-Y, XCOPY always prompts for confirmation, even when it's run from within a batch file.

  2. To use XCOPY to copy more files than fit on one destination disk, make sure that the files' archive attribute is on. You can use the ATTRIB command to perform this step. Then use the XCOPY command repeatedly with the /M or /M /S switches.

    When the destination floppy disk is full, change floppy disks and reissue the command. The files that were copied now have their archive attribute turned off, so XCOPY skips these files. XCOPY copies the files not already copied—those files that have the archive attribute turned on.

  3. XCOPY and APPEND /X are a troublesome combination. To use XCOPY on a disk that is in volved in an APPEND command, disconnect APPEND before you execute the XCOPY command.

  4. Use XCOPY, rather than DISKCOPY, to copy files to a device that is not the same format as the source.

Messages

Cannot perform a cyclic copy

Error: You used the /S switch, and at least one of the destination directories is a subdirectory of the source directories. When you use /S, XCOPY cannot copy files to destination directories that are part of the source directories. If you must copy files from more than one directory, issue individual XCOPY commands to copy the directories one at a time.

Cannot XCOPY from a reserved device

Error: You specified one of DOS's reserved device names (for example, LPT1) as the source of the files to be copied. Reissue XCOPY, using a disk path and directory.

Does pathname specify a filename
or directory name on the target
(F = file, D = directory)?

Information: You specified a destination filename in which the final name does not exist as a directory. XCOPY does not know whether the final name in the destination is a filename or a directory.

If the destination name is a directory name, press D. XCOPY creates the needed directory and begins copying files. If the destination name is a filename, press F. XCOPY copies files to this file.

nnn File(s) copied

Information: XCOPY copied nnn files to the destination disk. This message appears regardless of any errors that occur.

Insufficient disk space

Error: The destination disk ran out of space. The file that you were copying when the error occurred was erased from the destination. Delete any unneeded files from the destination disk, or use a different disk and then retry the command.

Reading source file(s)...

Information: XCOPY is reading the source directories for filenames.

Unable to create directory

Error: XCOPY cannot create a subdirectory on the destination disk for one of the following reasons:

  • Part of the destination pathname is wrong or misspelled.

  • The disk's root directory is full.

  • The disk is full.

  • A file with the same name as the created directory already exists.

  • You used a directory name that actually is a device name.

Be sure that the destination name is correct. Use the DIR command to check the destination disk. If the disk or the root directory is full, erase files or use another destination disk. If a file that uses the same name as the intended directory already exists, rename the file or change the directory's name when you reissue the XCOPY command.

See Also

COPY and REPLACE

“Management with XCOPY” in Chapter 8

XCOPY32

XCOPY32

XCOPY32 is functionally equal to XCOPY, but it is the 32-bit version for use with long filenames and 32-bit Windows 95 and Windows 98. All the syntax and parameters used with XCOPY are also used with XCOPY32. The following additional parameters also are available with XCOPY32:

/CForces XCOPY32 to continue copying even if errors occur.
/IMakes destination a directory if destination does not exist and you're copying more than one file.
/QCopies in quiet mode without displaying filenames onscreen.
/FDisplays full source and destination filenames while copying.
/LDisplays files that would be copied.
/HCopies hidden and system files also.
/ROverwrites read-only files.
/TCreates directory structure but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirec tories.
/UUpdates any files that already exist in destination.
/KCopies attributes. XCOPY resets read-only attributes.
/NCopies using the 8.3 DOS filename versions of long filenames.

XDEL

XDEL

XDEL is a utility to delete multiple files across subdirectories and delete empty subdirectories.

Syntax

XDEL drive:pathfilespec /D /N /O /R /P /S /?

Parameters and Switches

drive:pathfilespecSpecifies the drive, path, and filename or file specification using wildcards to be deleted.
/DDeletes empty subdirectories.
/NDeletes files with no prompts or confirmation warnings.
/OOverwrites the file with other data before deleting it, making the deletion more secure and difficult to undelete.
/RDeletes read-only files.
/PPrompts you before overwriting each file.
/SDeletes files in subdirectories.
/?Displays abbreviated help.

XDF

XDF
XDF

Using the XDF command starts the XDF program, a terminate-and-stay-resident (TSR) program that supports XDF-formatted disks.

Syntax

XDF /u /?

Parameters and Switches

/uUnloads the XDF TSR.
/?Displays the abbreviated online help.

Notes

You can use the DIR command with XDF-formatted disks to view the entire contents of the disk when the XDF program is loaded.

XDFCOPY

XDFCOPY
XDFCOPY

XDFCOPY copies the contents of an eXtended Density Format (XDF) disk.

XDFCOPY creates a temporary file on drive C during the copy process. When copying to a disk, XDFCOPY automatically formats (prepares) the target disk during the copy process. The target disk must be the same size and type as the source disk.

Syntax

XDFCOPY source_drive target_drive /y /nv /?

Parameters and Switches

source_driveSpecifies the drive that contains the disk to be copied. On systems with only one disk drive, use XDFCOPY by specifying the same drive as the source and target.
target_driveSpecifies the drive where you want to copy the disk to. If the disk to be used is not empty, any existing information is overwritten.
/yStarts without waiting for a disk change.
/nvTurns off read-after-write verify.
/?Displays the abbreviated online help.

XDIR

XDIR

XDIR is an enhanced version of the standard DIR command.

Syntax

XDIR +|-attributes d:pathfilespec /B /C /L /N /P /S /T /W /X /Y /Z /R

Parameters and Switches

+|-attributesDisplays only files that have (+) or do not have (-) the specified attributes. See the DIR command for each of the attributes.
d:pathfilespecSpecifies the drive and directory for which to list files. A filespec that includes wildcards limits the listing to matching files.
/BDisplays only the file path and name.
/CComputes and displays checksum for each file that you can use to verify that two files are identical.
/LDisplays the long display format with full information about each file and subdirectory.
/NDisplays files in the order they appear on the drive.
/PPauses after each page is displayed.
/SIncludes files in subdirectories in the listing.
/TDisplays files sorted by date and time.
/WDisplays only filenames in wide format.
/XDisplays files sorted by extension.
/YDisplays files sorted by Stacker compression ratio for files on Stacker drives.
/ZDisplays files sorted by file size.
/RDisplays the files in reverse sort order when used with /T, /X, /Y, or /Z.

See Also

DIR
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.113.229