  -6-


  CHAPTER 1 / GENERAL CONCEPTS


  You can start using 4DOS, 4OS2, or 4NT as soon as you finish
  installing it, because each of our products is compatible with the
  traditional commands you're probably used to.  But most users find
  that the more they know about their computer systems, the more
  power they get from our products.  And, the more experience they
  gain, the more they want to know about their computer system as a
  whole.

  This section of the manual explains some fundamental concepts
  about your computer, operating system, and 4DOS, 4OS2, and 4NT.
  It should help you understand the terms and concepts in the pages
  that follow.  If you find some of the concepts overwhelming, just
  remember that they are here when you need them.  If you find this
  material too simple, skim over the topics and then go on to the
  next section.  Each topic in this chapter is independent, so if
  you read it straight through you won't necessarily find a natural
  "flow" from one topic to another.

  If you come across terms or concepts in this chapter that you are
  unsure about, refer to the Index, or to the Glossary in the online
  help.


  Operating Systems and Command Processors

       This section explains briefly what an operating system is,
       what a command processor is, and how the command processor
       works under DOS, OS/2, and Windows NT.

       An operating system is nothing more than a collection of
       software.  However, unlike application software, which
       performs a specific, user-oriented task (such as creating and
       printing documents, or performing calculations on rows and
       columns of numbers), operating system software is designed to
       perform some special functions.  The operating system
       typically:

            *  Starts the computer system.  The operating system is
               the first software loaded when you turn on the
               computer.

            *  Provides services to other software.  These include
               basic file access, assignment of your computer's
               memory for use by different programs, and the control
               of hardware devices like the keyboard, display,
               printer, and serial ports.

            *  Ensures that programs don't interfere with each other
               while they are running.

            *  Provides a way for you to start programs to do your
               work.
  -7-

            *  Includes utilities to control and manage your system,
               for example to organize disks and files, display
               status information, or adjust your system for
               international conventions.

       More complex operating systems may include many more
       functions, such as built-in network connections, the ability
       to switch rapidly between many tasks, support for high-
       quality sound output, and so on.

       Our products run under the DOS, Windows 95, Windows NT, and
       OS/2 operating systems.

       Each of these operating systems includes a command processor:
       a program that accepts your instructions and carries them
       out.  The basic operation of a command processor is very
       simple.  It prompts you for a command, you type in the
       command, the command processor executes it, and the cycle
       repeats.  This sometimes called a "command line" interface,
       because commands are typically executed line by line.

       Under DOS, the command-line interface is the only way to tell
       the operating system what you want it to do.  OS/2 and
       Windows each include a graphical user interface that is
       intended to replace the command line as the primary method
       for providing instructions to the operating system.  However,
       most OS/2 and Windows users find that the command line is
       required for some tasks, and much more efficient for many
       others.  They therefore use both the graphical interface and
       the command line, depending on the task at hand.

       The command processor shipped with DOS and Windows 95 is
       called COMMAND.COM.  The command processors shipped with OS/2
       and Windows NT are both called CMD.EXE.

       When you install 4DOS, 4DOS.COM replaces COMMAND.COM as your
       command processor.  4OS2 replaces the OS/2 version of CMD.EXE
       with 4OS2.EXE, and 4NT replaces the Windows NT version of
       CMD.EXE with 4NT.EXE.  All of these command processors are
       normal programs that know how to translate your commands into
       actions.  4DOS, 4OS2, and 4NT are simply much more powerful
       command processors than those supplied with each operating
       system.

4DOS   Under DOS and Windows 95, the command processor is typically
       started automatically at the end of the boot process.  If you
       don't want to use COMMAND.COM as your command processor, you
       use the SHELL statement in CONFIG.SYS to specify a different
       command processor.

4OS2   Under OS/2, the command processor is started whenever you
       select the appropriate object on your OS/2 desktop.  If you
       don't want to use CMD.EXE as your command processor, you use
       the SET OS2_SHELL statement in CONFIG.SYS to specify a
       different command processor.
  -8-

       Because OS/2 includes the ability to run DOS programs, it
       also includes a copy of COMMAND.COM as its default DOS
       command processor.  You can change to a different DOS command
       processor with the SHELL statement in the OS/2 CONFIG.SYS
       file.

4NT    Under Windows NT, there is no CONFIG.SYS file, and no special
       way to specify a default command processor.  Instead, you
       simply create a desktop object for any command processor you
       want to use.

       When you install 4DOS, 4OS2, or 4NT, the installation program
       can make the appropriate changes to CONFIG.SYS and / or
       create the necessary desktop objects for you.


       Primary and Secondary Shells

       Technically, the command processor is a shell:  a program
       that understands your commands and makes the correct calls to
       the underlying operating system to perform various tasks,
       including running programs.

4DOS   Under DOS, the command processor that runs when the computer
       boots up, or when an OS/2 DOS session starts, is called the
       primary shell.

       Any command processor that is started as a "child" to a
       primary shell is a secondary shell.  Typically, secondary
       shells are started by application programs with a "shell to
       the command prompt" feature, and by multitasking environments
       like Windows or DESQView.  A secondary shell has most of the
       same features as a primary shell.

       There are a few differences between primary and secondary
       shells under DOS.  Generally, less memory is available when a
       secondary shell is running, because at least part of the
       program that started it is still in memory waiting to spring
       back to life when you exit.  And normally only the primary
       shell automatically executes the instructions in your
       AUTOEXEC.BAT file.

       Under DOS you can leave a secondary shell with the EXIT
       command, but there is normally no way to exit from the
       primary shell, because DOS requires a shell present to
       operate.  However, if you are running 4DOS in a DOS session
       under OS/2 version 2.0 or later you can use EXIT in the
       primary DOS shell to close the session and return to the OS/2
       desktop.

