home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / HDTEST2.ZIP / PUSHDISH.EXE / PUSHDIR.DOC < prev    next >
Encoding:
Text File  |  1989-11-12  |  9.0 KB  |  188 lines

  1.           
  2.           Documentation for PUSHDIR/POPDIR        Copyright 1989, P. R. Fletcher
  3.           _________________________________      _______________________________
  4.           
  5.           
  6.                                        INTRODUCTION
  7.                                        ____________
  8.  
  9.           There are many utilities (most in the public domain) which allow you
  10.           to save the name of your current working directory while you go off
  11.           and do something else, and then subsequently to return to where you
  12.           were with a single, (hopefully) easy-to-remember, command. The simpler
  13.           of these utilities create and/or use .BAT files or are otherwise more
  14.           or less inelegant, frequently not allowing more than one previous
  15.           directory name to be saved for later use (i.e PUSHes cannot be
  16.           nested). More complex (and more useful) ones tend to require the
  17.           presence of a TSR "keyboard enhancer" program which may occupy space
  18.           needed for and/or interfere with the functioning of other needed
  19.           programs. The two programs in this ARChive, PUSHDIR and POPDIR, do the
  20.           job well and simply - they allow "pushes" to be nested to arbitrary
  21.           depth and they do not occupy memory (except transiently, while
  22.           actually running). The "stack" of previous directories is kept as an
  23.           ASCII file on disk (in a user-selectable location) and is
  24.           automatically created when necessary and deleted when empty.
  25.  
  26.           The programs are Copyright by Peter R. Fletcher, 1988-9. All rights
  27.           reserved. They were written in C, compiled with the Microsoft C
  28.           compiler (V5.1), and linked with code from the Microsoft C function
  29.           libraries by means of the Microsoft LINK linker (V4.06). They
  30.           consequently contain material that is Copyright by Microsoft Corp,
  31.           1985-1988. This material is used under the terms of a license from
  32.           Microsoft Corp. These programs and their documentation may be freely
  33.           copied for non-commercial use, provided that they are not modified in
  34.           any way. Commercial use of the programs without the author's prior
  35.           written permission is strictly prohibited - such use may also require
  36.           the payment of a fee.
  37.  
  38.  
  39.                                     USING THE PROGRAMS
  40.                                     __________________
  41.  
  42.           The .EXE files should be kept in one of the directories pointed to by
  43.           your PATH environment variable (keeping them in your current directory
  44.           will also work but rather limits their utility!). The full syntax of
  45.           the commands is as follows:
  46.  
  47.                    PUSHDIR [d:[\path\...]]
  48.  
  49.                    POPDIR [d:[\path\...]] [INIT | POP | SWAP]
  50.  
  51.           Many people will find it most convenient to use the programs without
  52.           using the optional parameters or paying attention to any of the "bells
  53.           and whistles" discussed below. The command PUSHDIR will save the full
  54.           pathname of the current directory in a file called PUSHLIST.TMP on the
  55.           root directory of the current drive (creating the file if necessary),
  56.           while POPDIR will perform a CHDIR to the last directory whose name was
  57.           PUSHed (after deleting PUSHLIST.TMP if the stack is now empty). The
  58.           three additional command line options for POPDIR are discussed below.
  59.           A POPDIR without a preceding PUSHDIR leaves the current directory
  60.           unchanged.
  61.  
  62.  
  63.            
  64.           Documentation for PUSHDIR/POPDIR        Copyright 1989, P. R. Fletcher
  65.           _________________________________      _______________________________
  66.           
  67.           
  68.                                     BELLS AND WHISTLES
  69.                                     __________________
  70.  
  71.           Using the programs as described above should work well if you only
  72.           need to move between directories on a single device. On a system with
  73.                                            __________________                  
  74.           multiple devices, PUSHDIR's default habit of writing the stack file on
  75.           the root directory of the current device will cause POPDIR to fail if
  76.                              _____________________                             
  77.           that program is invoked from a different device. The programs provide
  78.                                   _______________________                      
  79.           two solutions for this problem. If you include a drive and path
  80.           specification on the command line (a path without an explicit drive
  81.           specification will be ignored) that path will be used in writing or
  82.           searching for the stack file. The programs also check for the
  83.           existence of a DOS environment variable called PUSHPATH. If this
  84.           variable exists, its value will be taken to be the path to be used for
  85.           the stack file. If PUSHPATH exists and a path is specified on the
  86.                                              ___                           
  87.           command line, the path specified on the command line is used. The DOS
  88.           SET command is used to define PUSHPATH (e.g. SET PUSHPATH=D:\TEMP).
  89.           PUSHPATH can usefully be set to point to a RAMdisk (if you have one),
  90.           since the stack file will then be accessed very rapidly and will
  91.           automatically be deleted when the computer is powered off. If either
  92.           of these methods (command line or environment variable) of specifying
  93.           the path name for the stack file is used, POPDIR will automatically
  94.           change the current device and directory to that saved by the last
  95.                              ____________________                          
  96.           PUSHDIR.
  97.  
  98.           As noted above, POPDIR does have three other command line options -
  99.           the key words for these may be entered in upper case, lower case, or
  100.           any combination, but they may not be abbreviated:
  101.                                         ___                
  102.  
  103.           1) POPDIR INIT unconditionally deletes the stack file (to reinitialize
  104.           the system), and is intended principally for use in AUTOEXEC.BAT
  105.           files.
  106.  
  107.           2) POPDIR POP "pops" the last directory name off the stack and
  108.           "throws it away" - it leaves the current directory unchanged.
  109.  
  110.           3) POPDIR SWAP allows you to alternate, at will, between two
  111.           subdirectories. The name of the previous directory is replaced on the
  112.           stack by the name of the current directory before POPDIR moves you
  113.                                                      ______                 
  114.           back to the previous one. The next invocation of POPDIR will then put
  115.           you back where you came from. This is much easier to try out than to
  116.           explain!
  117.  
  118.  
  119.                                LIMITATIONS AND RESTRICTIONS
  120.                                ____________________________
  121.  
  122.           PUSHDIR and POPDIR do require DOS 2.x or above. However, they use only
  123.           documented DOS 2.x services and require very little memory - they
  124.           should, therefore, run on virtually any hardware. They should also run
  125.           in the DOS compatibility box under OS/2, but this has not yet been
  126.           tested.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.           
  135.           
  136.                                           Page 2 
  137.            
  138.           Documentation for PUSHDIR/POPDIR        Copyright 1989, P. R. Fletcher
  139.           _________________________________      _______________________________
  140.           
  141.           
  142.                                   ADDITIONAL INFORMATION
  143.                                   ______________________
  144.  
  145.           Like all well-behaved programs (!), these utilities signal successful
  146.           completion by returning to DOS with the ERRORLEVEL variable set to
  147.           zero. Different small positive values are returned for various errors.
  148.           The programs do not display any prompts or error messages - they just
  149.           do their jobs quietly and exit. Paths may be specified on the command
  150.           line or in the PUSHPATH variable with or without the final "\" - the
  151.           "\" will be appended automatically if it is not found. The name of the
  152.                                                                      ____       
  153.           stack file cannot be changed without patching the program file (not
  154.                                                                           ___
  155.           recommended).
  156.           ___________  
  157.  
  158.           Comments, suggestions, etc. may be addressed to the author at:
  159.  
  160.                    1515 West Montgomery Avenue
  161.                    Rosemont
  162.                    PA 19010
  163.                    U.S.A.
  164.  
  165.           Please enclose a s.a.e. if you would like to receive a reply to a
  166.           question or a response to a comment.
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.           
  204.           
  205.                                           Page 3 
  206.