" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#008000" VLINK="004000" ALINK="#00C000">

                             EXTENSION FILES

     Some commands in CP are executed according to the following principle:
a specific command string is executed depending on the file's specific
extension. The EXTENSION FILES are used to make a command string dependent
on a file extension.  The extension files are written by the user and their
presence is optional.  CP may contain the following three extension files:

- CP.EXT     - to form a command string by default,
- CPVIEW.EXT - to specify view programs,
- CPEDIT.EXT - to specify editors.

     The CP distribution diskette contains the examples of the three
extension files.  When you start CP the extension files are loaded from the
directory containing the CP.COM file or from the directory set with the help
of the command "SET CPDIR=" . You can modify these files using any text
editor including CP's built-in editor.


                             The CP.EXT file

     When opening the file using the key [Enter] or the mouse, CP can
execute a command depending on the file extension.  This particular command
is specified in the CP.EXT file.  The format of the file is as follows:

<extension 1>:  <Command string 1>
<extension 2>: <Command string 2>
.
.
<extension n>: <Command string n>

where <extension 1> is a filename extension (up to three characters). You
can also use wildcards "?" or "*" in the filename extension. The command
string specified in the CP.EXT file will be executed for files with this
filename extension. The following command sequences have special meaning
when used in the command string of extension files:

!.! - file name and extension,
!: - the current drive letter,
!\ - the name of the current directory
!  - the name of the file without extension
!! - the "!" character in the command string.

     If the CP.EXT file is not found, CP will load by default the following:

COM: !
EXE: !
BAT: !

                   The CPVIEW.EXT and CPEDIT.EXT files

     The format of these files is similar to that of the CP.EXT file. You
should specify the path to the view program for files with this extension in
the command strings of the CPVIEW.EXT file (for instance, the ARCHVIEW.COM
and BASEVIEW.COM programs from the CP package).  In the command strings of
the CPEDIT.EXT file you should specify the editor you are going to use when
editing files with this extension.  If a <Command string> in the CPVIEW.EXT
and CPEDIT.EXT files contains the character "*" in its first position, the
files with the corresponding extension are to be viewed or edited using the
built-in viewer or editor. If the "*" character is followed by "T", the text
mode will automatically be turned ON, if it is followed by "H" - the
hexadecimal mode will be in effect. The rest of the <Command string> is
disregarded.

     If the CPVIEW.EXT or CPEDIT.EXT file is not found, CP will use the
built-in viewing or editing program for all files.