C.HLP  - HELP for C.EXE
==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
PREFACE
                                                         DOS-BEGINNERS ONLY
                                                          THE DOCUMENTATION
WHAT IS IT
PRESUMABLY,

###########################################################################
GENERAL INFORMATION
EXAMPLES:
  GOOD:
  USELESS:
INSTALL
    OS/2 WARP dos-emulation.
  RAM-DISK/RAMDRIVE
INI (initialise)
  ...ADDITIONAL FEATURES/REMARKS
     "-d" (DELETE FROM DIR-LIST-FILE)
     "." (SUBDIRs)
       DELTREE
MKDIR  (make-dir)
RMDIR
PARENT
"PATH SEARCH"
INFO DISPLAY
  CD-ROMs (mscdex)
  HIGHEST DRIVE DISPLAYED WITH INFO "c"
  MORE DETAILS ABOUT THE DISPLAY
    TEXTMODES
    COLOURS
      HARD DISKS
    ABBREVIATIONS
  NETWORK IDs
  INCLUDE FLOPPY
  LOCAL
  LOCAL, A PARTICULAR HARDDISK
  SUBST
  ASSIGN
  GENERAL NOTE
  ASSIGN + SUBST
  JOIN
  LABELs
TOP TEN LIST
  DIRECTORIES
  COMMANDS

###########################################################################
SPECIFIC INFORMATION
  DRIVE / RECOGNIZE PARAMETER AS DRIVE (detailed explanation)
    THREE SETTINGS:
    DEFAULT:
    OVERRIDE
    SUB-DIR SEARCH
    DEFAULT SETTING  (variable is not set, or set to "0")
      NOTE:
      Question & answer
      EXAMPLES:  (lastdrive=F)
      MORE EXAMPLES:
    SETTING :
       EXAMPLES
    SETTING L
       EXAMPLES
    ADD-ONs
  ====================================================================
  SUB-DIR SEARCH
  ====================================================================
  PATH SEARCH
    REQUIREMENTS:
    KEYs:
    ADDITIONAL REMARKS
    Further Examples:
  ====================================================================
  BAKFILE changeDir  "-b"
  IMPORTANT:
  RECOMMENDATIONs:
  EXAMPLE:
     EXPLAININING -b
       REMARK if you set TEMP to a ramdrive:
  NOTE ON: FILE-NAMEs
    EXAMPLES:
  DOSKEY
  REMARK - RETURN TO START DIR - IN .BAT FILES
   -b -c BATCH ... how to... explaining with EXAMPLES:
     NOTE, SUBSTITUTION:
     SAMPLE BATCH-FILES
     USEFUL OTHER PROGRAMS
     ADDITIONAL REMARK
  ========================================================================
  TOP TEN LIST FEATURE
    HOW TO ACTIVATE *TRACK DIRs UPON CHANGE-DIR* FEATURE:
    LOCATION OF THE TOP-TEN LIST FILE:
    FEATURES FOR WRITING TO THE TOP TEN LIST FILE:
    FEATURES FOR USING THE TOP TEN LIST:
    HOW TO SELECT FROM THE TOP TEN LIST, ONCE IT IS DISPLAYED:
    ((
      REMARKS
        HOW ENTRIES ARE ADDED
        EXPAND ENTRIES
        MAXIMUM LENGTH
        RAMDRIVE  (maximum length for top-ten entries)
    ))
    ADD ENTRIES TO TOP TEN YOURSELF
  =======================================================================
  TOP TEN LIST FOR COMMANDs

###########################################################################
TECHNICAL INFORMATION
  MAXIMUM PATH LENGTH FOR DIRS
  MAXIMUM NUMBER OF SEARCH PARAMETERS
  SELECT FROM PREVIOUSLY DISPLAYED PATHS
  KEYS pressed at the END
  TEMP - DOS ENVIRONMENT VARIABLE
###########################################################################
ADDITIONAL TECHNICAL NOTES
  maximum number of dirs
  param  order
  current dir
  For the IMPATIENT user:
  For the VERY IMPATIENT user:
  Why does it INI all by itself?
  "c . -i" / "c .-i"
  CD-ROM
    -i
    No writing to it
    Music CD
    Unix & all that jazz
  DISKSIZE
  UNDOCUMENTED SWITCH: GET HARD DISK TO SLEEP (AT-BUS/IDE)
  MKDIR RMDIR  -m -r  md/rd
    SUBSTITUTE -m -r Command.com
    GENERAL INFO
  -p & invalid entries
  -p & a..z, A..Z
  2GB+ drives
     A NRND is for example:
           ALL SETTINGS FOR DOS ENVIRONMENT VARIABLE JC-CD.$$:
           examples:
  ASSIGN + SUBST
  CC.EXE
  USING C.EXE FROM *YOUR* OWN PROGRAMS
Author
Due credit, *many thanks* to:

==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
==============================================================================
SEE FIRST:  file README.

PREFACE
  Beware of odd expressions since this is a non-native speaker talking.<g>
  This documentation contains more details than any single user has
  asked for, but everybody complained about that they weren't included.

  Skipping parts you are not interested in, should hopefully be very easy:
  usually a separate part is indented. Hence if you press cursor down, you
  can skip as long as the text stays on the right hand side of the cursor.
  Nitty gritty parts are in ( ) and even more hair-splitting nitty gritty
  parts are in ((  )). And they sometimes brandish upper-case titles
  like "REMARK", too.
  eg:
   (
     This is not interesting.
   )

   ((
      notes on monocrome display? yawn.. I couldn't care less.
   ))




This file "has no pages/chapters". It is meant for reading just
the introduction part, and then text-searching details later on.

---------------------------------------------------------------------------
                                                         DOS-BEGINNERS ONLY
---------------------------------------------------------------------------
  Copy C.exe into a directory along your path;

  You can enter "PATH" to see the current value, eg.:
    C:\DOS;C:\WINDOWS;C:\DIR2;
  means that there are three directories in this path:
    C:\DOS
    C:\WINDOWS
    C:\DIR2

  A note, IF you are NOT FAMILIAR WITH FILE-VIEWING:
  You can use EDIT to read it:

    -Text-Search:
     Using Alt-Search Find, enables you to look up a certain item,
     by searching for any string. F3 continues searching for the
     same string.

    -Print:
     To print an EXCERPT: Hold down the SHIFT-key, use Cursor-Up/down
     to mark an excerpt; the file-print menu will offer you to choose
     printing this marked area only.


  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^




---------------------------------------------------------------------------
                                                          THE DOCUMENTATION
---------------------------------------------------------------------------

NOTE
  ..."eg" is used as: "for example"
  ..."drive" is used mostly as if it meant "volume" and vice-versa.
  ..."dir" is motly used instead of "directory"


WHAT IS IT

  ...a better "cd"
     (changes to any dir without entering the entire path)

  ... + "add-on information on drives"
         ((
           <cough, cough> You may even find the information that X: refers
           to a floppy after you've used "subst x: a:\" - this should work
           on ms-dos version 4.* or later
         ))

  ... + some related features
        -create ASCII files with all or selected dir.s
        -create batch-files to go through selected or all dir.s
        -a top ten list
        -an "add-on tool" for copying etc. (cc.exe) and with a top ten list
         for commands.
        -subsitute mkdir and rmdir
        -quick update after eg. deltree, etc.
        -etc.

  ...displays the first directory whose path contains the given string(s).

     NOTE CAREFULLY
       you can then *immediately* enter any command which results in:
         a) chDir to the displayed dir is done,
         b) the command is run

       Otherwise, simply PRESS SPACEBAR (biggest key available on
       the keyboard) to continue searching for the right directory.



PRESUMABLY,
  you can simply use c.exe (if you have set the "TEMP" dos-
  environment-variable). Yet, if you'd like to know more about
  c.exe, or if you have encountered any problems with it, here's
  the documentation.

  C.EXE has over the years<g> had added quite complex features <cough,
  cough>. You might never need any of them or might find it rather
  tiring to read them all. For now, perhaps the readme file and
  reading here: "General Information" and "install" would make do.

  Enter "c" (without parameters) for drive info,
  "c -?" or "c /?" for a short reminder about the options.



###########################################################################
###########################################################################

GENERAL INFORMATION
  ...the directoryNAME -of the directory you want to change to-
     must contain the LAST searchString you specify:
     eg:
         to chDir to "\etc\programs\tools\PRINTER"
         eg:"c pr"


  ...order parameters as found in the dir's path:
     to CD to "\etc\programs\tools\PRINTER"
          eg:"c  tc          to    pr"
          (
            NOT:"c to tc pr"
          )


  ...However, usually you needn't enter that many parameters.
     Often, one is sufficient. Two should do in almost all cases.


  ...If you know that a dir is somewhere 'below' the current dir,
     you can put a . in front of the name,
     eg. "c .someDir"
     ((
       The . in Dos is the current directory. Hence my idea that
       "c .somedir" means that someDir is "below" the current dir.
     ))


  ...CursorUP/DOWN lets you choose from previously displayed entries



EXAMPLES:        (lastDrive is F)
  GOOD:
    you`re in: c:\l\tPascal
      to cd to c:\l\books\howto\CHAP1 : "c  chap1"
      to cd to c:\l\books\howto\CHAP1 : "c  ho ch"
      to cd to C:\l\tPascal\proj1 : "c  .1"             (sub-directory)
      to cd to C:\l\tPascal\proj2 : "c  .2"               "
      to cd to C:\l\tPascal\proj1\UNITS : "c  .1 un"      "


  USELESS:
    you`re in: c:\l\tPascal
      to cd to c:\l\books\howto\CHAP1 : "c  chap1 how"  (wrong order)
      to cd to c:\l\books\howto\CHAP1 : "c  l book how" ("how" not in "CHAP1")
      to cd to c:\l\books\howto\CHAP1 : "c  how 1 c"    (wrong order: 1 c)
      to cd to c:\l\tC\intro\example1 : "c  .tc int ex" (not a subDir)


  If you feel that more than one parameter is necessary, because
  you have more than one directory by the same/similar name,
  I would recommend to enter "TWO-letter-items" and if possible
  those of the dir you want to change to and its *PARENT* dir's
  eg:
     to cd to c:\l\tC\intro\example1
           "c         in    ex"

    "in" because "intro" is the direct parent-directory of "example1"
    hence:
    eg:
       Given the following directories:
         c:\this\one\etc
         c:\this\etc

       It is assumed, that if you enter "c th et" you rather want to get to
         c:\this\etc
       instead of
         c:\this\one\etc
       For the ladder you'd enter "c on et" instead.

       However, you will always be able to get to all dirs which match,
       pressing SpaceBar to continue searching.




