home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / dirutl / jcd124.arc / JCD12.DOC < prev   
Encoding:
Text File  |  1989-06-06  |  16.0 KB  |  445 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                Introduction -JCD V1.21
  8.  
  9.  
  10.                Imagine yourself entrenched in a computer project,  a couple
  11.           of levels deep  in  a  subdirectory  tree. You decide you want to
  12.           move to the bottom of another directory tree so you type:
  13.  
  14.               C:\TC\CODE> cd \com\dnld\game\arcade\larn
  15.  
  16.           and you get the message "Invalid directory". Now frustration sets
  17.           in because not only are you still in the directory '\tc\code' but
  18.           you also have  no  idea  where  you made a mistake. This normally
  19.           prompts one of the best-known computer-related comments.
  20.  
  21.               "The $&#%^* computer should have known what I meant."
  22.  
  23.                Unfortunately, computers quite often do what  you  tell them
  24.           to do instead of what  you  want  them  to  do. But you do have a
  25.           point. The computer should have been able to pick up a  few clues
  26.           from  what  you  typed to accomplish  part  of  the  task  before
  27.           throwing your mistake back in your face. JCD was written  to take
  28.           care of this particular situation.
  29.  
  30.                Before we go any further, I should warn you that if you only
  31.           use the root directory or if  you  are a perfect typist, JCD will
  32.           probably not help you. However, for  the  rest of us, it can mean
  33.           the difference  between finishing what you were doing and wasting
  34.           several minutes cursing a computer.
  35.  
  36.                JCD  was  actually  born from a situation similar to the one
  37.           mentioned  above,  although  not  quite  as  exaggerated.  In the
  38.           example  above,  JCD  would have changed directories  to  a  path
  39.           matching as much of the requested path as possible. Next, instead
  40.           of  the highly informative error message  returned  by  DOS,  JCD
  41.           gives you a subdirectory menu, allowing you to choose the one you
  42.           meant.
  43.  
  44.                JCD soon expanded to  cover  many of the CHDIR errors that I
  45.           make on a regular basis. In addition, several features were added
  46.           to make JCD a useful utility in its own right  instead  of just a
  47.           correction to the CD command.
  48.  
  49.  
  50.                                         Usage
  51.  
  52.                In general, JCD is used exactly the same as CD. For example,
  53.           if  you  wish to change from the  root  directory  to  your  UTIL
  54.           directory you type:
  55.  
  56.               C:\> jcd \util      or      C:\> jcd util
  57.  
  58.           and JCD takes you  to  the  proper  directory. The only situation
  59.           where JCD does not behave exactly like CD is when the  program is
  60.           used  with no command line parameters.  When  no  parameters  are
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.           given, CD types the name of the current directory on  the screen.
  68.           JCD also types the  name  of the current directory; but, if there
  69.           are  any  subdirectories  to  choose  from, JCD brings up a  menu
  70.           allowing you to choose where to go next.
  71.  
  72.  
  73.                               What does JCD do for me?
  74.  
  75.                At this point you may be asking yourself the question above.
  76.           Then again, you may not. Oh  well,  I'm going to tell you anyway.
  77.           JCD does not have  a  bright,  beautiful, helpful user interface.
  78.           The  only  thing  that JCD does do is handle some of the problems
  79.           that occur with the use of one DOS command.
  80.  
  81.           JCD handles simple typing errors.
  82.  
  83.                     JCD  handles  a  wide  variety  of  typing  errors. For
  84.                instance, what if  you  type  "jcd  ,,". I know and you know
  85.                that you want to go up one level in the directory  tree. JCD
  86.                assumes that if you type a comma what you really meant was a
  87.                period. If you type a '/' instead of a '\', that's okay; JCD
  88.                knows what you mean  there  too. JCD also assumes that a ';'
  89.                is supposed to be a ':'.
  90.  
  91.           JCD can recursively search a disk for a directory.
  92.  
  93.                     How many times have you  typed "cd util" when you meant
  94.                "cd \util"?  JCD will handle this situation with a recursive
  95.                search of the directory structure,  if you allow it to. This
  96.                also  handles  the  situation where you know the name of the
  97.                subdirectory that you want to  go to, but you don't remember
  98.                what directory  it  is  under.  It  can  also match a set of
  99.                directories. For instance,  a recursive search for "inc\sys"
  100.                will send you  to  "\tc\inc\sys"  and  skip  "\bin\sys". For
  101.                those  of  us  who sometimes manage to  have  two  different
  102.                subdirectories  with  the  same  name,  JCD  allows  you  to
  103.                continue a recursive directory  search  if  it has found the
  104.                wrong subdirectory. At least for  now,  JCD  cannot  go more
  105.                than fifteen levels deep.
  106.  
  107.           JCD stops you from going to the root when you don't want to.
  108.  
  109.                     Say you are in  your  123 directory and wish to move to
  110.                the DATA subdirectory  under  123  (or  whatever).  How many
  111.                times have you typed:
  112.  
  113.                   C:\123> cd \data
  114.  
  115.                DOS tells you there is no such directory. Maybe you stare at
  116.                the screen in confusion for a few seconds.  Then  you notice
  117.                the '\' at the  front  of the directory name. JCD checks for
  118.                this error  and  asks  you  if  you  would like to move down
  119.                instead of going to the root.
  120.  
  121.  
  122.  
  123.  
  124.                                         - 2 -
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.           JCD simplifies moving towards the root.
  132.  
  133.                     DOS uses two special directory names (. and ..) for the
  134.                purpose of changing directories. JCD extends this concept to
  135.                allow easier access to directories closer to the root. Where
  136.                .. means 'parent', ... now means  grandparent  (..\..), ....
  137.                means  great-grandparent (..\..\..), and so on.This will  be
  138.                especially helpful for people with deep directory trees.
  139.  
  140.           JCD gracefully handles errors in path specification.
  141.  
  142.                     The  main reason for the JCD  program  is  the  problem
  143.                mentioned in the  introduction.  JCD  assumes  if  the first
  144.                portion of the path you typed is valid,  you  probably meant
  145.                to go at least that far.  In  fact, you will never again get
  146.                an "Invalid directory" error since  at  the  very  worst you
  147.                probably didn't misspell the root directory.
  148.  
  149.           JCD allows movement to another drive.
  150.  
  151.                     If you want to  move  to a new directory on a different
  152.                drive, DOS requires two different commands. First,  you must
  153.                change drives. Then, you can  change  to  the  directory you
  154.                want. With JCD, you can do both at the same time. If you are
  155.                on B  drive  and  wish  to go to the util directory on C you
  156.                type
  157.  
  158.                     B:> jcd c:\util
  159.  
  160.                and you are in c:\util in a single step. As mentioned above,
  161.                if you type "a;", JCD assumes that you meant "a:".
  162.  
  163.  
  164.                                       The Menu
  165.  
  166.                The next major feature of JCD is the subdirectory menu. This
  167.           menu shows the first sixty-four subdirectories  of  the directory
  168.           you are now  in.  You  may  choose one of these subdirectories by
  169.           using  the  UP,  DOWN, HOME, and END keys to move around and then
  170.           strike  ENTER.  Pressing  SPACE is the same as pressing DOWN. You
  171.           may also type a character, this will move the  highlight  bar  to
  172.           the  menu  entry  of the first subdirectory that begins with this
  173.           character. Pressing ENTER at this point will choose. Pressing ESC
  174.           will exit the menu, leaving you in the directory you started in.
  175.  
  176.                Four other commands may be used from the menu. The  first is
  177.           the LEFT arrow key. Pressing this key will move you up  one level
  178.           and exit the program. The RIGHT arrow key is the  second command.
  179.           Pressing this key  will  move you to the subdirectory highlighted
  180.           on the menu  and,  if  possible,  bring up a menu containing this
  181.           directory's  subdirectories.  This  allows  you  to  move  down a
  182.           directory  tree  when  you cannot remember the spelling of any of
  183.           the different levels. Next is the PgUp key. PgUp moves you to the
  184.           current directory of the next higher disk (i.e. from  B:  to  C:)
  185.  
  186.  
  187.  
  188.                                         - 3 -
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.           and displays a  menu  for  this  directory. The last key is PgDn,
  196.           which moves to the next lower disk and displays the menu.
  197.  
  198.                Before JCD  puts  a  menu  on  the  screen it tells you what
  199.           directory it is currently  in.  This is useful if the program has
  200.           moved partway down your  designated  path  and can't decide where
  201.           else  to go. Now you know where you are and can make a reasonable
  202.           guess about where to go next. The amount of time that  JCD pauses
  203.           between displaying  the current path and displaying the window is
  204.           controlled by an environment  variable  called  JCD.  The default
  205.           setting is S which denotes a wait of  a  half  second.  The other
  206.           choice is L which pauses one second. The variable can be set to S
  207.           or L to choose how much time to  wait.  This  is  accomplished by
  208.           typing at the command line:
  209.  
  210.                    set jcd=s
  211.  
  212.           or whichever choice you wish.
  213.  
  214.  
  215.                               Use of JCD in Batch Files
  216.  
  217.               Even though  JCD wasn't originally intended to be used inside
  218.           a batch file, I realize that someone may wish to use it this way.
  219.           In order to make this more convenient, I have added a few return
  220.           values to  JCD  to  allow  a batch file to know what is going on.
  221.           These return values are as follows:
  222.  
  223.                0    Program terminated normally.
  224.                1    JCD took no action on a recursive disk search.
  225.                2    JCD took no action from the menu.
  226.                3    JCD took no action.
  227.                9    When generating the menu, JCD encountered a memory
  228.                       allocation error.
  229.  
  230.           Since  JCD  is  a relatively simple program, I believe that these
  231.           codes should handle all situations.
  232.  
  233.  
  234.                               Commonly Asked Questions
  235.  
  236.                There has been only one  question asked more than once about
  237.           JCD.
  238.  
  239.           WHY should I use this utility?
  240.  
  241.                 I  wrote JCD to solve a problem with  the  way  DOS  works.
  242.                 There are many other  programs  that  do basically the same
  243.                 job  and more. The main problem I  have  found  with  using
  244.                 these  programs has been how much  time  is  spent  loading
  245.                 information I will never use  in  the  process  of changing
  246.                 directories.
  247.  
  248.  
  249.  
  250.  
  251.  
  252.                                         - 4 -
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                There  has been one major misconception  about  JCD;  and  I
  260.           think now is the time to clear it up. JCD is not supposed to be a
  261.           fancy,  multipupose utility. JCD was written  to  replace  CD  in
  262.           everyday use. That's all JCD is, an intelligent CD. The only time
  263.           that new features will be  added  to  JCD  is  when  they  do not
  264.           conflict with the original  purpose.  This  purpose can be stated
  265.           very simply: JCD handles the mistakes I make when using CD.
  266.  
  267.                         Shareware Information and Disclaimer
  268.  
  269.  
  270.                This program (JCD) is  not  free  or public domain software.
  271.           The program is distributed under  the SHAREWARE or "try it before
  272.           you buy it" concept  of  software. Feel free to copy this program
  273.           and give it to  friends  and  coworkers,  provided you follow two
  274.           simple rules.
  275.  
  276.                I.   Please   pass   along   the  original  package  without
  277.                modifications and including all documentation.
  278.  
  279.                II.  No fee should be charged for  the  program.  This  also
  280.                means that the  program  should not be packaged with another
  281.                program or  computer  system  for  sale.  Users'  groups and
  282.                software libraries are allowed to  charge a small fee not to
  283.                exceed  $5  to  cover  the  cost  of  the disk  and  copying
  284.                services.
  285.  
  286.           If  you  find  JCD to be a useful program that  makes  your  life
  287.           easier,  please  send  $10  to  the address shown  below.  Please
  288.           include your full name,  address,  version  number, where you got
  289.           the program, and any bugs you may have found. This will  allow me
  290.           to keep my records up to date. This registration will entitle the
  291.           user to a copy of the latest version of the program, notification
  292.           of future updates, and information about possible new programs as
  293.           they become available.
  294.  
  295.                                    G. Wade Johnson
  296.                                  7510 Brompton #664
  297.                                 Houston, Texas 77025
  298.  
  299.                Bugs may also be reported through electronic mail.
  300.  
  301.                   CompuServe   72470,2776
  302.  
  303.                The author hereby disclaims all  warranties  with  regard to
  304.           fitness for a particular  purpose.  The  author  may only be held
  305.           liable for the replacement of a defective copy of the program and
  306.           its documentation. This liability  does  not  extend to any other
  307.           damages  including but not limited to loss  of  profit  or  other
  308.           incidental or consequential damages.
  309.  
  310.                         Copyright Notice and Acknowledgements
  311.  
  312.  
  313.  
  314.  
  315.  
  316.                                         - 5 -
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.                JCD and its accompanying documentation are Copyrighted by G.
  324.           Wade  Johnson  1989  all  rights  reserved. I would also like  to
  325.           acknowledge  the help of all of the  friends  and  coworkers  who
  326.           assisted  in  the  beta testing of this software. My beta testers
  327.           include Cass  Couvillion,  Youseph  Yazdi,  Ed  Jackson,  Ignacio
  328.           Cespedes, Dave Shattuck,  and  Debra  Campbell,  plus  others who
  329.           tried JCD because it was on a computer. In addition, I'd  like to
  330.           thank some people  who  sent  me  some good ideas which helped to
  331.           make JCD a  better  product. Henry Schofield Noble suggested some
  332.           new features for  this  version  and  one  or two that I am still
  333.           working on implementing efficiently. Thanks  also  to  Tom Clark,
  334.           who suggested some more possible CD errors and errorlevel use.
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.                                         - 6 -
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.                                    History of JCD
  388.  
  389.           Version 1.21
  390.                Minor bug fix.
  391.  
  392.           Version 1.2
  393.                Added support for multiple '.' movements.
  394.                Increased the menu speed.
  395.                Added PgUp and PgDn options to the menu.
  396.                Modified menu layout.
  397.                Some of the code changed from C to Assembler for speed.
  398.  
  399.           Version 1.1
  400.                Added correction for ';'.
  401.                Added SPACE to menu commands.
  402.                Default pause changed to SHORT.
  403.                Added errorlevel support.
  404.                Never hit the BBS's.
  405.  
  406.           Version 1.0
  407.                First version of JCD.
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.                                         - 7 -
  445.