4DOS   Under Windows and Windows 95, 4DOS sessions started from the
       desktop are secondary shells because a primary shell is
       loaded before Windows starts.

4OS2,  Under OS/2 and Windows NT, each 4OS2 or 4NT session that is
4NT    started from the desktop is a primary shell.  Secondary
       shells are started by applications with a "shell to the
  -9-

       command prompt" feature, and are also used for a special kind
       of communication between programs called a pipe (see page
       61).

       Under 4OS2 and 4NT, you can exit from both primary and
       secondary shells.  When you exit from a primary shell, the
       command processor session is closed and you are returned to
       the desktop.

       Each time 4DOS, 4OS2, or 4NT starts as either a primary or
       secondary shell, it looks for and executes one or more
       "automatic" batch files.  These files are explained on page
       93.


  Files and Directories

       You may have dozens, hundreds, or thousands of files stored
       on your computer's disks.  Your operating system is
       responsible for managing all of these files.  In order to do
       so, it uses a unique name to locate each file in much the
       same way that the post office assigns a unique address to
       every residence.

       The unique name of any file is composed of a drive letter, a
       directory path, and a filename.  Each of these parts of the
       file's name is case insensitive; you can mix upper and lower
       case letters in any way you wish.


       Drives and Volumes

       A drive letter designates which drive contains the file.  In
       a file's full name, the drive letter is followed by a colon.
       Drive letters A: and B: are normally reserved for the floppy
       disk drives.

       Normally, drive C: is the first (or only) hard disk drive.
       Most current operating systems can divide a large hard disk
       into multiple logical drives or volumes that are usually
       called C:, D:, E:, etc.  Network systems (LANs) give
       additional drive letters to sections of the network file
       server drives.

       Most recent systems also include a CD-ROM drive.  The CD-ROM
       is also assigned a drive letter (or several letters, for CD-
       ROM changers), typically using letters beyond that used by
       the last hard disk in the system, but before any network
       drives.  Some systems may have "RAM disks" (sometimes called
       "virtual disks"), which are areas of memory set aside by
       software (a "RAM disk driver") for use as fast but temporary
       storage.  Like CD-ROM drives, RAM disks are usually assigned
       drive letters beyond the last hard disk in the system, but
       before network drives.

       For example, on a system with a large hard disk you might
       have A: and B: as floppy drives, C:, D:, and E: as parts of
  -10-

       the hard disk, F: as a CD-ROM drive, G: as a RAM disk, and H:
       and I: as network drives.


       File Systems

       Each disk volume is organized according to a file system.
       The file system determines how files are named and how they
       are organized on the disk.

       As hard disk technology and operating systems have evolved,
       new file systems have been invented to support longer file
       names, larger drives, and higher disk performance.  Several
       different and incompatible schemes have evolved.  Which file
       systems you can use depends on which operating system you are
       using, and how the operating system and your hard disk are
       configured.

       The operating systems under which our products run support
       five standard file systems:  FAT, VFAT, FAT32, HPFS, and
       NTFS.  See File Names on page 14 for details on the rules for
       naming files under each file system.

            *  The FAT File System is the traditional file system
               used by all versions of DOS.  Its name comes from the
               File Allocation Table DOS uses to keep track of the
               space allocated to each file.  Windows 95, Windows
               NT, and OS/2 also support the FAT file system.

            *  The VFAT File System is an extension of the FAT file
               system available in Windows NT and Windows 95,
               including DOS and 4DOS sessions run from the Windows
               95 desktop.  This system maintains additional
               information about files on FAT drives, including long
               filenames (LFNs).

               Other operating systems (OS/2 and earlier versions of
               DOS) can access files on VFAT drives, but will not be
               able to access long filenames or other information
               which is added by the VFAT file system.

            *  The FAT32 File System is an additional extension to
               the VFAT file system.  It is only available in
               Windows 95 OEM Service Release 2 ("OEMSR2") and later
               versions, and in DOS sessions run from the Windows 95
               OEMSR2 desktop.  It is similar to the VFAT file
               system, but supports larger disk drives.

               This file system is incompatible with OS/2, Windows
               NT, and earlier versions of DOS, and can only be used
               under Windows 95 OEMSR2.

               (If you are not sure whether your system is running
               Windows 95 OEM Service Release 2, use the 4DOS VER
               command to check.  VER reports MS-DOS 7.0 for the
               original Windows 95 release, and MS-DOS 7.1 or higher
               for OEMSR2 and later versions.)
  -11-

            *  The High Performance File System or HPFS is a file
               system provided with all versions of OS/2, and is
               also supported in Windows NT version 3.51 and below.
               It supports long file names, and offers higher
               performance and better support for large drives than
               the FAT or VFAT system.  It also supports "extended
               attributes" (see page 16) to retain additional
               information about your files.

               DOS sessions running under OS/2 can access files on
               HPFS drives if the files have short, FAT-compatible
               names (see page 14).  Other operating systems (DOS,
               Windows 95, and Windows NT 4.0 and above) can not
               access files on HPFS drives.

            *  The Windows NT File System or NTFS is a file system
               provided with all versions of Windows NT.  Like HPFS,
               NTFS supports long file names and offers improved
               performance and support for large drives.  However,
               NTFS does not support the "extended attributes"
               provided by HPFS.

               DOS programs running under Windows NT can access
               files on NTFS drives if the files have short, FAT-
               compatible names (see page 14).  Other operating
               systems (DOS, Windows 95, and OS/2) can not access
               files on NTFS drives.

       Throughout this manual, the term "LFN file system" is used to
       describe the VFAT and FAT32 systems as a group (LFN stands
       for Long File Name).

       Additional file systems may be installed under some operating
       systems to support CD-ROM or network drives.  In particular,
       OS/2 supports installable file systems, which are installed
       with the IFS= directive in the OS/2 CONFIG.SYS file.  This
       facility is used to add support for HPFS, CD-ROM, and network
       drives to the base OS/2 operating system.

       The file system type (FAT / VFAT, FAT32, HPFS, or NTFS) is
       determined when a hard disk volume is formatted and applies
       to the entire volume.  For example, you might have a 2 GB
       hard disk divided into four 500 MB volumes, with the first
       three volumes (C:, D:, and E:) formatted for the FAT or VFAT
       file system, and the fourth formatted for HPFS or NTFS.

       4DOS, 4OS2, and 4NT support any standard file system
       installed under your operating system.  4DOS can access files
       on FAT drives, files on VFAT and FAT32 drives under Windows
       95 (with full long filename support), and files with FAT-
       compatible names on HPFS drives when running in an OS/2 DOS
       session.  4OS2 can access files on FAT and HPFS drives, and
       files on VFAT drives using their short (traditional "8.3"
       FAT-compatible) names.  4NT can access files on FAT, VFAT,
       and NTFS drives.
  -12-

       Network File Systems

       A network file system allows you to access files stored on
       another computer on a network, rather than on your own
       system.  4DOS, 4OS2, and 4NT support all network file systems
       which are compatible with the underlying operating system
       (DOS, Windows 95, OS/2, or Windows NT).

       File and directory names for network file systems depend on
       both the "server" software running on the system that has the
       files on it, and the "client" software running on your
       computer to connect it to the network.  However, they usually
       follow the rules described here.

       Most network software "maps" unused drive letters on your
       system to specific locations on the network, and you can then
       treat the drive as if it were physically part of your local
       computer.

       Some networks also support the Universal Naming Convention,
       which provides a common method for accessing files on a
       network drive without using a "mapped" drive letter.  Names
       specified this way are called UNC names.  They typically
       appear as \\server\volume\path\filename, where server is the
       name of the network server where the files reside, volume is
       the name of a disk volume on that server, and the
       path\filename portion is a directory name and file name which
       follow the conventions described under Directories below.
       4DOS, 4OS2, and 4NT support UNC filenames if your network
       software supports them, and also allow you to use UNC
       directory names when changing directories (see Directory
       Navigation on page 51 for more details).

       When you use a network file system, remember that the naming
       conventions for files on the network may not match those on
       your local system.  For example, your local system may
       support long filenames while the network server or client
       software does not, or vice versa.  4DOS, 4OS2, and 4NT will
       usually handle whatever naming conventions are supported by
       your network software, as long as the network software
       accurately reports the types of names it can handle.

       In some cases, 4DOS, 4OS2, or 4NT may not be able to report
       correct statistics on network drives (such as the number of
       bytes free on a drive).  This is usually because the network
       file system does not provide complete or accurate information
       or, under 4DOS, because the network drive is larger than
       drives which DOS normally supports and the byte count
       therefore exceeds DOS's reporting limits.


       Directories and Subdirectories

       A file system is a method of organizing all of the files on
       an entire disk or hard disk volume.  Directories are used to
       divide the files on a disk into logical groups that are easy
       to work with.  Their purpose is similar to the use of file
  -13-

       drawers to contain groups of hanging folders, hanging folders
       to contain smaller manila folders, and so on.  Directories
       are also sometimes referred to as folders.

       Every drive has a root or base directory, and many have one
       or more subdirectories.  Subdirectories can also have
       subdirectories, extending in a branching tree structure from
       the root directory.  The collection of all directories on a
       drive is often called the directory tree, and a portion of
       the tree is sometimes called a subtree.  The terms directory
       and subdirectory are typically used interchangeably to mean a
       single subdirectory within this tree structure.

       Subdirectory names follow the same naming rules as files in
       each operating system (see below).  However, under DOS it is
       best to use a name of 8 characters or less, without an
       extension, when naming subdirectories, because some
       application programs do not properly handle subdirectory
       names that have an extension.

       The drive and subdirectory portion of a file's name are
       collectively called the file's path.  For example, the file
       name C:\DIR1\DIR2\MYFILE.DAT says to look for the file
       MYFILE.DAT in the subdirectory DIR2 which is part of the
       subdirectory DIR1 which is on drive C.  The path for
       MYFILE.DAT is C:\DIR1\DIR2.  The backslashes between
       subdirectory names are required.  The total length of a
       file's path may not exceed 64 characters in DOS, and on FAT
       volumes under OS/2 (this limit excludes the file name and
       extension, but includes the drive letter and colon).  On
       HPFS, NTFS, and LFN volumes, the path and file name must each
       be 255 characters or less in length, and in addition the
       total length of the path and file name together cannot exceed
       260 characters.

       The operating system and command processor remember both a
       current or default drive for your system as a whole, and a
       current or default directory for every drive in your system.
       Whenever a program tries to create or access a file without
       specifying the file's path, the operating system uses the
       current drive (if no other drive is specified) and the
       current directory (if no other directory path is specified).

       The root directory is named using the drive letter and a
       single backslash.  For example, D:\ refers to the root
       directory of drive D:.  Using a drive letter with no
       directory name at all refers to the current directory on the
       specified drive.  For example, E:4DOS.DOC refers to the file
       4DOS.DOC in the current directory on drive E:, whereas
       E:\4DOS.DOC refers to the file 4DOS.DOC in the root directory
       on drive E:.

       There are also two special subdirectory names that are useful
       in many situations:  a single period by itself [.] means "the
       current default directory."  Two periods together [..] means
       "the directory which contains the current default directory"
       (often referred to as the parent directory).  These special
  -14-

       names can be used wherever a full directory name can be used.
       4DOS, 4OS2, and 4NT allow you to use additional periods to
       specify directories further "up" the tree (see page 64).


       File Names

       Finally, each file has a filename.  Under the FAT file
       system, the filename consists of a base name of 1 to 8
       characters plus an optional extension composed of a period
       plus 1 to 3 more characters.  Traditional FAT filenames with
       an 8-character name and a 3-character extension are sometimes
       referred to as short filenames (SFNs) to distinguish them
       from long filenames (LFNs).

       You can use alphabetic and numeric characters plus the
       punctuation marks ! # $ % & ' ( ) - @ ^ _ ` { } and ~ in both
       the base name and the extension of a FAT filename.  Because
       the exclamation point [!], percent sign [%], caret [^], at
       sign [@], parentheses [()], and back-quote [`] also have
       other meanings to 4DOS, 4OS2, and 4NT, it is best to avoid
       using them in filenames.

       The LFN, NTFS, and HPFS file systems, which can be used under
       OS/2, Windows 95, and Windows NT, allow file names with a
       maximum of 255 characters, including spaces and other
       characters that are not allowed in a FAT system file name,
       but excluding some punctuation characters which are allowed
       in FAT file names.  See your operating system documentation
       for details on the characters allowed.  If you use file names
       which contain semicolons [;], see page 67 for details on
       avoiding problems with interpretation of those file names
       under 4DOS, 4OS2 and 4NT.

       FAT file names are always stored on the disk in upper case,
       and are displayed in upper or lower case depending on the
       options you select.  HPFS, NTFS, and LFN file names are
       stored and displayed exactly as you entered them, and are not
       automatically shifted to upper or lower case.  For example,
       you could create a file called MYFILE, myfile, or MyFile, and
       each name would be stored in the directory just as you
       entered it.  However, case is ignored when looking for
       filenames, so you cannot have two files whose names differ
       only in case (i.e., the three names given above would all
       refer to the same file).  This behavior is sometimes
       described as "case-retentive but not case-sensitive" because
       the case information is retained, but does not affect access
       to the files.

       Files stored on HPFS, NTFS, and LFN volumes often have "FAT-
       compatible" names:  names which contain only those characters
       legal on a FAT volume, and which meet the 8-character name /
       3-character extension limits.  Programs which cannot handle
       long names (for example, DOS programs accessing an HPFS drive
       under OS/2, or Windows 3 programs accessing an NTFS drive
       under Windows NT) generally can access files by using  FAT-
       compatible names.
  -15-

       If an HPFS, NTFS, or LFN-compatible file name includes spaces
       or other characters that would not be allowed in a FAT name,
       you must place double quotes around the name.  For example,
       suppose you have a file named LET3 on a FAT volume, and you
       want to copy it to the LETTERS directory on drive F:, an HPFS
       partition, and give it the name Letter To Sara.  To do so,
       use either of these commands:

            [c:\wp] copy let3 f:\LETTERS\"Letter To Sara"
            [c:\wp] copy let3 "f:\LETTERS\Letter To Sara"

       The HPFS, NTFS, and LFN file systems do not explicitly define
       an "extension" for file names which are not FAT-compatible.
       However, by convention, all characters after the last period
       in the file name are treated as the extension.  For example,
       the file name "Letter to Sara" has no extension, whereas the
       name "Letter.to.Sara" has the extension Sara.

       You may occasionally encounter filenames which are not
       displayed the way you expect if you have used characters from
       outside the U.S. English character set in the name.  These
       are generally due to problems in the way your operating
       system translates characters between the OEM and ANSI
       character sets.  Correcting the problem may require
       experimentation with fonts, character sets, and code pages,
       and occasionally some such problems may not be readily
       correctable within 4DOS, 4OS2, or 4NT.  For more information
       on underlying issues related to fonts and character sets see
       page 22.


       File Attributes and Time Stamps

       Each file also has attributes, and one or more time stamps.
       Attributes define characteristics of the file which may be
       useful to the operating system, to you, or to an application
       program.  Time stamps can record when the file was created,
       last modified, or last accessed.  Most 4DOS, 4OS2, and 4NT
       file processing commands allow you to select files for
       processing based on their attributes and/or time stamp(s).

       Each file on your system has four standard attributes.  Every
       time a program modifies a file, the operating system sets the
       Archive attribute, which signals that the file has been
       modified since it was last backed up.  This attribute can be
       used by 4DOS, 4OS2, or 4NT to determine which files to COPY,
       and by backup programs to determine which files to back up.
       When the Read-only attribute is set, the file can't be
       changed or erased accidentally; this can be used to help
       protect important files from damage.  The Hidden and System
       attributes prevent the file from appearing in normal
       directory listings.  (Two additional attributes, Directory
       and Volume label, are also available.  These attributes are
       controlled by the operating system, and are not modified
       directly by 4DOS, 4OS2, or 4NT.)
  -16-

       Attributes can be set and viewed with the ATTRIB command (see
       page 189).  The DIR command (see page 223) also has options
       to select filenames to view based on their attributes, to
       view the attributes themselves, and to view information about
       normally "invisible" hidden and system files.

       When a file is created, and every time it is modified, the
       operating system records the system time and date in a time
       stamp in the file's directory entry.  Several 4DOS, 4OS2, and
       4NT commands and variable functions, and many backup and
       utility programs, use this time stamp to determine the
       relative ages of files.

       On FAT volumes, only the single time stamp described above is
       available.  Files on HPFS, NTFS, and LFN volumes have three
       sets of time and date stamps.  The operating system records
       when each file was created, when it was last written or
       modified, and when it was last accessed.  The "last write"
       time stamp matches the single time stamp used on traditional
       FAT volumes.

       Several 4DOS, 4OS2, and 4NT commands and variable functions
       let you specify which set of time and date stamps you want to
       view or work with on HPFS, NTFS, and LFN volumes.  These
       commands and functions use the letter "c" to refer to the
       creation time stamp, "w" for the last write time stamp, and
       "a" for the last access time stamp.  Note that LFN volumes,
       under both Windows 95 and Windows NT, store a date but no
       time in the "last access" time stamp; on these drives the
       time of last access will always be 00:00.


  OS/2 Extended Attributes

       The FAT and VFAT file systems allow the limited set of
       attributes for files described in the previous section.  OS/2
       supports additional information about files called "Extended
       Attributes" or "EAs."

       The Extended Attributes for a file provide additional
       information which is not part of the file's actual contents.
       This information might include the icon to be displayed for
       the file on the OS/2 desktop, or the type of data contained
       in the file.

       OS/2 supports Extended Attributes on both FAT and HPFS (High
       Performance File System) partitions.  EAs for the files on a
       FAT partition are stored in the file "EA DATA. SF" in the
       partition's root directory.  Like COMMAND.COM and CMD.EXE,
       4DOS and 4OS2 preserve a file's EAs when copying or moving
       the file, and OS/2 makes the appropriate adjustments to EAs
       when a file is deleted or renamed.

       When copying or moving a file from a FAT to an HPFS volume,
       4OS2 uses uses the file's .LONGNAME EA, if available, for the
       HPFS filename.  Conversely, when copying or moving a file
       from an HPFS volume to a FAT volume, 4OS2 will set the
  -17-

       .LONGNAME EA to the original HPFS name.  See the COPY and
       MOVE commands for additional details.

       If you boot DOS or any version of Windows, then delete or
       otherwise manipulate files that have Extended Attributes, you
       can face unexpected problems when you next boot under OS/2,
       because the EAs and directories will no longer be
       synchronized.  If you must manipulate files with Extended
       Attributes during a DOS boot, or when you boot a "specific
       version of DOS" (not a standard DOS seesion) from OS/2, make
       sure you run OS/2's CHKDSK program to clean up any "orphaned"
       EAs.

       For more information on Extended Attributes, see your OS/2
       documentation.


  Internal and External Commands

       Whenever you type something at the command line and press the
       Enter key, you have given a command to the command processor,
       which must figure out how to execute your command.  If you
       understand the general process that 4DOS, 4OS2, and 4NT use,
       you will be able to make the best use of them and their
       commands.

       The command processor begins by dividing the line you typed
       into a command name and a command tail.  The command name is
       the first word in the command; the tail is everything that
       follows the command name.  For example, in this command line:

            dir *.txt /2/p/v

       the command name is "dir", and the command tail is " *.txt
       /2/p/v."

       If the command name is not an alias (see page 85), or, in
       4NT, an Internet URL beginning with http: (see page 78), the
       command processor tries to find the name in its list of
       internal commands.  An internal command is one that the
       command processor can perform itself, without running another
       program.  DIR and COPY are examples of internal commands.

       If the command name is not found in the command processor's
       list of internal commands, it assumes that it must find and
       execute an external command.  This means that the command
       processor must load and run a separate program, either an
       executable program or a batch file.  DOS, OS/2, and Windows
       NT are shipped with a number of external utility programs
       (such as FORMAT and DISKCOPY), and any program or application
       you install on your system becomes a new external command.

       The advantage of internal commands is that they run almost
       instantly.  When you type an internal command, the command
       processor interprets the command line and carries out the
       necessary activities without having to look for, load, and
       run another program.
  -18-

       The advantage of external commands is that they can be large,
       varied, and complex without taking space inside the system
       command processor.  External commands can also be renamed or
       replaced easily.  If you want to rename the external DOS
       command XCOPY to MYCOPY, for example, all you need to do is
       find the file called XCOPY.EXE in your DOS disk or directory
       and change its name to MYCOPY.EXE.  If you want to replace
       XCOPY with a more efficient program, you can do so.  4DOS,
       4OS2, and 4NT add this flexibility to internal commands.  You
       can rename or replace any internal command by using an alias
       (see pages 85 and 178), and you can enable or disable
       internal commands whenever you wish (see SETDOS /I on page
       366).


  Executable Files and File Searches

       Once the command processor knows that it is supposed to run
       an external command, it tries to find an executable file (one
       with a .COM or .EXE extension) whose name matches the command
       name.  It runs the executable file if it finds one.  (See the
       previous section for more information on external commands.)

       If the command processor cannot find an executable program to
       run, it next looks for a batch file (a file with one or more
       commands in it) whose name matches the command name.  4DOS,
       4OS2, and 4NT look first for a .BTM file, then for a .CMD
       file (in 4OS2 and 4NT), then for a .BAT file, and finally for
       a .REX file (in 4NT).  See page 88 for more information on
       these different types of batch files.  If the command
       processor finds such a file, it then reads each line in the
       file as a new command.

       If the search for a batch file fails, the command processor
       checks to see if the command name matches the name of a file
       with an extension that is associated with a specific
       application (for example, if you have associated .DOC with
       your editor or word processor, and you type the name of a
       .DOC file).  If a match is found, the command processor runs
       the program you specified when the association was defined.

       In searching for the application associated with a file,
       4DOS, 4OS2, and 4NT will examine any executable extensions
       you have defined (an executable extension associates a file
       extension with a specific program to process that type of
       file; see page 75 for details).  4NT also checks file
       associations defined in the Windows registry; see the next
       section for complete details.

       4DOS, 4OS2, and 4NT first search for an executable program, a
       batch file, and a file with an executable extension (or
       Windows NT file association) in the current directory.  If
       the command name doesn't match a .COM, .EXE, .BTM, .BAT or
       .CMD file or an executable extension in the current
       directory, the command processor repeats its search in every
       directory in your search path.
  -19-

       The search path is a list of directories that the command
       processor (and some applications) search for executable
       files.  For example, if you wanted the command processor to
       search the root directory of the C: drive, the \DOS
       subdirectory on the C: drive, and the \UTIL directory on the
       D: drive for executable files, your search path would look
       like this:

            PATH=C:\;C:\DOS;C:\UTIL

       Notice that the directory names in the search path are
       separated by semicolons.

       You can create or view the search path with the PATH command
       (see page 331).  You can use the ESET command (see page 253)
       to edit the path.  Many programs also use the search path to
       find their own files.  The search path is stored in the
       environment with the name PATH.

       Remember, the command processor always looks for an
       executable file or a file with an executable extension (or
       Windows NT file association) first in the current
       subdirectory, and then in each directory in the search path.
       (You can change the search order so the current directory is
       not searched first; see the PATH command for details.)

       If you include an extension as part of the command name,
       4DOS, 4OS2, and 4NT only search for a file with that
       extension.  Similarly, if you include a path as part of the
       command name, the command processor will look only in the
       directory you specified, and ignore the usual search of the
       current directory and the PATH.

       The following table sums up the possible search options (the
       term "standard search" refers to the search of the current
       directory and each directory in the search path):

            Command:          4DOS, 4OS2, and 4NT Search Sequence:

            WP                Standard search for any executable
                              file whose base name is WP.

            WP.EXE            Standard search for WP.EXE; will not
                              find files with other extensions.

            C:\WP7\WP         Looks in the C:\WP7 directory for any
                              executable file whose base name is WP.
                              Does not check the standard search
                              directories.

            C:\WP7\WP.EXE     Looks only for the file C:\WP7\WP.EXE.

            LAB.DOC           Standard search for LAB.DOC, if .DOC
                              is defined as an executable extension
                              (or Windows NT file association).
                              Runs the associated application if the
                              file is found.
  -20-

            C:\LI\LAB.DOC     Looks only for the file C:\LI\LAB.DOC,
                              and only if .DOC is defined as an
                              executable extension (or Windows NT
                              file association).  Runs the
                              associated application if the file is
                              found.

       If the command processor cannot find an executable file,
       batch program, or a file with an executable extension (or
       Windows NT file association) in the current directory or any
       directory in the search path, it looks for an alias called
       UNKNOWN_CMD (see ALIAS on page 178 for details).  If you have
       defined an alias with that name, it is executed (this allows
       you to control error handling for unknown commands).
       Otherwise, the command processor displays an "Unknown
       command" error message and waits for your next instruction.


4NT    Windows File Associations

       Windows NT includes the ability to associate file extensions
       with specific applications; this feature is sometimes called
       "file associations".  For example, when you install Microsoft
       Word, it creates an association between files with a .DOC or
       .DOT extension and the Word program file, WINWORD.EXE.

       4NT includes a similar feature, called "executable
       extensions," which allows you to set environment variables
       which associate a file extension with a particular
       application (see page 75 for complete details).

       There are two sets of file associations; both are stored in
       the Windows NT registry.  Those in the first group (designed
       to replace the Windows 3.x WIN.INI file) are "direct" -- they
       simply list the extension and the application name,
       associating the extension directly with the application.
       Those in the second group are "indirect" -- they associate an
       extension with a "file type," and separately specify
       attributes of files of that type, including the command to
       execute in order to open such a file.

       When 4NT starts, it retrieves the direct file associations
       from Windows, and treats them like 4NT executable extensions.
       To disable loading of these direct associations see the
       Startup page of the OPTION dialogs, or the LoadAssociations
       directive in 4NT.INI.  The indirect associations are accessed
       through built-in Windows features (see below), and can not be
       disabled.

       When you attempt to execute a program from the command line
       or a batch file, 4NT first searches its list of executable
       extensions, including the standard extensions (.COM, .EXE,
       .BTM, etc.).  It then checks 4NT executable extensions,
       followed by direct file associations inherited from Windows.
       If  all of these tests fail, 4NT passes the command name to
       Windows to see if Windows can find an indirect association
  -21-

       for it.  Each of these tests is done in all of the standard
       search directories described in the previous section.

       See Using Windows File Associations on page 77 for additional
       details on how to control Windows file associations in 4NT,
       including dealing with conflicts between direct and indirect
       associations.


  The Environment

       The command processor allows you to keep a list of
       information in memory.  This list is called the environment.
       Every program receives a copy of the environment when it
       begins, and many programs use some of its information to
       configure themselves or to find files.

       The environment is arranged as a series of variables and
       their related values.  Each variable consists of a name
       followed by an equal sign [=] and some text (the value).  For
       compatibility with traditional command processors, 4DOS and
       4OS2 store the variable name in upper case, regardless of how
       you enter it.  Like Windows NT's CMD.EXE, 4NT stores the name
       as you enter it, and does not shift it to upper case
       (however, case is ignored when looking for a variable; for
       example MyVar, myvar, and MYVAR all refer to the same
       variable).

       You can view the environment by typing SET, and add new
       entries or edit existing entries with the SET and ESET
       commands.  You can erase entries in the environment with both
       the UNSET and SET commands.

       A typical environment entry looks like this:

            LIB=c:\lib

       In this example, the name of the variable is "LIB" and its
       value is "c:\lib".  The text string or value can include any
       character except a null (ASCII 0).

       The format and meaning of each entry in the environment is up
       to the program that uses the particular variable.
       Environment variables can contain just about anything, and
       can be used for any purpose the author of a program desires.
       The "purpose" of the environment as a whole is simply to hold
       small amounts of text which programs can then access
       according to their own rules.  Most environment variables are
       used by single programs for their own information; a few
       (like PATH) have well-defined meanings and are used by many
       different programs.

       4DOS, 4OS2, and 4NT use several environment variables to
       control their own behavior.  They also provide a wide range
       of facilities for manipulating and managing the environment.
       See "Using the Environment" beginning on page 107 for details
  -22-

       about these special variables, the size of the environment,
       and other environment-related features.


  Character Sets, ASCII, and Key Codes

       The translation of a key you type on the keyboard to a
       displayed character on the screen depends on several related
       aspects of character handling.  A complete discussion of
       these topics is well beyond the scope of this manual.
       However, a basic picture of the steps in the keystroke and
       character translation process will help you understand how
       characters are processed in your system, and why they
       occasionally may not come out the way you expect.

       Internally, computers use numbers to represent the keys you
       press and the characters displayed on the screen.  To display
       the text that you type, your computer and operating system
       require five pieces of information:

            *  The numeric key code for the physical key you
               pressed;

            *  The specific character that key code represents based
               on your current keyboard layout or country setting;

            *  The character set currently in use on your system
               (see below);

            *  The international code page in use for that character
               set; and

            *  The display font used to display the character.

       The numeric key code is determined by your physical hardware
       including the language that your keyboard is produced for.
       The character set is usually determined by the operating
       system.  These items typically are not under your control.
       However, most systems do allow you to control the keyboard
       country setting and the code page.  In some cases, you can
       also control the display font.

       If the key codes produced by your keyboard, the code page,
       and the font you choose are not fully compatible with each
       other, the characters displayed on the screen will not match
       what you type.  The differences are likely to appear in line-
       drawing characters, "international" (non-English) characters,
       and special symbols, not in commonly-used U.S. English
       alphabetic, numeric, or punctuation characters.

       Most systems use a "single-byte" character set for keyboard
       and screen display.  These sets define 256 characters or
       symbols, with a numeric representation for each.  ("Double-
       byte" character sets, with up to 65,536 characters each, are
       used for languages with more than 256 symbols, and for some
       multi-lingual systems.)  Most PC single-byte character sets
  -23-

       are based on a code called ASCII, the American Standard Code
       for Information Interchange.

       The original ASCII code was defined over 30 years ago for use
       in mainframe and minicomputer systems, and has 128 character
       values.  These include the upper and lower case letters,
       numerals, and punctuation marks used in U.S. English, plus
       non-printing control codes (which can be entered on most
       keyboards by pressing the Ctrl key plus another character, or
       by pressing certain special keys like Tab, Enter, Backspace,
       and Esc).  However, ASCII is not a complete character set,
       because it defines only 128 of the required 256 symbols.

       IBM, in its original PC, created a complete 256-character set
       (called the Original Equipment Manufacturer or "OEM"
       character set) by defining an additional 128 extended ASCII
       codes for math symbols, "international" characters, the
       characters used to draw boxes and lines, and some
       miscellaneous symbols.

       Some operating systems support other character sets; in
       particular, Windows uses the ANSI character set internally to
       store and display text, even though other parts of the system
       (e.g. the file system which stores file names on disk) use
       IBM's OEM character set.  The ANSI character set is identical
       to the OEM character set for U.S. English printed characters,
       but may vary for "international" characters not used in U.S.
       English.  In most cases, Windows automatically translates
       characters from one set to another as needed, but problems
       can sometimes result in errors in displayed text (e.g.,
       differences between the appearance of accented characters in
       filenames in Windows and DOS applications).

       The code page you define for use on your system represents a
       variation of the character set.  Most code pages define the
       standard ASCII characters for the 128 codes in the first half
       of the character set, and select different characters for
       codes in the second half of the set.  These variations
       usually provide for necessary international symbols.  Code
       pages have numbers, and also have names which reflect the
       country whose character set they contain; for example, code
       page 437 is entitled "MS-DOS United States", code page 865 is
       entitled "MS-DOS Nordic", and so on.

       See your operating system documentation for more information
       about character sets, code pages, and country and language
       support.  The online help has a complete list of the ASCII
       and extended ASCII codes in IBM's OEM character set, and a
       list of key codes and scan codes for the U.S. keyboard
       layout.


  The Keyboard

       When you press a single key or a key combination on the
       keyboard, the computer translates your keystroke into two
       numbers.  For all alphabetic, numeric, and punctuation keys,
  -24-

       the Tab, Enter, Backspace, Esc keys and Ctrl plus an
       alphabetic key, these numbers are an ASCII code plus a scan
       code.  The ASCII code represents the key's meaning; the scan
       code identifies which specific key was pressed.  For example,
       many keyboards have two plus [+] keys, one above the equal
       sign and one on the numeric keypad.  Both generate the same
       ASCII code, but they generate different scan codes.

       Keys which are not represented by ASCII codes are translated
       to an ASCII 0 plus an extended key code.  These keys include
       the function keys, the cursor keys, and Alt plus a key.  The
       extended key code for a key is often the same as the scan
       code for that key.

       The translation of keystrokes to internal codes is affected
       by your current keyboard layout (country setting).  This
       allows you to work with keyboards with a variety of different
       layouts designed for different countries.

       Some keys, like the Alt, Ctrl, and Shift by themselves or in
       combination with each other, plus Print Screen, SysReq,
       Scroll Lock, Pause, Break, Num Lock, and Caps Lock, do not
       have any code representations at all in normal use (these
       keys do have physical scan codes, but those codes are
       normally handled internally by the BIOS or operating system).
       The computer performs special actions automatically when you
       press these keys (for example, it switches your keyboard into
       Caps Lock mode when you press the Caps Lock key), and does
       not report the keystrokes to whatever program is running
       unless the program has been written specially to accept them.

       Do not confuse extended key codes with the extended ASCII
       codes discussed in the previous section.  The former are the
       special codes for function keys, cursor keys, and Alt keys.
       The latter are extensions to the ASCII character set for
       graphical and international characters; see the previous
       section for details.

       See your operating system documentation for more information
       about keyboard layouts and country and language support.  The
       online help has a complete list of key codes and scan codes
       for the U.S. keyboard layout.


  Video

       4DOS, 4OS2, and 4NT are "character-based" programs, which
       means they work in text mode on your computer.  In text mode,
       the screen or window used by the program displays text in a
       single, fixed-pitch font (a font where every character is the
       same width), but cannot mix fonts or display graphics.  All
       three command processors can run graphics programs which
       change your screen to graphics mode, but the screen must be
       returned to text mode whenever the command processor is
       active.
  -25-

       Original IBM PC video cards could display 80 columns and 25
       rows of text.  Newer, advanced video systems normally run in
       this 80 x 25 display mode but can also display more columns
       and rows.  Each of the different possible screen
       configurations is a different text "mode".

       In addition to running in a variety of text modes, 4DOS,
       4OS2, and 4NT can run in "normal" full-screen mode or in a
       window inside a graphical environment such as the Windows
       3.x, Windows 95, or Windows NT desktop, or the OS/2 Workplace
       Shell.  When they run in such a window, they are still
       operating in text mode.  The underlying graphical environment
       translates their text commands into the appropriate graphics
       for your video display.

       4DOS, 4OS2, and 4NT support whatever number of rows and
       columns of text you decide to use.  They don't have commands
       to switch from one screen size to another -- you will need to
       use the software that came with your computer or video board
       to do that -- but they can read and work with the number of
       rows and columns on your screen.


  ANSI Drivers

4DOS   Every version of DOS includes a program called ANSI.SYS.
       This program lets you use text colors other than drab white
       on black, redefine keys, and control screen output.
       Commercial ANSI drivers are available as replacements for
       ANSI.SYS.  The replacement programs usually include many new
       features, boost screen display speed dramatically, and
       support text displays that have more than 80 columns and 25
       lines.

       In most cases, 4DOS automatically determines whether you have
       an ANSI driver installed (if the automatic determination does
       not work on your system you can set the ANSI state manually
       in 4DOS.INI, see page 154 for details).  If you do have an
       ANSI driver installed, 4DOS will use the driver to clear the
       screen and set screen colors.

       If you use a 4DOS command or feature which sets screen colors
       and you do not have an ANSI driver installed the colors will
       not be "sticky" -- you may lose them when you run an
       application.

4OS2   OS/2 includes ANSI support for character mode sessions.  4OS2
       enables this feature when it starts, and uses it thereafter.
       You can turn off ANSI support with OS/2's external ANSI
       command (ANSI.EXE).  If you do, however, 4OS2 will not notice
       the change and will display unusual characters or ignore
       colors in your CLS and COLOR commands.

4NT    There is no provision for ANSI support in Windows NT or 4NT.

       Several 4DOS, 4OS2, and 4NT commands provide replacements for
       traditional ANSI commands.  For example, there are commands
  -26-

       to set the screen colors and display text in specific colors.
       These commands are easier to understand and use than the
       traditional ANSI control sequences.  Some of these commands
       manipulate screen colors directly.  Others use an ANSI driver
       if one is installed (under 4DOS) or expected (under 4OS2),
       but save you the work of figuring out complex ANSI control
       sequences.  Any special interaction between 4DOS or 4OS2 and
       the ANSI driver is described in the documentation for each
       command.
