home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / dirutl / jsdown2.arc / DOWN2.DOC next >
Encoding:
Text File  |  1988-12-04  |  10.4 KB  |  267 lines

  1.                               DOWN - Substitute for CD
  2.                                     User's Guide
  3.                                     Version 2.0
  4.  
  5.  
  6.                                  Copyright (c) 1988
  7.                                    James Shoffit
  8.                                  124 Valerie Lane
  9.                                 Sherman, Texas  75090
  10.                                    (214) 892-1696
  11.  
  12.  
  13.           Purpose
  14.           -------
  15.  
  16.           DOWN is a substitute for the DOS CD command, but also provides
  17.           the ability to descend to subdirectories without specifying
  18.           the full subdirectory name.  Basically, it is for those who want
  19.           to fly around their directory structure from the command line.
  20.  
  21.  
  22.           Installation
  23.           ------------
  24.  
  25.           Installation merely allows you to choose whether or not you want
  26.           error messages and/or showing current directory.  If the version
  27.           of DOWN already works like you want it to, then don't bother
  28.           with DOWNINST.
  29.  
  30.           Installation is accomplished by typing DOWNINST at the DOS
  31.           prompt.  DOWNINST requires a file, DOWN2.EXE, to be in the
  32.           current directory.  You will be asked two easy-to-answer
  33.           questions before a working version of DOWN is produced.
  34.  
  35.           1.  Do you want error messages ?
  36.  
  37.               If you answer "Y" then DOWN will notify you if an error has
  38.               been made in the command line, or if the destination to
  39.               which you have asked DOWN to take you does not exist.  For
  40.               example, if you were in the root directory, and issued the
  41.               command DOWN .., it would reply "Cannot ascend another
  42.               level."  You will also be notified if a specified
  43.               subdirectory was not found.
  44.  
  45.               If you answer "N" then DOWN will never issue a message.
  46.  
  47.           2.  Do you want DOWN to show directory after each move ?
  48.  
  49.               For those who do not specify a prompt of $P$G (to always
  50.               show the current drive and path in the prompt), answering
  51.               "Y" to this question forces DOWN to display the directory
  52.               you are left in when it terminates.
  53.  
  54.           Now that DOWNINST has created DOWN.EXE, you may delete
  55.           DOWN2.EXE.  If you ever wish to re-install, you may simply
  56.           rename DOWN.EXE to DOWN2.EXE and run DOWNINST again.
  57.  
  58.           DOWN.EXE should now be placed in a location pointed to by your
  59.           path and renamed to something convenient.  Many like to call it
  60.           DO.EXE or D.EXE to minimize typing (which is the primary reason
  61.           this program was written).
  62.  
  63.  
  64.           Replacing CD with DOWN (For those who use CED)
  65.           ----------------------------------------------
  66.  
  67.           If you use CED this will be very easy.  If you don't use CED,
  68.           you should.  It is one of the most helpful, timesaving utilities
  69.           ever.  Look it up on a BBS near you.
  70.  
  71.           Anyway, all you have to do is set up a SYNonym which equates CD
  72.           to the full path name for DOWN.  Example :
  73.  
  74.                 CED SYN CD C:\UTILS\DOWN
  75.  
  76.           Now, whenever you use the CD command, it will automatically run
  77.           DOWN instead of the DOS CD command.  So, to go to your
  78.           \COMM\DOWNLOAD directory, you could just say CD \CO\DO.
  79.  
  80.  
  81.           Operation
  82.           ---------
  83.  
  84.           DOWN [drive:][path]
  85.  
  86.           Yes, it's that easy.  Without a parameter it takes you to the
  87.           first subdirectory located under your current directory.
  88.  
  89.           Path is merely a string telling DOWN where to take you.  It
  90.           differs from the CD command in that you don't need to specify
  91.           the full directory name for DOWN to find it.  DOWN merely
  92.           searches for the substring you specify with a * wildcard
  93.           appended to it.
  94.  
  95.           Before we all get too confused, a few examples might elucidate
  96.           things a bit :
  97.  
  98.                DOS Command                   DOWN Command
  99.  
  100.                CD \UTILITY\PCTOOLS           DOWN \U\PCT
  101.                CD ..                         DOWN ..
  102.                CD ..\PASCAL                  DOWN ..\PA
  103.  
  104.           However, if you had several top-level directories which began
  105.           with the letter U, DOWN would only take you to the first one.
  106.           My phrase to describe proper usage is "You may abbreviate to
  107.           the point of ambiguity."
  108.  
  109.           In addition to the DOS "\" delimiter, the UNIX "/" delimiter
  110.           is also allowed. And if you like VAX/VMS as much as I do, you
  111.           can also use the "[" and "." just like DEC uses.  You can mix
  112.           and match however you choose.  Again, examples to keep us clear :
  113.  
  114.           The following are all equivalent commands :
  115.  
  116.                DOWN \UT\PC
  117.                DOWN /UT/PC
  118.                DOWN [UT.PC
  119.                DOWN /UT\PC
  120.                DOWN [UT/PC
  121.                DOWN /UT.PC
  122.                (You get the idea)
  123.  
  124.           Also, a "-" can be substituted for ".." (again borrowed from
  125.           VMS) anytime you want to move up a level in your directory tree.
  126.  
  127.           Another interesting rule is that delimiters need not be
  128.           delimited. (sounds strange). Example :
  129.  
  130.                CD ..\TURBO
  131.                DOWN ..\TURBO
  132.                DOWN ..TURBO   <-- See, ".." runs into "TURBO"
  133.  
  134.                are all equivalent commands.
  135.  
  136.           Or, if you really want to conserve keystrokes, you could say
  137.  
  138.                DOWN -TURBO
  139.  
  140.           Similarly, to go up two levels, rather than having to type
  141.  
  142.                CD ..\..  you could say  DOWN --
  143.                          or even        DOWN ..\..
  144.                          or even        DOWN ....  (confused ?)
  145.  
  146.           The DOS CD Command does not allow you to switch drives, so of
  147.           course, DOWN does.  Putting a drive letter (with colon) in front
  148.           of your path causes DOWN to first switch to the specified
  149.           drive, and then proceed down (or up) your directory tree from
  150.           your current directory for that drive.
  151.  
  152.                CD D:\ARC  would take you to the D:\ARCFILES directory.
  153.  
  154.  
  155.           Limitations
  156.           -----------
  157.  
  158.           1.  You must specify enough characters for DOWN to find
  159.               the intended subdirectory.
  160.  
  161.               So, if you have a \TURBO directory and a \TURBOC directory,
  162.               the only way to get to the \TURBOC is to say
  163.  
  164.                    DOWN \TURBOC
  165.  
  166.               I do have a mind-reading algorithm in the works, though.
  167.               Look for it in the Fall 89 release :)
  168.  
  169.           2.  If you name a directory starting with a "-" character (which
  170.               IS possible), you will have trouble getting into it. Anytime
  171.               DOWN encounters a "-" in its parameter, it bumps you UP a
  172.               directory, not down into a "-" directory.
  173.  
  174.               I could (I suppose) check to see if a "-" directory exists
  175.               before moving up, but that would take extra code, and I
  176.               didn't figure many people would do this sort of thing.
  177.  
  178.           3.  This isn't really a limitation, but I figure I'll say it.
  179.               If you don't have a hard disk, this program is pretty much
  180.               useless.
  181.  
  182.  
  183.           Technical Specs
  184.           ---------------
  185.  
  186.           Characters that start you at the root directory :
  187.  
  188.              "/", "\", "["
  189.  
  190.           Characters that delimit a substring for descending :
  191.  
  192.              "/", "\", "."
  193.  
  194.           Substrings responsible for moving up a directory :
  195.  
  196.              "..", "-"
  197.  
  198.  
  199.           History
  200.           -------
  201.  
  202.           DOWN was originally written on VAX/VMS at North Texas State
  203.           University (now known as University of North Texas).  The VMS
  204.           method of changing directories (called SET DEFAULT) was
  205.           cumbersome, to say the least.
  206.  
  207.                SET DEFAULT DUA2:[JAMES.PROGRAMS.PASCAL]
  208.  
  209.           is not my idea of a fun command line to type.  Lee Harper (a
  210.           fellow programmer, now working in San Diego) and I combined
  211.           ideas for shortening this.  We wrote a program in DCL (Digital
  212.           Command Language) which let you set default to an abbreviated
  213.           directory name.  Billy Barron (now Vax System Manager at UNT)
  214.           suggested that I give the program the ability to descend
  215.           multiple directories (like DOWN does now), and with his help, we
  216.           modified the program to do so.  The three of us had heard (and
  217.           it made sense) that the shorter a program is, the faster it runs,
  218.           so we made a restriction on our code : it had to fit on a single
  219.           page.  So, with a 23 line maximum the original code became a
  220.           mastery of fantastic hacks, and evolved into a utility I just
  221.           can't live without.
  222.  
  223.           When I became a PC hacker, I wanted my DOWN.  So, using Turbo
  224.           Pascal 3.0, I wrote DOWN.PAS.  The first version would only go
  225.           down into subdirectories, and was basically flaky.  It was never
  226.           released.
  227.  
  228.           So, I bought Turbo Pascal 4.0 and completely rewrote the whole
  229.           program to bring us up to DOWN Version 2.0.  It is much faster,
  230.           much smaller (thanks, Borland) and seems to be fairly bug-free.
  231.  
  232.           The next version will probably be written in Turbo Assembler just
  233.           to cut down the code size.  My free time ahs been very limited of
  234.           late, but I will eventually get around to it.
  235.  
  236.  
  237.           Credits
  238.           -------
  239.  
  240.           James Shoffit - Main design, idea of abbreviations, TP4 conversion
  241.           Billy Barron  - Multiple directory descending, debugging (VMS)
  242.           Lee Harper    - Logical translations (VMS), code bumming
  243.           Sean Wheeler  - Debugging, Ideas, inspiration and documentation
  244.  
  245.  
  246.           Rules
  247.           -----
  248.  
  249.           1) Enjoy the program.
  250.  
  251.           2) If you like it, or find a bug, send me a postcard or e-mail.
  252.              (e-mail will get responded to much quicker!)
  253.  
  254.           3) Pass it around.
  255.  
  256.           4) There is no rule #4.
  257.  
  258.  
  259.           I can be contacted at :
  260.  
  261.           USMAIL    :  124 Valerie Lane, Sherman, TX  75090
  262.           BITNET    :  JAMES@UNTVAX
  263.           THENET    :  NTVAXB::JAMES
  264.           INTERNET  :  james@vaxb.acs.unt.edu
  265.           SPAN      :  UTSPAN::UTADNX::NTVAXB::JAMES
  266. 
  267.