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