home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 455.lha / finddisk_v3.1 / FindDisk2.doc < prev    next >
Text File  |  1990-12-10  |  9KB  |  262 lines

  1.  
  2.   FindDisk2.2
  3.  
  4.   A Public Domain Program by Ross MacGregor.
  5.  
  6.   The source was compiled with the Manx compiler.
  7.   (but can be compiled with Lattice with a small effort)
  8.  
  9.   /*  Anxious?  Then skip ahead to Getting Started. */
  10.  
  11.   Most people that own Amiga's soon accumulate a *GREAT* collection of
  12.   3-&-1/2 '' disks filled with lots and lots of PD software.  And I'm sure
  13.   that many people still go through the same time-consuming process I use to
  14.   when finding a certain program  [ I think it's on this disk...no maybe this
  15.   one...lets try this one...it must be here...I guess not...argggh! $#@#%! ].
  16.  
  17.   If you have been looking to organize your disks a little better, this may
  18.   be just what you need.  I have seen other disk cataloging programs but
  19.   they looked BIG and complicated.
  20.  
  21.  
  22.   I wanted a simple, unintrusive CLI command that would tell me on what disk
  23.   such-n-such a program could be found.
  24.  
  25.   So here it is, (ta-da) FD for FindDisk of course (now vers 2.2) .
  26.  
  27.   I made extensive revisions to how it operates and hope it is now much
  28.   easier to use.
  29.  
  30.   Type> FD       ;  And you will get a summary of available commands
  31.  
  32.  
  33.   Type> FD text  ;  And the disk's directory listing containing 'text'
  34.                     is displayed just as if you had done an ls df0:.
  35.                     The text could also be the name of the disk.
  36.  
  37.                     Multiple arguments can also be given so that the
  38.                     directory, ARP_COMMANDS_DOC could be found with,
  39.                     FD doc arp.
  40.  
  41.  
  42.   The DiskList
  43.  
  44.   FD uses a file which by default is called DiskList and is contained in
  45.   the directory df0:FindDisk.  This is an almost ASCII file containing
  46.   the listings of your disks.
  47.  
  48.   [clarification of almost...]
  49.  
  50.   To save space the listings are stored with the spaces ($20's) compacted
  51.   and some words of the listing tokenized.
  52.   This results in a file with many special (non-standard) control
  53.   characters.  It will not TYPE properly!
  54.  
  55.   The DiskList can be loaded to ram: (yes, it's just a COPY but its also an
  56.   FD command, FD -load ).  This enables single drive users to capture the
  57.   dir listings of other disks.  It frees up the drive and also speeds
  58.   things up if the DiskList gets large.
  59.  
  60.  
  61.   TempDL
  62.  
  63.   When you capture the directory listing of a disk (FD -dir) it goes to an
  64.   intermediate file, TempDL, instead of going directly to DiskList
  65.   (basically it's a Shell> dir >>TempDL ).  This is for reasons of more
  66.   efficient updating of the DiskList.  If someone had many disks to do,
  67.   inserting the directories into DiskList one at a time would take much
  68.   longer than inserting them all at once as FD does.  Single drive users
  69.   would also need to reinsert their DiskList disk after each FD -d.  You
  70.   must do an  FD -update or FD -savedl to update the DiskList.
  71.  
  72.   FD -update will update the current DiskList.  If DiskList was loaded to
  73.   ram: the current one is considered there, otherwise it updates the disk
  74.   DiskList.
  75.  
  76.   FD -savedl will copy the ram:DiskList to its disk location after doing
  77.   an update (as above).  If the current DiskList is not in RAM it will only
  78.   do an update.
  79.  
  80.  
  81.  
  82.                             FindDisk2.2
  83.                           ---------------
  84.  
  85.   Syntax : FD   <-l>  |  <-s>  |  <-u>  |  <-r volname>  |
  86.                 <-d [path]>  |  <-a [path]>  |  <-n>  |
  87.                 <[!]text1 [!]text2 ... [!]textn>
  88.  
  89.   > fd -l       Loads DiskList to ram: by default or to an alternate
  90.                 path/name if specified by the environment variable DLTEMP .
  91.                 The DiskList in RAM then becomes the current DiskList.
  92.                 DiskList must be now be saved to disk (FD -save) if any
  93.                 changes are made  because FD -update will only update the
  94.                 RAM DiskList.
  95.  
  96.  
  97.   > fd -d [path]
  98.                 To add a disk listing to the DiskList. Appends in
  99.                 ram:TempDL the ASCII (root) dir listing of the disk in
  100.                 drive DF0: by default.  It takes it from an alternate drive
  101.                 if specified by the environment variable DLDISK.  You can
  102.                 now also specify drive or directory path as a second
  103.                 argument to fd.
  104.  
  105.  
  106.   > fd -a [path]
  107.                 Same as above but captures sub-directories also (all of the
  108.                 disk).
  109.  
  110.  
  111.   > fd -u       FD with the u option will update the current DiskList with
  112.                 the contents of the temporary file TempDL.
  113.  
  114.   > fd -s       Does an update (as above) then, if the DiskList is in RAM,
  115.                 it is copied to its disk location.  DiskList and TempDL are
  116.                 removed from RAM.
  117.  
  118.   > fd -n       Creates a new DiskList, by deleting the contents of the
  119.                 Current DiskList.
  120.  
  121.   > fd -r diskname
  122.  
  123.       This will remove the disk listing in DiskList that matches 'diskname'.
  124.  
  125.   > fd arg1 arg2 ... argn
  126.  
  127.        If the arguments for FD are all found on the same line of a directory
  128.        listing in the DiskList then that dir listing is printed.
  129.  
  130.        If the search text is preceded with an ! with no spaces in between
  131.        then the search is case sensitive otherwise it is not.
  132.  
  133.        The disk name can also be used to list its contents.
  134.  
  135.  
  136.  
  137.                       Environment Variables
  138.                       ---------------------
  139.  
  140.   You should have env: assigned before invoking FD or else you will get an
  141.   annoying requester asking to insert volume env:.  Env: can be ASSIGN'ed
  142.   to RAM: if you do not want to create the standard ram:env directory.
  143.   [ Yes, this could have been circumvented but at the expense of larger
  144.     code!  I opted not to add it since assigning env: from the CLI is a
  145.     trivial matter. ]
  146.  
  147.   FD will check for the three environment variables listed below.
  148.  
  149.   *Notice* that DLDISK and DLTEMP require the name of DiskList also!
  150.  
  151.   Variable = Default setting if not specified.
  152.  
  153.   DLDISK   =  FindDisk:Disklist
  154.   ------
  155.            Disk storage location/name.  This is where FD expects to find
  156.            the permanent DiskList.  It must be on a floppy or hard drive.
  157.  
  158.   DLTEMP   =  ram:DiskList
  159.   ------
  160.            Ram storage location/name.  This is where FD will copy the
  161.            permanent DiskList to on an FD -load.  This makes the DiskList
  162.            resident and frees up the drive.
  163.  
  164.   DLDRIVE  =  df0:
  165.   -------
  166.            Captures dir of this drive on a FD -dir command.
  167.  
  168.  
  169.  
  170.  
  171.                          Getting Started
  172.                          ---------------
  173.  
  174.   With this disk in drive df0:  (this can be changed with an env. variable)
  175.  
  176.   Type> fd
  177.  
  178.   Hopefully this help screen provided will be all you ever need to refer
  179.   to in the future.
  180.  
  181.   Type> fd :
  182.  
  183.   This displays all disks in the DiskList [if there is an example one
  184.   provided].  It displays all of them because there is always a colon in
  185.   every volume name.
  186.  
  187.   Type> fd -l
  188.  
  189.   The DiskList will be loaded to ram:.
  190.  
  191.   Type> fd -n
  192.  
  193.   Respond 'y' to the prompt.  Now you have a new (empty) DiskList in ram:.
  194.  
  195.   Place any disk in drive df0:.
  196.  
  197.   Type> fd -d
  198.  
  199.   The root directory of this disk is captured.
  200.   Do this for several disks if you wish.
  201.  
  202.   Put the disk which contains FindDisk back in drive df0:.
  203.  
  204.   Type> fd -s
  205.  
  206.   Your new DiskList is updated and saved to disk.
  207.  
  208.   Type> fd :
  209.  
  210.   You should now get all your disks listed.
  211.  
  212.   Type> fd <disk name>
  213.  
  214.   This disk listing is displayed if it is in your DiskList.
  215.  
  216.   Type> fd <name of a program>
  217.  
  218.   The disk listing containing this program or directory is displayed.
  219.  
  220.   Simple as that!
  221.  
  222.  
  223.                          DiskList Format
  224.                          ---------------
  225.  
  226.    The DiskList is stored in a compacted form which presently:
  227.  
  228.      below: { unskrunched } => { skrunched }
  229.             [] is a byte of memory
  230.  
  231.      * compacts strings of spaces
  232.          { [$20] [$20] [$20] [$20] [$20] } => { [SKRUNCHAR] [30+5] }
  233.          { [$20] [$20] } => { [$20] [$20] }
  234.  
  235.      * the STARTSTR is compacted
  236.          { STARTSTR } => { [STARTCHAR] }
  237.  
  238.  
  239.  
  240.                     BUG FIXES / UPDATE HISTORY
  241.                     --------------------------
  242.  
  243.    FindDisk2.2   Output now sent to stdout for redirection and piping
  244.                  to work properly.
  245.  
  246.                  Environment variable DLDISK now defaults to
  247.                  FindDisk:DiskList.
  248.  
  249.    FindDisk2.1   Option -a created to capture all sub-directories on
  250.                  a given disk when adding it to the DiskList.
  251.  
  252.                  A sub-directory can now be specified as a parameter
  253.                  to the -d and -a options.
  254.  
  255.                  Some 2.0 error returns were not propery freeing up
  256.                  allocated resouces.  These were accordingly squashed.
  257.  
  258.    FindDisk2.0   First release.
  259.  
  260.  
  261.  
  262.