INSTALL

  When using C.EXE it will create a file using the DOS-environment-
  variable "TEMP". This file's default-name is:  JC-CD.$$?
  (
    with ? being the drive's letter; eg: "JC-CD.$$C" for drive C:
  )

  If that's ok with you, simply use c.exe


  IF not - if you want to specify a different file:
    Set the environment-variable "JC-CD.$$"
    eg:
       set JC-CD.$$=c:\any\lst$

    Make sure that this corresponds to a FILE-name which may still be
    appended by one digit (without having to add a full stop)
    eg:
       "set JC-CD.$$=c:\any\" => files will be called: "c:\any\C" , etc.


  NOTE, at least one of these two DOS-env-variables is required.
  (TEMP or JC-CD.$$)


  ((
    OS/2 WARP dos-emulation.
      NOTE
         that OS/2 Warp offers running an autoexec.bat at the start of
         *every* dos-session;
         by adding the corresponding env-variables you can choose using
         the same dir-list-files.
         eg.
            if you'd have D:\autoexec.bat which is run at the start of
            ANY Warp-dos-session
         eg.
           -you created the dir: "c:\dir"
           -dos-autoexec.bat: "c:\autoexec.bat" contains:
            "set JC-CD.$$=c:\dir\"
           -the OS/2-autoexec.bat for all dos-sessions
            "d:\autoexec.bat" contains:
            "set JC-CD.$$=c:\dir\os."
           RESULT:
             -dir-list-file under 'real' dos:
              "c:\dir\h" for drive H:, etc.
             -dir-list-file unter 'OS-2-dos':
              "c:\dir\os2.h" for drive H:, etc.

         This is useful, if under Warp your drive-letters change -
         eg.
            because of using the non-fat-file-sytem, or because your
            second hard-disk has by mistake a primary fdisk-partition,
            which then jumps the drive-letters of your extended-partitions
            on the first hard-disk, etc. etc.

  ))



  RAM-DISK/RAMDRIVE
    If you locate the dir-list-files on a RAM-DISK, a new file will be
    created after every boot, because c.exe automatically creates a new
    file, if it doesn't encounter a drive's dir-list-file.

    ((
      Dir-list-files might "run out of memory" if there is not enough
      space on the RAM-DISK available. However, they are quite small.
      Some ideas are: setting TEMP to a ram-disk, and letting JC-CD.$$
      point to a hard disk, or vice versa.
    ))

    (((
      REMARKs
        a)
          If TEMP is on a ramdrive, maybe you would like to include a
          "copy" command in your autoexec.bat which copies C.EXE to
          this TEMP dir, and include this TEMP directory in the PATH.

        b)
          It might even be worth to create a ram-drive just for usage with
          the dir-list-files. They are very small. See Dos manuals or
          enter "help ramdrive.sys" (Dos 6.* version) for details.
          ((
            The Ms-Dos ramdrive.sys program I'm using installs itself with
            as little as 1.264 bytes, and is even high-loaded. The ramdrive
            itself is in the XMS/EMS memory. Perhaps your system allows
            a similarly favorable installation.

            You can use this "anywhere" you can put a DEVICE= statement
            (OS/2, win, etc. - (may depend) ). Or better with real Dos the
            DEVICEHIGH statement (not with OLD Dos-versions) - requires
            HIMEM/EMM386, etc. see Dos-manuals, online help.
          ))
    )))





INI (initialise)
  To explicitly INITIALISE/update dir-list-files use "-i" as a switch.
  eg:
     "c -i"       updates the file for the current drive
     "c -i d:"    updates the file for drive d:
     "c -i mydir" updates the file for the current drive AND changes to
                  the directory "mydir"
     "c -i d: mydir"  updates the file for drive d:
                      AND changes to the directory "mydir" on drive d:

  ...NOTE
     ...CD-ROMs ('run by' MSCDEX, 2.22+)
        will be read super-fast <cough, cough> and this should produce
        a proper dir-list-file. However, should you encounter any problem
        with this super-fast-ini, add something to the "-i" parameter:
        eg: "-iold" or "-ii" or "-iCD", whatever. (suggested: -ii)
        This will start a 'traditional' ini.


  ...ADDITIONAL FEATURES/REMARKS

     "-d" (DELETE FROM DIR-LIST-FILE)
       Deletes all entries *in the dir-list-file* which no
       longer refer to valid directories (eg. useful *after* DELTREE, etc.)
       ( "c.exe -d" does *not* remove directories on the hard disk)



     "." (SUBDIRs)
       ".-i" or "-i ." or ". -i" or ".-d" or "-d ."  or ". -d"
       refer to the sub-dirs only, and is usually much FASTER.
       (depending on the number of sub-dirs to the current dir)


       GENERAL NOTE: It is therefore highly recommended to use
       the . sub-dir approach where possible, eg: "c . dir"
       "c . -i " "c . -d " "c . -p"

       DELTREE
         Useful, if you have just used DELTREE is: "c . -d"
         eg. write a DOSKEY macro:
           doskey deltree=deltree $* $t c.exe . -d
         OR a BATCH-file:
           @deltree.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
           @c.exe . -d

     (((
       REMARK:
         As usual for DOS, the order is: COM, EXE, BAT, first in the current
         dir, than the dirs as listed in the PATH statement. Hence, if
         you choose a batch for deltree: then "deltree.BAT" must be in
         a direcory which is prior in the "chain" of the PATH than the
         original path of deltree.EXE. Otherwise deltree.EXE will be
         called instead of deltree.BAT. Also, if the current dir contains
         deltree.EXE. Hence, suggestion: preferably use a doskey-macro.
     )))


MKDIR  (make-dir)
     "-m <newDir>"  makes a dir + quickly updates the dir-list-file.
     "-M <newDir>"  as "-m", plus changes to the new directory

     Again, using a Doskey macro is suggested:
      doskey md=c.exe -m $*

     ((
      If for some reason you want to use DOS' mkdir, simply enter "mkdir"
      instead of "md"
     ))

     ((
       Dos syntax for the directory is also supported:
       eg:
          "d:xyz" "f:..\xyz" "\xzy"
       as in:
          "md f:..\xyz"
     ))




RMDIR
     "-r <oldDir>"  removes a dir + quickly updates the dir-list-file.
     eg. a Doskey macro command suggestion:
       doskey rd=c.exe -r $*



PARENT
     As cd .. changes to parent-dir, "c ..someup" changes to
     a dir in the current "path-to-the-current-dir" only.


"PATH SEARCH"
    If you prefer searching via Arrow-keys, either start with
    "c -p" or press CURSOR-LEFT (or CTRL + CURSOR-LEFT) when
    a dir is displayed.
    (Text-search "PATH SEARCH" for more details)



INFO DISPLAY
  "c" will give info on all volumes up to Lastdrive as set with Dos.
  "c -?" or "c /?" display some info/reminders on the syntax for c.exe
  and Dos environment variable settings.

  (((
   Keeping lastdrive(config.sys) as low as possible FREEs UP MEMORY
   eg. enter inluding the ":   mem/d |find /i "last"
   Remark:
     Even if you don't have a "lastdrive" statement in the config.sys,
     will Dos have assigned it a value. Enter "Mem /d | more" to check
     this. Or see online help entering "help" from 6.* Dos versions
     onwards.
  )))

  (((
    REMARK
      Note that this is not the original purpose of this program which
      is a change-dir program. On some "exotic" OS not all info is
      available - neither on old Ms-Dos versions.
      However, eg. I went to the lengths to program special code for
      ASSIGN of Os/2 warp which seems to differ from the MS-dos' assign.
  )))



  CD-ROMs (mscdex)
    eg, enter "c" might help to check what CD-disk is in the CD-drive.
    You'd see whether the first track is DATA or AUDIO (music), or
    whether the CD-rom-drive is EMPTY. And the label of the CD-rom,
    where available.

    ((
      A CD-rom via a network, represents merely a network-drive,
      as always.
      In a win NT's dos-window this may produce wrong info.
      etc.
    ))



  HIGHEST DRIVE DISPLAYED WITH INFO "c"
    You can specify a value for the HIGHEST DRIVE to be displayed:
    SYNTAX:
        set JC-CD.$$:=00Z
                        ^--->sets the maximum drive letter
      eg:
        set JC-CD.$$:=00k
        => display until (including) drive K:

    VALID VALUES
      are A to Z, a to z,  [ to `, and 0
      Other values will simply be ignored (0 is also ignored).

      (((
        [ to ` are for Novell Dos - whatever that is good for.

        I.e. you can set this value above dos' setting of lastdrive or you
        can set it to just A:, if you so desire.
        I.e. if you don't set this, then you can check the current setting
        of Lastdrive as this is the last letter displayed by c.exe
      )))

    ((
      NOTE
        If you use other parameters with c.exe on the command-line, they
        may override.
        Eg.
           you've set last-display-letter to G:. The dos-lastdrive is
           however Z:. If you then want drive infos for drives of hard
           disk 1, then all letters until Z: will be checked if they
           belong to hard disk 1.
    ))

    More options for selection:



  MORE DETAILS ABOUT THE DISPLAY
    Some of the following mentioned information is only available
    if a "true dos compatible system" is provided and might not be
    available on old Dos-versions, using Novell, Windows NT Dos boxes,
    etc.

    TEXTMODES
      Textmodes with 40 columns, etc. are supported. The display will
      then be different, eg. if 40 columns, then one drive per line,
      (also with 50 lines display).
      (((
         eg after using:
           mode con lines=50
           mode con cols=40
      )))

    COLOURS
      If the monitor was COLOR at program start, then certain different
      DRIVE TYPES display different colors.

      HARD DISKS
        The first 3 (or so) HARD DISKs will have different colours.
        (eg. not available on OS/2 warp' Dos)

        This also applies to subst-drives, if they "match" to a local
        hard disk. I.e. you could see that eg X: is a substituted drive
        which is located on the physical hard disk 1.



    ABBREVIATIONS
      The drive-types also carry abbreviations for certain types, eg:
      f = floppy
      Net = network
      Sub = substituted drive,
      Assigned2 X: = drive is assigned to drive X:
      LastTime = X:  if "mapped floppy" / or substituted mapped floppy
      etc.           (i.e. if a PC has only one floppy usually B: is
                      mapped to A:)


    ETC.
      The CURRENT DRIVE is marked INVERSLY to its left hand side.

      INVALID drives display with a trailing -

      Drives which are merely "NOT IN the VIEW" will be "left BLANK".
      This way you can distinguish them from invalid drives.

      Ramdrives are displayed green, if their disklabel contains the
      string "RAMDRIVE". This allows to recognize a ramdrive which
      is a network-drive (i.e. using a ramdrive which is on another
      computer). It will still have the red colour to its right and "net"

      A CD-rom from another computer over the net might be recognized via
      the empty disk space being "0.0"

      As soon as you press a KEY, the info display STOPS.
      ((
        as soon as it is "given back control by Dos". You may need
        to wait, should for example a network drive "hold up traffic"
        - as soon as it times out, your having pressed a key stops c.exe.

        Before a drive is examined (label / disk sizes), you'll see
        "...wait..." i.e. while this is displayed c.exe has given control
        to the operating system, waiting for its reponse.
      ))

      (((
        At the bottom you'll see the setting for the dir-list file-names
        i.e. the name it would have for the current drive. And there'll
        be the settings of the environment variable "jc-cd.$$:", if this
        variable has been set to any value, that is.
      )))



  NETWORK IDs
    "-n" IDs of network drives only.
    (as "UNC" names, SERVER\\path)



  INCLUDE FLOPPY
    "-f" *add* floppy info to all drives info.

    (Displaying "f" indicates this is floppy)

    This is also displayed for drives which have been substituted to
    a floppy, after eg: "subst x: a:\"
    ((
      only on "newer true Dos compatible systems", i.e. usually ms-dos 4.*
      and later
    ))



  LOCAL
    "-L" info for local drives only.


  LOCAL, A PARTICULAR HARDDISK
    -0 will for example list only info about hard disk 0
     (valid values are 0..9)
     (only available on "true Dos-compatible systems", ...as mentioned)

    (
      Note that while DOS Fdisk does assign the number 1 as the lowest
      number for a hard disk, C.EXE tries to stick to common BIOS
      numbers. i.e. 0 is the lowest number.
      (often refered to as hexa-decimally 80 in the BIOS setup)
    )


  SUBST
    Entering the DOS command "subst" without parameters gives the
    paths to which the substituted driveletters refer to.

    C.exe lists them if enough space is available for the path.
    If not, then the last char is a ">" sign. For disk sizes refer
    to the source-drive.
    ((
      on OS/2 warp subst is detected, but no path available, etc.
    ))



  ASSIGN
    Eg. enter the DOS command "assign /status" for info.
    Eg.
      after "assign b: a:"
      C.exe displays for B: "Assigned2 A:"
      ( also on os/2 (warp) )

  GENERAL NOTE
    Entering "truename X:" should give info on the "true name" of a
    drive/dir


  ASSIGN + SUBST
    If you're curious about details on this, see "additional technical
    remarks" for a "novel" about this<g>.


  JOIN
    not known how this goes down with C.EXE.


  LABELs
    To change the displayed label-names for the volumes/drives
    use the DOS-command: "label"  (except for CD-roms, etc.)




TOP TEN LIST
  DIRECTORIES
    c.exe can play a top ten list you have selected. You can add
    entries to this list YOURSELF, or/and you can ask c.exe to
    AUTOMATICALLY keep track of all dirs you access via c.exe

    This way you could always change back to the previous directory.
    (c -b)

    The "track last accessed dirs feature" requires to be activated.
    It's activated via dos environment variable settings. At this point,
    this is a bit lengthy to explain. Just briefly:
      -activating "track last dirs feature": set jc-cd.$$:=000T
      -poping up top-ten list: "c -t"
       (only available after you have used c.exe to change to at least
        one directory
       )
      -adding an entry to top-ten list: "c -t x:\some\dir"
       ("." for the current directory)
      Optional:
      -set file location: set jc-cd.$$:T=x:\xdir\topten

    Perhaps just to keep the idea in mind for now... and look up the
    details once you are familiar with using c.exe. For details text-search:
    "top ten list feature"


  COMMANDS
    c.exe together with cc.exe can additionally keep another top ten list
    of commands. Commands are added "manually" only: "c -g some command"
    This however, is probably better achieved by using doskey-macros
    instead of this command top ten list.






###########################################################################
###########################################################################

SPECIFIC INFORMATION


  DRIVE / RECOGNIZE PARAMETER AS DRIVE (detailed explanation)

    Changing a drive without having to add ":" may be a useful feature.
    However, there is an environment variable you can set to change this.

    THREE SETTINGS:
      Whether or not a single-letter parameter is interpreted as a
      drive-letter depends on a setting in the environment variable
      JC-CD.$$. There are three settings:

      1) set JC-CD.$$:=L       <->if LAST parameter
      2) set JC-CD.$$:=:       <->must have a trailing colon :
      3) set JC-CD.$$:=0       <->first non-switch-parameter
                                  which is one letter

                               "non switch parameter" means, that it is
                               a parameter which does not begin with
                               - or /
                               eg.
                                 c -i        -i = switch paramter
                                 c anydir    anydir = non switch parameter

                               eg.
                                 c -i d
                                 recognizes d as drive D:, since this is the
                                 first non-switch parameter which is a
                                 "single character" only.

         Note, 3) also applies if JC-CD.$$: is not set at all,
         i.e. has no value.



    DEFAULT:
      Setting 3)


    I'll start here with features which are valid *regardless* of the
    settings. Followed by points on the sub-dir search. Then there'll
    be the detailed explanantion of all three settings.


    OVERRIDE
      There are ways to "OVERRIDE" whatever setting of the above
      environment-variable:

      -1-Add a trailing colon
         eg: "c d: dirx"
         always interprets D as a drive letter, as it has a trailing
         colon :

      -2-Add a leading colon
         eg: "c :d"
         always interprets d as the letter D of a *directory* name
         (eg. a directory D or D*.*)

      -3-
        "c g -" or "c g \"  or "c g /"
        equals at the dos-level:
          g:
          cd \
        regardless of the setting for JC-CD.$$:
        ((
          obviously this must refer to a drive-letter since the dir
          is obvious (the root) and hence g cannot be part of the dir's
          name
        ))
        (((
          "c -" equals "c /" equals "c \" equals at the dos level: cd \
        )))



    SUB-DIR SEARCH
      eg.: "c .d"
      searches for a dir D or D*.*




    Following are the explanations for the three different settings:



    DEFAULT SETTING  (variable is not set, or set to "0")

      ...The first non-switch parameter which is a single letter
         is interpreted as a drive-letter.
           eg: "c d" changes to drive d:
           (you can still use "c d:" of course)


      If no trailing colon is added:
      NOTE:
          -if this letter is ABOVE the LASTDRIVE-letter,
           it is not interpreted as a drive-letter, since there is no
           such drive-letter under Dos.

          -nor if it is the same letter as the current drive's,
           since changing to the current drive seems unnecessary
             eg:
               "c c"
                ->will change to drive C: if c: is not the current drive
                ->will search the directory C*.* if c: is the current drive
           except if you have specified more than one non-switch-parameter
             eg:
               "c c some dir here"
                   -> this will search the dir "here*.*" on drive c:
                      regardless which volume is the current drive.
                      Assuming that having entered many parameters
                      indicates that the first is a drive.


      Question & answer

      ...How do I indicate that I do *not* want to change to DRIVE D:
         when entering "D" as a parameter:

          -enter a : first, eg: "c :d"  or  "c : d"

          -add a searchString of a "higher" dir, eg. "c th d"
           with c:\thisdir\thatdir\d

          -use a sub-dir search "c .d"

          -enter the current drive first: "c c d"

          -*OR* SET the environment variable JC-CD.$$: to ":"
           (will be explained below, after the examples)



      EXAMPLES:  (lastdrive=F)
        to cd to  c:\l    "c l"    (l is above the lastDrive)

        to cd to  c:\l\d  "c l d"  (       "           , d is not the first
                                     non-switch parameter)


      MORE EXAMPLES:
        you are in: e:\temp
        on Drive C: you were last in:
                 c:\l\tPascal\proj1

        to cd to c:\l\tPascal\proj1\UNITS -> "c  c .u"   (subDir on Drive C:)
        to cd to c:\l\tPascal -> "c  c .."  (parent Dir of current Dir on C:)






    SETTING :
    set JC-CD.$$:=:

       This is simpler than the default. Whenever you want to refer to a
       drive, you need to stick to the DOS-syntax,  eg: C:  D:  E:
       i.e. a colon must be added.

       EXAMPLES
         "c d" will change to a directory D*.*
         "c d:" will change to the drive D:

         "c d -i" will interpret d as a directory D*.*, and therefore
                  initialize the current drive and then change to dir D*.*

         "c d: -i" will initialise the dir-list-file for drive D:

       (((
         Note the TWO colons in "set JC-CD.$$:=:"
           the env-variable ends with a colon (JC-CD.$$:)
           = is the Dos-sign for assigning the value (=)
           the final : is the actual value to which the env-variable is set
       )))



    SETTING L
    set JC-CD.$$:=L         (if Last parameter)

       This is based on the default setting. Yet it ADDs one more
       CONDITION. Single-letter non-switch-parameters are interpreted
       as a drive-letter ONLY IF they are the LAST parameter.

       EXAMPLES
         "c d" will change to drive D:
         "c d th" will interpret d as dir D*.*, and therefore eg.
                  change to "C:\D\thisDir"

         "c -i d" will interpret d as a drive-letter, and therefore
                  initialize drive D:, because d is the last parameter.

         "c d -i" will interpret d as dir D*.*, and therefore
                  initialize the current drive and then change to
                  dir D*.*




    ((
       Whatever setting you choose, I'd recommend to enter
       switch-parameters and . first
       eg.:
          c -i d
          c -m newDir
          c -b bakFile
          c -d someDir
          c . someDir
          c . d"
    ))


    ADD-ONs
      If you prefer you can still use Dos-syntax-like chDir-parameters.
      eg.:
        c \dos

      (((
        eg.:
          c d \os2
        If there is no such directory, then the drive will be changed,
        so that you are conveniently already on the drive in question and
        can check what went wrong there, searching for a dir os2 on
        the then current drive.
      )))







  ====================================================================
  SUB-DIR SEARCH

   syntax:  c  .[string] [string] [string...]

       (((
         also "c . string" or "c string ."  or "c drive . string", etc.
         HOWEVER, highly recommended to use:
           c .string
           c . string
       )))

    ...changes to SUB-Directories only
       eg:
          you are in c:\xy
          given:
            c:\xy\ABC\games1
            c:\xy\ABC\games2
          enter:
            c .2
          to cd to:
            c:\xy\ABC\GAMES2


    ...to cd to the first sub-directory: "c ."
       (eg. useful when there is only ONE sub-directory)


       Given the following directories:
        c:\etc
        c:\one\two\etc
        c:\this\etc
        c:\this\one\etc

       When the current dir is c:\this, entering "c .etc" will
       help changing to C:\this\etc rather than eg. c:\etc

       Also, it is firstly assumed that you want to change to
       DIRECT subdirs:
         C:\this\etc  will display first.
         C:\this\one\etc  will be displayed if/after you have pressed
                          spacebar.

       Other (sub-sub-dirs) will be displayed after this.
       (((
          Still there'll be assumptions as regards to dirs exactly
          matching the given searchstring, or merely starting with
          the given searchstring ...etc...etc... trying to help
          select more preferable matches first.
       )))






  ====================================================================
  PATH SEARCH
    "c -p"

    If a + sign is displayed, it indicates that a dir has further sub-dirs

    REQUIREMENTS:
      Requires AT-MF2 keyboard or compatible driver.
      (((
         You could try installing MS-DOS keyb.com
         eg:
           KEYB.com US,,C:\DOS\KEYBOARD.SYS
         in the autoexec, or from the command-line. Try LH for highloading
         in the autoexec. (US is the setting for the US-keyboard layout)
         (for details enter "help" on a MS-Dos 6.* system, see keyb.)

         However, "practically all" keyboards "these days" are MF2-type.
      )))


    KEYs:
      RETURN: chDir to currently highlighted dir

      CURSOR-LEFT or CTRL + CURSOR-LEFT: up one dir
      CURSOR-RIGHT or CTRL + CURSOR-RIGHT: down to currently highlighted dir

      CURSOR-UP/DOWN
      PAGE-UP/DOWN
      POS1, END: highlight another dir

      CTRL + CURSOR-UP/DOWN:  ! highlight next dir which has sub-dirs (+)

      SPACE-BAR: toggles between displaying only + dirs and displaying
                 *all* dirs.

                 This should help paddling your way down to a certain dir
                 through a long tree. Once a dir does no longer have dirs
                 which themselves have sub-dirs, these "end-dirs" are
                 displayed.
                 ((
                   Since, well if you still want to continue along this
                   path, then obviously it must be amongst those "final"
                   dirs.
                 ))
                 So to speak:
                  -At the end of a branch you can see ALL leaves.
                  -Along a branch you can only see dirs which are not leaves
                  -And, branches have a trailing +



                 Alternatively, while searching for a dir, you could
                 eg. hold down CTRL to quickly make your way to its
                 parent dir. With CTRL plus CURSOR-UP/DOWN c.exe will
                 ONLY "jump to" dirs which have further sub-dirs


      a..z, A..Z, etc.: display the first dir beginning with this
                        letter at the top of the screen.



    ADDITIONAL REMARKS
      With -p you need to press RETURN to actually chDir.

      (((
         Since other keys like a..z are used to jump to a dir beginning
         with this letter.

         Once you have entered  a..z entering another a..z does not have
         any effect, since, well, if one wants to enter "thisDir" it is
         assumed one would enter "c this" instead of using a "-p" search.
      )))

      "c .X -p" or "c X -p" is not accepted, because there might be
      several dirs X. Instead simply enter "c .X" and when you have
      reached the correct dir X, press CURSOR-LEFT or CTRL + CUSOR-LEFT
      to start a -p search.

      ((
        Something as trivial as changing to the root of the current drive
        or to another drive like "cd \" or "c -" or "c d /" etc. can't be
        done via "c -p" since one could simply enter "c -" "c /" "c \" etc.
      ))


    Further Examples:
      sub-dir and drive indications "valid as always", eg.:
      "c . -p" or
      "c .-p"  =>search from current dir downwards

      "c d -p" search entire drive D:
      "c . d -p" search on drive D: from the current dir on D: downwards


    (((
      you can eg. start with "c dirname" and when this dir gets displayed
      press CURSOR-LEFT (or CTRL+...), if you want to search "a dir that
      is somewhere below the dir 'dirname' and whose name you don't know"
    )))
    (((
       Remarks:
         When you get eg. c:\this\is\dirname displayed and this dir has no
         sub-dirs (in the dir-list-file): If trying to start the path search
         with pressing CURSOR-LEFT you'd hear a beep to inform you that
         there are no further sub-dirs to this dir. You can press spaceBar
         to keep searching for other matches of "dirname".

         Yet, if you enter "c -p" in a dir with no sub-dirs, it is assumed
         you definitely want to start a path search. The current dir will
         be displayed and you'd need to use cursorLeft/CTRL+cursorLeft,
         because there are currently no sub-dirs to choose from, obviously.
    )))



  ====================================================================
  (
    Remark
      For a suggestion for an introduction to batch-file programming,
      eg. see my separate upload - e-mail for upload info.
  )

  ====================================================================
  BAKFILE changeDir  "-b"


  If you would like to switch between two or a couple of directories
  by entering one word, use:

  syntax:  "c -b <batFile>"
                  batFile: 1 to 8 characters (for a file-name "prefix")

  Entering "batFile" would get you back to the dir you were in,
  when having entered "c -b batFile"

  IMPORTANT:
    -this will only work
      -if the directory %TEMP% is within your %PATH%
      -if there is no doskey-macro "batFile"
      -%TEMP% might need to be the first dir in the %PATH%

    -c.exe creates a file %TEMP%\batFile.BAT

    -an existing file %temp%\batFile.bat will be DELETED



  RECOMMENDATIONs:
    -putting %TEMP% as first dir in the PATH

    -pointing %TEMP% to a RAM-DISK, thus all "batFile.bat"-files will be
     deleted automatically on power-off.
     ((
       Or you probably simply delete all files in %temp% in the autoexec.bat
       anyway.

       Other than that, note that the -c and -b batch-files can
       'auto-delete' if they are run with } as first parameter.
     ))


  EXAMPLE:
    In autoexec.bat, commands as follows:
      ctty nul
       md e:\temp
      ctty con
      set TEMP=e:\temp
      PATH %TEMP%;c:\dos;c:\windows;c:\bin;
      :: ctty surpresses the error message which pops up if e:\temp
      :: already exists


    (
     EXPLAININING -b
       %temp%=c:\temp
       You are in the directory D:\lgges\pascal\bin\tools:
       you enter: "c -b too"
       => File e:\temp\too.BAT is created.
       It contains:
         D:
         cd d:\lgges\pascal\bin\tools

       Now you are in directory d:\lgges\c\bin\tools:
       you enter "c -b ctoo"
       => File e:\temp\ctoo.BAT is created.
       It contains:
         D:
         cd d:\lgges\c\bin\tools

       Consequently merely entering "ctoo" or "too" can get you to the
       right directory.

       However, as always with Dos - this won't work if you have eg.
       ctoo.exe or ctoo.com in %TEMP% or the current dir, or another
       ctoo.bat in the current dir. If you have a doskey-macro "ctoo"
       you'd simply enter a blank before "ctoo", i.e. " ctoo" will
       circumvent the doskey-macro and look for a "real" command ctoo.
    )

    (((
       REMARK if you set TEMP to a ramdrive:

         If your drive-letters frequently change, and you want to
         automize detection of the ramdrive, you could eg. scan the
         drive's label for the correct label, eg. "RAMDRIVE"
         example (requires dos-version where FIND sets errorlevels)

           ::  lw= laufwerk = drive,
           ::  dosLw = drive on which \DOS is located (usually C: )

           set tmpLw=C:
           ::^default

           set drv=D:
           vol %drv% | %dosLw%\dos\find.exe "RAMDRIVE" >nul
           IF errorlevel 1 GOTO d
             set tmpLw=%drv%
             GOTO RamDriveForTMPfound
           :d

           set drv=E:
           vol %drv% | %dosLw%\dos\find.exe "RAMDRIVE" >nul
           IF errorlevel 1 GOTO e
             set tmpLw=%drv%
             GOTO RamDriveForTMPfound
           :e

           ::adding more letters if necessary

           :RamDriveForTMPfound
           set drv=

           echo ...RAMDRIVE=%tmpLw%
           md %tmpLw%\tmp
           set tmp=%tmpLw%\tmp
           set temp=%tmp%
    )))



  NOTE ON: FILE-NAMEs
    With -b or -c, to allow you to set this to any directory, C.EXE
    follows this simple logic:
      -1- it is assumed you want to use the default %temp% for creating
          the file

      -2- C.EXE scans the file name you give for a . (full stop, dot)
          or a \ (backslash)
          If it finds one or both of these, the file-name given by you
          will be used EXACTLY as given.

    EXAMPLES:
      "c -b go.bat" will create file go.bat in the current dir
      "c -c dirlist." will create file dirlist in the current dir
      "c -c e:\list\filex" will create file e:\list\filex
      (((
        "c -c .\here.lst" will create file here.lst in the current dir
                          (DOS: "dir .\*.*" equals "dir *.*" or "dir")
      )))


  DOSKEY
    Of course, -b is rather a "temporary" feature, eg. for swapping
    between a couple of dir-s you just created for temporary purposes.

    To introduce this as a regular feature you could easily use
    the MACRO function of DOSKEY. You simple write a batch
    that includes all your important chDir-s and you'd call this
    batch at the end of your autoexec.bat - under OS/2 you might
    adapt this macro-batch if eg. the drive-letters change (FAT/HPFS)

    eg:
        (example see file: macs.bat)

        Note that unlike ordinary commands, doskey-macros can
        use "any characters",
        eg.
          doskey ..=cd..
        Entering ".." will run "cd.."

        You could use eg:
doskey ,=d: $t cd d:\a\direc\tory\for\which\I\dont\want\to\expand\the\path $t programx.exe $*


        entering
          , param1
        would run
          programx.exe param1
        on drive D: in the directory
          d:\a\direc\tory\for\which\I\dont\want\to\expand\the\path
        itself.


    ((
      REMARK OS/2
        If D: might change depending on whether you boot OS/2 or Dos
        you could use %variables% in the very file macros.bat
        Eg. in the macros.bat file:
           Instead of
             d:\a\direc\...
           using
             %d%:\a\direc\...

           and setting %d% in the autoexec.bat to a different value
           under Dos and Os/2 respectively.
    ))

    ((
      REMARK on the doskey F8 function:
        Once you have entered
          c:\tools\download\new\test\today.exe
        from any directory on any drive you would simply enter
          c
        without pressing return and then F8 until
          c:\tools\download\new\test\today.exe
        pops up, and then just return.
        (no need to jump to the end of the line)
    ))



  REMARK - RETURN TO START DIR - IN .BAT FILES
           batch-files: you can use this -b feature from
           within batch-files to eg. return to the same dir
           where the batch-file has started from. Eg.:

            @echo off
            c -b back$$$.bat
            ::^creates %TEMP%\back$$$.bat (or %TEMP%back$$$.bat, see below)
            ::
            call x.bat
            programs.exe
            ::...etc...
            ::
            %TEMP%\back$$$.bat
            ::^returns to start-directory & drive
            ::
            del %TEMP%\back$$$.bat >nul
            ::^delete temporary "back file"
            ::

          Note, if TEMP has a trailing backslash, eg. a root-dir "F:\",
          that is of course: %TEMP%back$$$.bat, etc.
          However, often it is not recommended to use a root-dir for %temp%.




   ---------------------------------------------------------------------

   -b -c BATCH ... how to... explaining with EXAMPLES:


     c -c out
       creates file %temp%\out
       which contains all directory paths of the current drive

     c -c out.
        creates file out.
        which contains all directory paths of the current drive
        (
         Reminder: if a . or \ is found in the output-file-name,
         this name is not changed
        )

     c bak -c out
       as above: but only dirs-paths where the dir has the name "bak"


     c g: bak -c out
       as above: but dirs which are on drive g:
       This is business as usual with c.exe
       YET since this is for automated batch-file usage where you don't
       want to press a key, the actual dir-name must always match
       *exactly* the *last* parameter - here: BAK


     c -c out dir
       creates file %temp%\out.bat
       where out.bat would run the command "dir" in all directories.

     c g: bak -c out dir
       Creates file %temp%\out.bat
       which runs "dir" in all directories on drive G: which have
       exactly the name BAK.


     c -cSet out dirlist.bat
       If you append -C with one or more characters this
       will set two variables:
         %d% is the current drive (with a trailing colon : )
         %p% is the path without the drive (eg.: \some\dir )

       Hence in the batch-file "dirlist.bat" you can use
       %d% and %p% - an example for this is "dupTree.bat".

       This also applies in its "logic translation" to
       c -b
       eg.
       SCREEN:
         C:\S\TP\ESO\PR\P\CEXE\BATCH>c -bSet out.bat
         ...wait...
         ...CT1 DOS_WIN
         ...c:\dev\dir\C...read  405

       FILE out.bat:
         set d=C:
         set p=\S\TP\ESO\PR\P\CEXE\BATCH



     Mixing all these examples, following are some more examples
     and excerpts from their output. Also, there'll be ADDITIONAL
     FEATURES explained.

     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c -c out.
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
         405

     file out:
      C:\
      C:\WINDOWS
      C:\WINDOWS\SYSTEM
      C:\DOS

     ...etc...(all 405 paths of the drive)



     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c -c* out.
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
         405

     file out:
       \
       \WINDOWS
       \WINDOWS\SYSTEM
       \DOS
     ...etc...(all 405 paths of the drive)


     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c . -c out.
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           2

     file out:
      C:\S\TP\ESO\PR\P\CEXE\BATCH
      C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
     (End of file)

     Note that you can redirect output of C.EXE when using the -b
     or -c switch. Also C.EXE counts the matches, eg in the above
     example: the 2 indicates only two matches found:
       C:\S\TP\ESO\PR\P\CEXE\BATCH
       C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
     Matches in this case means, these are all sub-dirs.
     (plus the current dir)

     More examples:


     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c .bak -c out.
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           1

     file out:
      C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
     (End of file)



     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c .xxx -c out.
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           0

      e:11

     file out:
      is empty - there is no dir named xxx as specified.
     errorlevel
      is 11


     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c . -c out.bat dir /w
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           2

     file out.bat:
     ...
      cd C:\S\TP\ESO\PR\P\CEXE\BATCH
      CALL dir /w
      cd C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
      CALL dir /w
     ...



     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c . -cS out.bat somebatch.bat
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           2

     file out.bat:
     ...
      set d=C:

      cd C:\S\TP\ESO\PR\P\CEXE\BATCH
      set p=\S\TP\ESO\PR\P\CEXE\BATCH
      CALL somebatch.bat

      cd C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
      set p=\S\TP\ESO\PR\P\CEXE\BATCH\BAK
      CALL somebatch.bat
     ...



     screen:
      C:\S\TP\ESO\PR\P\CEXE\BATCH>c . -cS out.bat somebatch.bat $g$g %temp%\report.txt
      ...wait...
      ...CT1 DOS_WIN
      ...c:\dev\dir\C...read  405
           2

     file out.bat:
     ...
      set d=C:
      cd C:\S\TP\ESO\PR\P\CEXE\BATCH
      set p=\S\TP\ESO\PR\P\CEXE\BATCH
      CALL somebatch.bat >> %temp%\report.txt
      cd C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
      set p=\S\TP\ESO\PR\P\CEXE\BATCH\BAK
      CALL somebatch.bat >> %temp%\report.txt
     ...


     NOTE, SUBSTITUTION:
       $g with >    Greater  (equal to doskey symbol)
       $b with |    Pipe     (equal to doskey symbol)
       $l with <    Lower    (equal to doskey symbol)

       It is also possible to use $p for the Pipe substition:
       $p with |    Pipe      (not equal to doskey symbol)

     ((
        you couldn't use >|< directly, since Dos would apply those
        "at once"
     ))

     If you need to keep the string "$g" (eg. for a doskey-macro command)
     use upper-case G
     i.e.
       NOTE this is case-sensitive with c.exe:
       $G, $B, $L, $P will _not_ be substituted.
       Also, the rest of the doskey-symbols are not substituted.
     EXAMPLE to sum up:
     eg:
      c.exe bak -c test.$$$ $g$b$l $G$B$L.$$       <-c.exe takes this and
            bak -c test.$$$ >|< $G$G$L.$$       <-expands to this




     SAMPLE BATCH-FILES
       For more examples I'd suggest to study the sample batch-files.
       Or simply call them with  -? as first parameter which displays
       info. They are also widely commented.


     USEFUL OTHER PROGRAMS
       I'd like to point to my programs COL.EXE and TOP.EXE especially
       for writing batch-files. Meanwhile I'm using them directly with
       the dos DIR command instead of c.exe. (e-mail for upload info)
       Basically they can easily add a command before the directory
       listings, since they allow to add a new "start-of-line".


     ADDITIONAL REMARK
       c.exe adds some more lines to the -C files.
       eg:
       screen:
         I:\TMP>c c: . -c out.bat dir /w
         ...wait...
         ...CT1 DOS_WIN
         ...c:\dev\dir\C...read  405
              2

       file out.bat:
         @echo off
         IF %1.==}. del %0
         IF %1.=={. GOTO g
         command/e:2096/d/c%0 { %1 %2 %3 %4 %5 %6 %7 %8 %9
         GOTO h
         :g
         shift
         C:
         cd C:\S\TP\ESO\PR\P\CEXE\BATCH
         CALL dir /w
         cd C:\S\TP\ESO\PR\P\CEXE\BATCH\BAK
         CALL dir /w
         cd C:\S\TP\ESO\PR\P\CEXE\BATCH
         I:
         :h

       IF %1.==}. del %0
       <- allows "auto delete"

       command/e:2096/d/c%0 { %1 %2 %3 %4 %5 %6 %7 %8 %9
       <- is a recursive call to provide environment space "galore"

       shift
       <- gets rid of the { as first parameter

       cd C:\S\TP\ESO\PR\P\CEXE\BATCH
       I:
       <-at the end of the batch, this returns to the "start dir"
       <-I: returns to the "start DRIVE"









  ========================================================================
  TOP TEN LIST FEATURE
    You can quickly select from at top ten list of directories and
    change to them. You can
      -create your own top-ten list files
      -add the current dir
      -add any string

      -let c.exe keep track of all dirs you access with c.exe,
       adding them automatically to the top-ten.
       This ladder feature needs to be activated.

    If you let c.exe keep track of dirs, you can also quickly jump
    to the last dir before the current dir. Because this is then
    always the directory number 2 in the top ten list. Use "c -b"
    to get back to this dir.


    HOW TO ACTIVATE *TRACK DIRs UPON CHANGE-DIR* FEATURE:
      set JC-CD.$$:=XYZA
                       ^=> activate TRACK DIRs feature

      If set to 0, then the top-ten list is still deactivated. If you
      don't use the leading X,Y,Z settings (eg. if you don't know what
      they are good for anyway) set these to 0,
      eg:
        set JC-CD.$$:=0001
        set JC-CD.$$:=000T
        => would have c.exe keep track of all change-dirs done with c.exe


    LOCATION OF THE TOP-TEN LIST FILE:
      Similar to the location for the dir-list files. By default the
      top-ten list is kept in the TEMP directory.
      The default FILE-NAME is:
        %TEMP%\JC-CD.$$!   (ie. the "drive letter" is "!")

      Again, as with dir-list files you can set an environment variable
      to specify a different file. This again needs to be path+name which
      can be appended by one char without having to add a dot (.)

      The name for this environment variable is however different. You
      can of course set it to the same value as jc-cd.$$, but perhaps
      you want to create a tiny RAM-drive just for this top-ten list.

      The ENVIRONMENT VARIABLE's name is: JC-CD.$$:T
      eg:
        set jc-cd.$$:T=j:\dirx\topten
        => the top-ten-file will then be: j:\dirx\topten!


    FEATURES FOR WRITING TO THE TOP TEN LIST FILE:
      Regardless of whether the Top-ten "track change-dir" feature
      is activated, you can enter:
      eg:
        "c -t ." -> add the current dir to the top-ten list
                    (details below)

        "c -tX:\DIR"
        "c  -t  X:\DIR"
                -> add the dir X:\DIR to the top-ten list
                   (details below)


    FEATURES FOR USING THE TOP TEN LIST:
      Regardless of whether the Top-ten feature is activated,
      as soon as there is a top-ten file, you can enter:

       "c -t" -> to display the top ten

       "c -b" -> to change directly to the previous directory.
                 NUMBER 2 of the Top-ten is assumed to be the previous dir.
                 (eg. write a doskey macro: doskey b=c.exe -b)
                 (
                   -b is originally designed for usage with the "track
                   dirs feature" activated, but it can also make sense
                   with the appropiate top-ten list files, hence anyway:
                   -b changes to top-ten entry number 2
                 )



    HOW TO SELECT FROM THE TOP TEN LIST, ONCE IT IS DISPLAYED:
      The keys to use after a "c -t" are as with the selection of
      previously displayed entries with an ordinary "c dir" after
      CURSOR-UP.
      eg:
       You can pick the first ten by the number 1..0 (with 0<=>10).
       Pressing 1..0 immediately does a chDir to the corresponding
       directory and c.exe stops.
       (((
          About pressing 1..0 -> Should the number you have pressed be
          higher than the available numbers eg. only 4 too choose from
          but you press 8, then the highest entry available is displayed
          i.e. as if you had pressed the END key.
       )))


    ((
      REMARKS
        HOW ENTRIES ARE ADDED
          An entry is always added as top-ten number 1, pushing the old
          number 1 to 2, the old number 2 to 3 etc. Hence the number 2
          is normally always the last dir you were in, before the
          current dir - i.e. "c -b" changes to directory number 2.
          (
            If you use some doskey macros for changing dirs, you can
            expand them - which probably only makes sense when using
            the "track dirs" feature, where you want to ensure that
            "c -b" gets you back to the previous directory
            eg:
              doskey dos=c: $t cd \dos
              ->
              doskey dos=c:$tcd\dos $t c.exe -t.
          )

        EXPAND ENTRIES
          all entries will be expanded and upper-cased for your convenience.
          You can hence use dos-syntax:
          eg.
              "-t ."  "-t .."  "-t subdir"

        MAXIMUM LENGTH
          "can't" is displayed for an entry which is too long instead of
          adding it.
          (((
             The maximum LENGTH for top-ten entries is limited to speed
             this up for non-ramdrive-users. - is at some odd 80 chars
             probably
          )))

        RAMDRIVE  (maximum length for top-ten entries)
          If you use the top ten feature, it is highly recommended to set
          the top ten file to a RAMDISK. (as above: set jc-cd.$$:T= )

          It might be worth just to create a ram-drive for this purpose.
          A top-ten file never changes in size. You can create a ramdrive
          that just fits this size. See Dos manuals or enter
            help ramdrive.sys
          (on a Dos 6.* or higher version) for details on ramdrives.

          The Ms-Dos ramdrive.sys program I'm using installs itself with
          as little as 1.264 bytes, and is even high-loaded. The ramdrive
          itself is in the XMS/EMS memory. Perhaps your system allows
          a similarly favorable installation.
          I remember having run a ramdrive on a 286 PC with 1 MB in the
          "UMB area" with ms-dos 4.01.

          You can use this "anywhere" you can put a DEVICE= statement
          (os/2, win, etc. - (may depend) ). Or better with real Dos the
          DEVICEHIGH statement (not on OLD Dos- versions)
    ))


    ADD ENTRIES TO TOP TEN YOURSELF
      "-t ."  or "-t."
        The current dir is added to the top-ten list file (as number one).


      "-tX:\DIR"
        "-t" displays the top ten. If you append s.th to "-t" or if you
        write separate parameter(s), it is assumed you want to add entries
        to the top-ten.
        eg:
          "c -tX:\add\this\dir"
          "c -t X:\add\this\dir"



      ((
        EXAMPLES, ETC
          eg. you can also use this to create a top-ten list eg. if when
          using a certain program you would like a special top-ten list
          during this program. i.e. when shelling to Dos from within this
          program. You can eg. start this program via a doskey-macro
          calling a batch-file. In this batch-file, before the program is
          started, simply assemble your top-ten:
          eg:
            @echo off
            c.exe -t c:\tools\bat\text
            c.exe -t c:\text\info\dos
            c.exe -t g:\doc\prog\asm\etc
            c.exe -t g:\prog\dos\app1

            c.exe -b befApp1 >nul
            ::^creates file %temp%\befApp1.bat which would change to the
            :: current drive and dir

            ::dir/w
            g:
            cd\prog\dos\app1
            ::^change to the directory where the program is

            program.exe -param1 -param2
            ::^starting the application program

            if exist %temp%\befApp1.bat GOTO okBakToRoots
              echo ...bak-batch file not found: %temp%\befApp1.bat
              GOTO end

            :okBakToRoots
              echo ...((back to start-dir
              CALL %temp%\befApp1.bat
              ::^returns to original dir
              del %temp%\befApp1.bat
              ::GOTO end

            :end

          This is just a suggestion. Other ideas are:
          Eg.
             -1-
                -Create the top-ten list file, and store it.
                -Then before starting a program, simply copy its top-ten-list
                 file to where c.exe would store it.
             -1b-
                -before starting a program copy the existing top-ten file to
                 a backup file, eg *.BAK
                -after the program is finished copy the .BAK file back
                 to its original name.
                This way, you could have individual top ten lists for each
                program.

             -2-
                Use the environment-variable of the TopTen-list:
                Store the original value of it, and replace it for the
                top-ten file you use with this program
                eg:
                  @echo off
                  set jc-cd.$$:T_BAK=%jc-cd.$$:T%
                  ::^save old value
                    set jc-cd.$$:T=G:\prog\dos\app1\topTen
                    ::^i.e. the indivdual top-ten list file-name is:
                    :: C:\prog\dos\app1\topten!

                    ... starting the application program...

                  ::>restore old value
                  set jc-cd.$$:T=%jc-cd.$$:T_BAK%
                  ::>delete temporary value:
                  set jc-cd.$$:T_BAK=

                Should you get an "out of environment space" error-message
                of Dos, add a high enough value via /e:value in the
                config.sys to the
                  SHELL=.... command.com /e:value
                statement. Enter "help" from Dos 6.* versions onwards, see
                shell, command.com.


    (( REMARK file/RAM-disk/hard disk
         The "downturn" of the "TRACK-dirs" feature is of course that
         it requires writing to a file *every time* you change a directory.
         Using a ramdisk for this file IS fast. Using a hard disk probably
         depends on
          -the speed of this hard disk
          -the cache you are using (if any)
          -if you are using write-back cache (eg. smartdrv g+ for drive g:)
          -etc.
    ))

    ((
       REMARK:
         no check for valid entries in Top Ten
           The top-ten list is not checked for the validity of its entries.
           This would slow down c.exe and increase its size.
           ((
             As the Top Ten can include entries for ALL drives, there might
             easily be an entry for a floppy or a network drive.

             Also, you might be assembling your own top-ten when the actual
             dirs will be created at a later time, eg. by the application
             program (as eg. in above given example)
           ))


         Paddling trough the top ten
           Entries in the Top Ten list which you no longer choose, will
           dissapear after 10 new entries anyway.
           ((
             invalid entries will not be able to jump to number one
             even if you attempt a change-dir to them
           ))

           An added dir is placed as number one. Picking a dir from the
           top-ten list itself, also places it to number one - This way
           the "most-often-used" dirs stay in the top-ten list.

           This also ensures that number two is the dir you have last
           been in - if having activated the "track-dir-upon-change-dir"
           feature, and using c.exe for all chdirs.
    ))

  REMARK
    You can also use this with cc.exe, eg: "cc -t"
    "cc -b" - if having activated the "track-dir-upon-change-dir" feature.
    (((
      Also for your convenience "cc -t x:\addDir", etc.
    )))










  =======================================================================

  TOP TEN LIST FOR COMMANDs
    This is all pretty much the same as with the change-dir top ten list.
    The switch is -G (as -C is already being used) -G as "GO ...."
    Differences:
      -The file-name now ends with a - instead of a !

      -There is no "auto-track" feature

      -whilst the dirs are upper-cased, commands are not upper-cased
       (since certain commands may be require lower case parameters)

      - !
       c.exe uses too much memory to ensure starting sub-programs.
       Hence the -G list is to be run using CC.EXE - simply entering
       "cc -g"
       ((
         For your convenience you can however add commands via c.exe
         eg. "c -g dir/w"
       ))

      -The DIR top-ten displays the 2nd dir as default, since this
       is the previous dir with the auto-track feature (and perhaps
       also with the add-yourself feature). The COMMAND top-ten always
       displays the 1st as default. (It is the command you have used
       most oftenly)

    ((
      REMARK
        As for the command top-ten, it might make more sense to use
        doskey - if you consider that doskey takes up too much memory,
        perhaps if you tried to decrease this and use LH to highload it
        ("help doskey" (on Dos 6.* or later) -> bufsize)
    ))









###########################################################################
###########################################################################

TECHNICAL INFORMATION

  MAXIMUM PATH LENGTH FOR DIRS
    Dir-path length maximum is theoretically at some odd 250 characters.

  MAXIMUM NUMBER OF SEARCH PARAMETERS
    Maximum searchStrings:8, each at a maximum of 12 characters.

  SELECT FROM PREVIOUSLY DISPLAYED PATHS
    Max. 255 previously displayed entries can be selected with
    cursor-up/down, etc.

    You can pick the first ten by the number 1..0 (with 0<=>10).
    ((
      Pressing 1..0 immediately does a chDir to the corresponding
      directory and c.exe stops. The pressed number (1..0) will
      not be on the command-line. Whereas entering a command, etc. would.
    ))

    ((
      About pressing 1..0 -> Should the number you have pressed be
      higher than the available numbers eg. only 4 too choose from
      but you press 8, then the highest entry available is displayed
      i.e. as if you had pressed the END key.
    ))
    (((
       Note that the spaceBar, as always continues searching. You'll
       notice that the leading numbers have dissapeared and the next
       entry matching the search criteria is displayed. If there is
       such an entry. Otherwise c.exe stops. If there is such a new
       entry displayed, then you can of course immediately use cursor-up
       to select from previously displayed entries, as always.
    )))


  (((
  KEYS pressed at the END
      -RETURN is swallowed, to not have an unnecessary blank line
       when ending c.exe.

      -CursorRight (ending c.exe) is converted to spaceBar, to avoid
       seing the first letter of the previously entered c.exe command
       "pop up" at the dos-prompt.
                                   For doskey users, this is the way
       to enter a command which is the same as a doskey-macro. If you
       do not want to run the doskey-macro, this is typically achieved
       by entering a blank before it. Eg. " d" runs d.com, d.exe, d.bat
       because this is different from a doskey-macro "d" which has no
       leading blank. Usually you would press spaceBar for this. Yet
       spaceBar with c.exe indicates you want to continue searching.
       Hence allowing the Cursor-right instead of the space-bar here.

      -CTRL-BREAK is usually swallowed, i.e. not output to the dos-prompt.

      -CTRL-C has mostly "ESC" displayed

      -SpaceBar is swallowed, if you have pressed it to have c.exe search
       more entries which match, but there are no such entries
       (To avoid having a leading blank on the command prompt)

   )))


  TEMP - DOS ENVIRONMENT VARIABLE
    TEMP may or may not end with a \
    eg:
        "set temp=d:\tmp\"  equals "set temp=d:\tmp"



###########################################################################
###########################################################################

ADDITIONAL TECHNICAL NOTES

  maximum number of dirs
    Maximum of directory-entries per drive: 12000
    (version with maximum of approximately 16383 is available)

    But C.EXE might run out of memory beforehands (real mode program)

    Anyway, anywhere above some 1500 dirs, the Dos FAT system as such
    might get very slow with "c -i", wheras reading/changedir, etc. will
    still be very fast.
     c -i .
    is also often much faster than
     c -i
    and
     c -d .
    is then often much faster than
     c -d

    And finally, each directory under FAT uses the size of a cluster,
    or so. If the cluster size is 8192, 15000 directories would use some
    117 MB even without any real file on the drive....

    ((
     ini + max
       "c -i" will create a file with all dirs, no matter if they
       can be supported later on for searching; i.e. this file may
       contain either too many dirs, or might be too large to fit
       within the available memory.

       I'd assume C.EXE should "work" up until some 10000 dirs - i.e.
       it'll simply display an error msg. if out-of-memory or too many
       dirs.

       Any time C.EXE displays "...read..." it has read the *entire*
       file. It creates redundant lists in memory to speed up the
       search algorithms.
    ))


  param  order
    The order of the parameters is most of the time quite unimportant,
    eg:
      c -d . toDir" = "c toDir . -d
    Both will delete any invalid entries in the file, as far
    as directories from the current dir downwards are concerned,
    and then search with the search string "toDir", also from the
    current dir downwards. However, I recommend  entering non-
    switch parameters first - see my comment on JC-CD.$$:
    here recommended:
     c . -d todir
     c -d . todir
     etc.

    The ordering is not unimportant with
      c -m newdir
      c -r olddir
      c -t newentry
      c -g newentry
    etc...


  current dir
    As a chDir to the current dir doesn't make sense, the
    current dir is not offered for a chDir. However, one might
    forget what dir is the current dir on *another* drive. Hence,
    if you enter "c e tw" to chDir to E:\one\two -> Even if
    this is the current dir on E:, E:\one\two is displayed.


  For the IMPATIENT user:
    press ESC.

    Note that if you've pressed ESC during -i, the closed file is then
    of course probably not containing all dirs of the drive.


  For the VERY IMPATIENT user:
    Press ESC, press CTRL-C.

    If you press CTRL-C eg. during a "c -i" initialise, the program
    should react promply if BREAK is turned on:
      check your DOS-setting of BREAK (enter "help break" or "break /?)
      enter "break on" to turn it on
    ((
     On some systems you might press CTRL-BREAK instead, yet try CTRL-C
     first.
    ))

    It should display a "closeFile" message, yet, if you happened to press
    Ctrl-C again just after closing the file and before displaying the
    message, well, this message won't be displayed. If you'd still like
    to check the proper file-close, you can use SCANDISK in these cases.

    However, it is not recommended to use the CTRL-C as a *regular* feature
    during an initialization. This is rather an "emergency exit". ESC
    should do a better job.



  Why does it INI all by itself?
    C.exe does certain checks as regards to the logic of the dir-list-file.

    If the current dir is not in the dir-list-file, c.exe runs a "c -i"

    However, using "c -m" etc. or the described Doskey-Macros should allow
    to keep the dir-list-file always up-to-date.

    (see also examples given for this & deltree, text-search "DELTREE"
     "make-dir"
    )

    To sum up:
      Could happen if you made directories without using c.exe
      - yet, as mentioned above, you can simply install doskey macros
        replacing Dos' "md" and "rd" (see above: MKDIR) and add c.exe
        to a deltree, move etc.

        Note that if you enter a blank before any doskey macro,
        eg: " md", that will circumvent it.
        ( Since " md" is not equal to: "md" )


    Additional remarks
      Also, c.exe tries to help you out if you have changed the CD-media
      in the CD-rom-drive. It will automatically start initializing, if
      it discovers a difference.
      (((
         Currently c.exe tests 2 directories. If they are not on the CD,
         c.exe assumes the CD has been changed, resulting in an "c -i"
         for this drive.
      )))

      Also, certain "nonsense" operations will not be performed.
      ( eg: "c -d" on a CD-rom:  you can't rm/md/deltree on a cdrom
             -> results in a "c -i"
      )

      And "c -i" is so fast on a CD-rom, a "c -i ." will be "converted"
      to a "c -i" unless of course, you have specified otherwise (c -ii)
      (text-search: traditional)

      Apart from that, eg. a "c -i ." is usually much faster than a "c -i"
      depending on how many sub-dirs the current dir has. Obviously
      "c -i ." in the root equals "c -i". Now, in that case "c -i ."
      IS slower. Therefore, a "c -i" will automatically be evoked
      instead of the "c -i ." (displaying "new")




  "c . -i" / "c .-i"
    The displayed number at the end are the dirs found from the current Dir
    downwards. I.e. this does not indicate how many dir-s have been added,
    etc.  (doesn't count the current dir)




  CD-ROM
    -i
      cd-rom-s ('run by' MSCDEX, 2.22+) will be read super-fast,
      and this should produce a proper dir-list-file.
      However, should you encounter any problem with this
      super-fast-ini, add 'something' to the "-i" parameter,
      eg: "-iold" or "-ii" or "-iCD" whatever
      This will prompt a 'traditional' ini.

    No writing to it
      CD-rom: ROM = read only memory. The information about a CD's
      content is stored on the CD itself. Now, there's a bit of hazzle
      with different standards. Plus there are some "photo-CDs" which
      will have files added "later on". C.exe can't check this - would
      make C.EXE too large.

    Music CD
      If you have by accident left a music CD in the CD-rom "player"
      you should see s.th. like "#1=audio".
      ((
        However there are some CDs where they put music in one place
        dos-dirs in another - again, checking this would make c.exe
        too large, etc.
      ))
      Also as always all these features might not work properly if
      the Dos "box" provided is not "as good enough as" "real" Dos.


    Unix & all that jazz
      Furthermore, eg. Unix-install CDs or any similar CDs might
      have "Dos-invalid paths" (of dirs) stored. Reading this info
      from CD will therefore stick to these "Dos-invalid paths"
      whereas the "traditional ini" will read via "dos-calls"
      and therefore produce only the valid dir-names. An invalid
      path is eg. simply a path with a directory ending with a .
      In these cases the dir-list-files created via c -i and c -iOld
      will differ. Anyway, you can't use Dos' chdir to those dir.s
      as they are invalid.





  DISKSIZE
    Example for a display upon entering merely "c"
       0 D: CT1 OS2WARP  150.4  107.0

    "CT1 OS2WARP" is the label of this drive (Dos-command: label)

    0 is the "physical number" of this drive (as explained in this file
    under "LOCAL, A PARTICULAR HARDDISK")

    150.4 MB is the size of this volume (drive/partition)
    107.0 MB are available / free

    The MB used, are obtained by subtracting 107 from 150, which equals:
    50 -7 = 43

    This maximum figure depends on your Operating System and the weather.
    BTW, that "dir" and "chkdisk" may display different figures is a
    feature of Dos.

    Invalid drives, for example using WfWorgroups where the drives
    are not "connected" or the shared CD-rom drive is empty, are
    displayed with "nn" (latin for: "not known") instead of label
    and MB figure. Note however the setting for JC-CD.$$: for this.
    For more detailed information, see below under "2GB+ drives"
    (text search "NRND")


    Note that floppies, being very slow devices, are by default not
    included in this info. Regardless of their drive letter (hopefully)
    Eg. if you have K: as a floppy having used "subst"
    (only recognized under real/newer Dos/Win3.* versions)



  UNDOCUMENTED SWITCH: GET HARD DISK TO SLEEP (AT-BUS/IDE)
    c -}x
    may be able to set the hard disk to sleep mode after x seconds.
    While in a bookstore I had once found a book on hard disks which
    was very badly written. About the only thing I could grasp (I did
    not buy it) is a bit of information on how to get a HD to sleep mode.

    There was also I quote in a magazine locally, Anyway, this did not
    contain any information, just a few lines of code (for DOS debug!
    - 3 lines). I remember I got a little more info after a message.
    Be that as it may, it is UNKOWN as to whether this may run on your
    system, nor on which system, nor what could happen if using any other
    hard disk type than the one I tested this on. Some HDs I found simply
    ignore this.

    Although it is your own fault anyway if you are using this program,
    did I still rather leave this as an undocumented switch because of
    all this uncertainty.

    Some may however still want to try this, hence here is some
    information:

      c -}0   -> HD never enters sleep mode
      c -}x
      with x
        0..4  -> HD never enters sleep mode
        5..9  -> HD enters sleep mode after approx. 1 second
        600   -> HD enters sleep mode after approx. 10 minutes

    Now, I found that the hard disk does enter the sleep mode only after
    very approximate time frames.

    The book said, that the eventual values are written into a byte register.
    Hence possible values are 0..255. Now, this value multiplied by 5 equals
    the seconds until the hard disk enters sleep mode.

    For your convenience I've programmed that you can enter seconds, and
    this will be devided by 5, hence 0..4 would be 0, 5..9 would be 1,
    i.e. "c -}60" -> sleepmode after APPROXIMATELY 1 minute

    As the title suggests, this was only indicated for AT-BUS /IDE  hard
    disks. Hence do not use this with other hard disk types.

    I've tried it on a EIDE drive, and it seems ok, but with two hard disks,
    it sets only the first. If you want to eg. get the second hard disk to
    sleep mode after 3 minutes and the first after 10 minutes, then set
    the BIOS hard disk sleep mode time to 3 minutes (this usually always
    sets BOTH hard disks), and use c.exe -}600 for the first.

    Of course the main purpose was meant for hard disks which are
    capable of setting sleep mode, when the BIOS isn't. Eg. if setting
    up an old 80386 with a new HD to run 24 hours a day, etc.



  MKDIR RMDIR  -m -r  md/rd
    SUBSTITUTE -m -r Command.com
      To substitute md/rd *without* using Doskey-macros, you could
      patch the command.com file - if you substitute MD and RD with
      md and rd, command.com will not find them. You can still use
      RMDIR and MKDIR however. Instead Command.com will look for
      an external command MD/RD, which can then be simple md.bat and
      rd.bat files.
                    For patching you need what is often called an
      hex-editor. Debug is a possibility, but perhaps difficult to
      use. Note that there are often two Command.com files. You
      need to patch the file which is used in the SHELL statement
      in the Config.sys. As always, have a boot-disk ready to boot
      from floppy and use your backup-ed Command.com when necessary.
      Make sure the boot-disk is of the same dos-version as the
      Dos-version on the hard disk.


    GENERAL INFO
      First off, "c -m" and "c -r" depend on whether the actual
      DOS rmDir and mkDir could be performed. If not, then C.EXE
      stops - "can't"

      AFTER rmDir and mkDir has been performed the following applies:

      "c -m xxx" in dir C:\ONE with the dir-list-file entries:
        C:\ONE
        C:\ONE\TWO
        C:\ONE\THREE
      will create as a dir-list-file:
        C:\ONE
        C:\ONE\XXX
        C:\ONE\TWO
        C:\ONE\THREE
      since it inserts XXX immediately after it finds the current dir
      C:\ONE. However, it does NOT insert XXX if C:\ONE\XXX is already
      in the dir-list-file, eg:
        C:\ONE
        C:\ONE\TWO
        C:\ONE\THREE
        C:\ONE\XXX
      In this case C.EXE counts 0 dir-s added.
      ((
        dir XXX could have been removed using eg. RMDIR or something other
        then C.EXE and hence the entry C:\ONE\XXX would still be in the
        dir-list-file although C:\ONE\XXX does not exist. In this case
        C:\ONE\XXX can be created using "c -m xxx" adding 0 entries to
        the dir-list-file.
      ))

      "c -r xxx" would remove only the first XXX dir entry, eg:
        C:\ONE
        C:\ONE\XXX
        C:\ONE\TWO
        C:\ONE\THREE
        C:\ONE\XXX
      would then be:
        C:\ONE
        C:\ONE\TWO
        C:\ONE\THREE
        C:\ONE\XXX
      and C.EXE would count -1 (1 entry removed)

      HOWEVER, as "c -m" does not insert an entry which is already
      there (at a proper place), the only way to get a duplicate entry
      would be via deliberatly editing the dir-list-file.

      "c -r xxx" with an existing dir on the DOS side, but no entry
      in the file would simply DOS-remove the dir as always, and leave
      the FILE as it is.


      -m/-r are features where the order is a must:
      you CANNOT use: "c <newdir> -m"
      That's because when storing newDir for later processing
      it needs to be known that this is a new directory rather
      than a searchString - for various reasons (eg. search-strings
      are limited in length). Searching for the "-m" parameter first
      would unneccessarily enlargen c.exe.

      Also, c.exe does not accept additional parameters here:
        eg: "c -m newdir -i ."



  -p & invalid entries
    Invalid dir-entries are displayed with "-p" since otherwise
    all displayed dirs would need to be checked for correctness
    *at start* - which would considerably slow down C.EXE ->
    Eg. if the current dir contains some 300 dir entries in the
    dir-list-file, well, all 300 would need to be checked before
    -p could display.

    If you attempt a chdir to an invalid dir, with -p you'd see
      try -d
    indicating that -d or better ". -d" will remove all invalid
    file-names. However -d is not initiated automatically, since
    you might still want to continue "path-searching" without
    waiting for the "-d ." ini.


  -p & a..z, A..Z
     For ASCIIs above #127, eg. „”, you'd need to enter the upper-case
     character to jump to a dir starting with these letters - if Dos
     allows them for a file-name. However, filenames starting with
     these letters are rare, and those with eg. 0..9,$,{,}, etc
     are supported "as entered."



  2GB+ drives
   - Network drives, Novell, etc. above 2GB or "non-responding"
     network drives.

     The Drive info (c without parameters) or a "c -i" both first
     try to obtain the volumne label (as displayed by dos-command
     "vol"). This may take considerable time for non-responding
     network drives (NRND) (well, they do respond, but it takes
     quite a while).

     A NRND is for example:

     -1- I start "net start full" which connects drive K: on a windows-
         for-workgroups 3.11 network (dos-client), but the server for K:
         is power-off.

     -2- Or WFW again, where K: is a CD-rom drive on this "server" and
         there is no CD in the drive. This case is usually only "slow"
         upon the first call (?).

     The drive info routine of C.EXE by default then continues,
     retrieving the disk-size and free disk-size with a single
     interrupt call of int 21h, ah=36h.

     As for large drives (haven't tested it myself), any disksize
     above 2GB appears as 2GB/invalid. However, it makes sense
     still having retrieved the disklabel. As this (if successful)
     will at least help to "identify" the drive. Therefore the
     volume label check is done *before* retrieving disk-sizes.

       (1) >2 GB
          if you want true disk-sizes, perhaps you might try to "hook"
          the above interrupt to return values for eg. the novell-volumes
          which "add up" to the correct value. As long as AX is different
          from hexa FFFF, c.exe will multiply the figures using a
          real-variable (6-bytes); which would allow disk sizes up to
          2.9 * 10 power 39

       (1b) nn / invalid size returned
          If a drive-size appears invalid (int 21h, ah=36h returns hexa
          FFFF in AX) and NO volume-name was retrieved, then "nn" is
          displayed. ("not known")

       (2) DELAY
           If you want to cut down on the delay, you can keep C.EXE from
           an additional check of the Disk-sizes when C.EXE has already
           found that a *remote* drive has *no volume-label*.
           ( i.e. local drives without volume will still have their
             sizes displayed where available
           )

           Syntax:
           ALL SETTINGS FOR DOS ENVIRONMENT VARIABLE JC-CD.$$:
             set JC-CD.$$:=XYZA

                           X => Reminder:
                             This is either the normal character of the
                             JC-CD.$$: setting as mentioned, or 0 to avoid
                             any setting (other invalid values will also
                             simply be ignored) for the drive-setting as
                             explained at:
                               DRIVE / RECOGNIZE PARAMETER AS DRIVE


                            Y => This is the "cut down on delay for NRND
                                 by skipping retrieving disk-sizes for
                                 remote drives which have no label" feature
                                 as explained just above. Put one char
                                 which is NOT 0 to activate this, eg: 1, R


                             Z => Reminder: sets:
                                  LIMIT LAST-DRIVE LETTER FOR INFO DISPLAY
                                  see:"INFO DISPLAY"

                              A => Reminder: activates
                                   "track dir upon change-dir" feature.
                                   see "top ten list"

           examples:
             set JC-CD.$$:=01
                           ^use default/not set
                            ^if a remote drive returns NO disk-label,
                             skip retrieving drive sizes

             set JC-CD.$$:=:1
                           ^-setting: drive in command-line parameters
                             only recognized if with trailing colon,
                             eg. ( c d: -> drive D:   c d -> directory D  )
                             see: DRIVE / RECOGNIZE PARAMETER AS DRIVE
                            ^-as above

             set JC-CD.$$:=L1
                           ^-setting: drive in command-line parameters
                             only recognized if last,  eg: "c -i k" "c k"
                            ^-as above

             set JC-CD.$$:=00K
                           ^-no setting
                            ^-no setting
                             ^-last-drive letter always: K

             set JC-CD.$$:=01K
                           ^-no setting
                            ^-as above
                             ^-last-drive letter always: K

             set JC-CD.$$:=000T
                           ^-no setting
                            ^-no setting
                             ^-no setting
                              ^-activate top ten "track on change-dir"


          As for "no-disk-size for remote drives without label",
          this cuts the delay to about half the time.

          NOTE
          -1- However, you can always use "c -L" which skips remote-drives
              altogether.

          -2- If you PRESS a KEY during the drive-info this will stop C.EXE
              as soon as Dos has given back control.

          -2- You can use eg. "c -0", "c -1", etc. to pick certain
              hard disks. (under real/newer Dos versions, etc.)
              (not under OS/2)






  ASSIGN + SUBST
    You can use both commands and mix them to create perfect havoc on
    the PC. This is a somewhat humouristic discussion of a few of the
    possiblities. However, this might also be a means to eg. assign a
    CD-rom drive to a different drive letter from the dos-prompt.

    IMO a simple way to create havoc is done by entering:
      assign b: a:
      subst  u: b:\
    I did this on a PC which has only one floppy on A:
    (The PC has its B: mapped to A:)
    Assigning B: to A: means that so far entering B: would equal
    entering A:

    With then entering "subst u: b:\" I get the message
     "insert disk into drive A:"

    Now, if then enter
     u:
    then A: will result as: "last time accessed using B:"

    Circle:
      If I now enter A: I get the error message "insert disk"
      because A: was "last time = B:"

      However, I can't really enter B:, because if I enter B:, then
      Assign redirects this to A:

    C.exe displays the following:
      f A: lastTime = B:
      f B: Assigned2 A:

      f U: lastTime = B: sub B:\


    You can mix this in all varieties. As for c.exe I choose to
    avoid the infamous "insert disk" message for the info-display
    ("c", "c -f", etc.) rather than anything else. Hence with the
    above "pattern" c.exe skips accessing the floppies for disk-sizes, etc.

    If you enter a: this changes the above pattern with the famous
    "insert disk" to:
       f A:
       f B: lastTime = A: Assigned2 A:

       f U: lastTime = A: sub B:\

    Now you can enter "u:" and read the message: "insert disk into drive B:"

    Then you'd get again:
       f A: lastTime = B:
       f B: Assigned2 A:

       f U: lastTime = B: sub B:\


    Programs going through all drive letters can be fun now.

    Other recipies for havoc include: if you use Assign to assign
    to a floppy what is already a substituted drive (a drive which
    substitutes a hard disk's volume) this pops up as a floppy.

    Well, you can always try "truename Y:" to get the correct path.

    CD-ROM
      This is also the way to get a different letter for a CD-ROM
      after mscdex has already been installed. Eg if you want it to be X:
      and it's currently D: (and x: is not used yet) then this would be:
        subst x: c:\
        assign x: d:
      to get the former D: cd-rom to X:


    But back to the "havoc recipe":
    Eg.
      First the command: subst y: g:\c
      Followed by:      assign y:=B:

    Y: is a substituted drive, which now functions as an assigned
    floppy which refers to B:, which however doesn't exist, and is
    remapped to A: anyway.

    C.exe displays:
     f A: lastTime = B:
     f B:
     ...
     f Y:

    subst displays:
     Y: => G:\C

    assign /status displays:
     Zugriffe auf Y: werden auf B: umgeleitet
     (access to Y: is redirected to B:)

    I.e. altough Y: was originally subst to G:\C,
    later on Assign was used to assign Y: to B:

    An attempt to then use subst again:
      subst Y: c:\dos
    was prompted with the error-msg that Y is already substitued.

    If one now enters
      assign Y:=Y:
    to "undo Assign", the substituted values for drive Y: appear back
    on the surface.

    Well, hence if you want to assign an invalid drive P: to C:, you can
    simply use
      subst P: c:\
      assign P: C:
    which then assigns P to C (This swaps the C as in "C:\dos" to "P:\dos")
    (
      "subst" is required because Assign didn't accept P:
      when P: was still an invalid drive
    )



    Following some more footnotes:


    with:
       f A:
       f B: lastTime = A: Assigned2 A:

       f U: lastTime = A: sub B:\

    "c -f" would indeed display the disk-sizes under A:

    Of course, normally you probably wouldn't use assign like this. Hence
    the normal display
       f A:
       f B: lastTime = A:
    makes probably a lot of sense, since now you know that to access the
    floppy you'd prefer to enter A:

    and if you see this:
       f A: lastTime = B:
       f B:
    you'd prefer to enter B:


    Anyway, usually assign makes only sense for assigning B: to A:
    to overcome the single-floppy "insert disk, press key" feature.
    (Rumour has it that for newer Dos versions without Assign, Assign is
     available on supplemental-disk, etc., from MS
    )


    Footnotes:
      as for the 'nn' network drives, which you can get
      eg. with win for workgps. with "net start full" when the
      other PC(s) are power-OFF, well, Assign can use such
      a network-drive and gets it to "be" a floppy. Yet, you
      still can't use Subst on such a net-floppy, or however that is
      supposed to be called.

      Assign can also assign "real" network-drives to a local letter.
      Again, they pop up again on the surface as what they were, as soon as
      assigning something else (etc) is freeing up this "no-more-net-drive-
      assign".

      Hence this may pop up the idea to swap network drive Z: to a local
      drive Z:, then running a program using Z: as a local drive, then
      "un-assigning" Z: and use it again as a network drive.



      Os/2 warp - dos
        I have TurboPascal with its proper icon as a dos-program.
        I start it. I shell to Dos and enter:
          subst k: c:\
          assign b: k:
        These are the Warp-dos' commands - not the c:\dos commands.

        Now, with entering "c" I get:
          f A:
          ÿ B: LastTime = A: Assigned2 K: Sub

          ÿ K: Sub
        Which seems quite a bunch of information for B: - much more than
        we have with "real" Dos. However, the Subst path-info is lost.

        When entering
          exit
        I'm not back to TurboPascal but now directly back to Os/2 and
        the Turbo-pascal program isn't even in the ALT+ESC list of
        programs.

        OTOH, that's an interesting change to Dos which usually freezes
        the PC after having started a TSR in a Dos-shell, which it
        probably should as this is s.th. to avoid anyway - unless one
        at least un-installs this TSR before entering "exit".


    C.exe maintains files for each of the substituted drives,
    a) These files will be smaller, as a "subst" usually
       replaces s.th like: subst L: C:\some\long\path\for\this
       which itself has naturally less directories than C:\

    b) it makes sense in some cases

    c) for the fun of it






  CC.EXE
    once you're familiar with c.exe try CC.EXE for copying, etc,
    to see if this is an useful add-on. Eg. with cc.exe you can
    get a command top ten via "cc -g"


  USING C.EXE FROM *YOUR* OWN PROGRAMS
    If you would like to include c.exe into your program(s) for the
    directory selection etc., that _could_ be quite easy.
    (
      An example for this is cc.exe. It uses c.exe to obtain either
      a directory for a change-dir, or a command (cc -g) to run.
      "command" meaning anything that is written to the file
      via "cc -g stringxyz" or "c -g stringxyz"

      CC.exe could also have been written in "any" other programming
      language.
    )
    As always this information is provided "as is".

    My upload LOADER.ZIP at go BPASCAL has my suggestion for two programs
    communicating with one another. With this example in mind, it might be
    that the following is required for a program to use c.exe calling it
    from a parent/loader program:

     For the parent program to call c.exe:

     -put the original length of the command-line into char # 121 of the
      command-line

     -set length of command-line to 126
      (i.e. setting the char #0 of the command-line to 126)

     -write the address("Pascal pointer") for the destination to the
      command-line, starting with char #123:
       -pointer-offset  at char 123 and 124 of the command-line
       -pointer-segment at char 125 and 126 of the command-line
       (
        -i.e. in Pascal format for "pointer"
         (I guess in C, that's a FAR pointer)
        -as in the example of LOADER.zip
        -this is a variable inside the parent, to which c.exe will write
       )
      This destination variable should identify a string in pascal style,
      (array of chars 0 to 255)
      where string[0] is the length of this string,
      and s[255] is the last byte/char of this string[0..255]

     -write to char 255 of this string-variable the value Zero. (s[255]:=0)

     -then call c.exe (with this 126-length command-line).

     -in addition to the dos-values (exit-code) that can be checked for
      any program started by a parent program (i.e. NOT using COMSPEC for
      this), c.exe returns the following information:

        s[255]   (meaning char 255 of the destination string)

         If c.exe leaves this value at 0, there has been no request by
         the user to do s.th., eg. no directory was found, user has
         pressed ESC to abort, etc. => i.e. "nothing to do"
         else
                <>0  ->there's a request to have s.th done,
                       eg. a directory was selected, etc.

                  =1 ->
                       "change-dir" directory written to destination-variable
                       in parent-program

                  =2  ->as 1, but
                        indicates that this is a "change-dir" request
                        towards a SUB-directory ("eg. c .somedir")
                        (byte 254 is the drive to change-to
                         the directory-path may not have a drive
                         eg. ".\some\subdir"
                        )

                  =3   ->indicates the string in the destination-variable
                         is not meant as a directory-path, but was obtained
                         using "cc -g"
                         (
                          in the original version this being a command to be
                          run by cc.exe
                         )

          s[254]
            -the *drive* to which a request refers to
             (if a request was made (which could also be a -g request) )

          s[252] and s[253]:
            -last key pressed (interrupt 16)
             (
               as mentioned some place in this file, CTRL+C would
               mostly be converted to ESC (also CTRL+BREAK if possible)

               This information should "always" be obtainable, i.e. even
               if s[255] = 0
             )

            The code to obtain a key is mostly as follows:
{--------------------------------------------------------------------------}
function getkey:word; assembler;  { at - mf 1 keyb }
asm
  xor ah,ah {mov ah,0}
  int $16
  cmp ax,$2e03 {ctrl-c}
  je @esc
  cmp ax,0   {ctrl-break}
  jne @end
 @esc:
  mov ax, $011b {esc}
 @end:
end;
{--------------------------------------------------------------------------}

            When using the "-p" switch similar code is used:
{--------------------------------------------------------------------------}
function GetKeyMf2: word; assembler;       {nur at keyb + MF II}
asm
  mov ah,$10              {mf2}
  int $16
  cmp ax,$2e03 {ctrl-c}
  je @esc
  cmp ax,0  {ctrl-break}
  jne @end
 @esc:
  mov ax, $011b {esc}
 @end:
end;
{--------------------------------------------------------------------------}





Author:
  (Copyright), 1994-1996, Armin Schmitt at 100552.1041@compuserve.com

  Written using Borland's TURBO-PASCAL 7.01d,
  under Microsoft's DOS 6.22d,
  also run under Microsoft's Windows for Workgroups 3.11d Dos-Box
  and International Business Machine's OS/2 3.0d "warp" Dos-Box.
  (Actually, OS/2-dos presented some "peculiarities"<g>.
   some features are "true DOS" and will not be available under
   other operating systems.
  )


Due credit, *many thanks* to:

           -The original code to display the network-id corresponding
            to a drive-letter which has already been detected as a
            network-drive
           -The original code to detect invalid drives, floppies, or
            non-floppies
           -the original code for a few similar points - I forgot which -
            have been taken from the file DriveI.zip at CIS, Borland,
            Delphi Forum, Section TP-Dos, written by Peter Below, and
            about which I might comment "all you always wanted to know
            about hard disks" <g>
            Quote:
              | Unit Drives
              |
              | Version: 2.0  Last modified: 02/27/95, 21:49:56
              | Author : P. Below  CIS [100113,1101]
              | Project: Common utilities
            Unquote.

            Quote:
 |   This code is released to the public domain, use it as you see fit
 |	 in your own programs (at your own risk, of course) but you should
 |	 include a note of the origin of this code in your program.

            Unquote.


           The original ASM code to detect a CD-rom:
           given in a public message by Xavier Pacheco, 76711,666
           at CIS, Borland Delphi, TP/DOS

           THE interrupt-list (Ralf Brown et al.) (eg. at Go Pcprog (I
           think)), has also been a rich and reliable source. Its original
           format is said to be designed by Jim Kyle, who was patient
           enough to point out how to go about "chaining" programs, in
           messages at Go msdos.

           Neil Rubenkings's file Proces.Arc at Go Bpascal, which initiated
           my thoughts on how to have two programs 'communicating', using
           TurboPascal.

           The understanding on how to map a X: volume letter to a
           physical hard disk number (without "hitting the disk") is taken
           from Geoff Chappell's "Dos Internals" book, despite the fact
           that the sample code is written in C <g> - Geoff who was so kind
           to recommend his own book <g>.
            - Also how to get the subst-drive path.

           PC-Intern 3.0 by Michael Tischer has been a very interesting
           book, too. The newer version 4.0 of this book contains also
           interesting information to learn how to program routines for
           CD-roms (via mscdex).

           Thanks a lot for all the questions answered by folks at
           Go BPascal and elsewhere at Compuserve.

           And greetings to those I forgot, and K.C. can you play
           the song...
           ;)


jC,v960625