home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / comm / Fido / TrapDoor / docs / TrapScan.Man < prev    next >
Text File  |  1994-06-23  |  14KB  |  498 lines

  1.  
  2.  
  3.      Page 1            TrapDoor's Directory Scanner             Page 1
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                  TrapScan
  22.                        TrapDoor's Directory Scanner
  23.                                 Version 1.7
  24.                           Copyright (c) 1991-1994
  25.                    Martin Laubach and Maximilian Hantsch
  26.                             All rights reserved
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                              TrapScan's Manual
  34.                         Thursday 24-Feb-94 17:27:51
  35.                           Copyright (c) 1991-1994
  36.                    Martin Laubach and Maximilian Hantsch
  37.                             All rights reserved
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                "I stand in pause where I shall first begin"
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.      Page 2            TrapDoor's Directory Scanner             Page 2
  66.  
  67.  
  68.  
  69.   1. Introduction     
  70.  
  71.        This document is a brief description of TrapScan, the
  72.      versatile TrapDoor utility for scanning directories.  
  73.  
  74.        TrapScan skims through any directory indicated, extracting
  75.      files matching certain conditions.  
  76.  
  77.  
  78.  
  79.   2. Basics     
  80.  
  81.        TrapScan is a CLI based application, it can't be run from
  82.      WorkBench. It accepts a narrow range of configuration statements
  83.      that allow an easy and accurate configuration.  
  84.  
  85.        It is built to help FidoNet node operators in the maintenance
  86.      of their system -- it allows them to automatically act on
  87.      certain incoming files with specific attributes. In that vein,
  88.      it looks very much like LIST or DIR -- with the exception that
  89.      it allows for rather complex expressions to be met for listing a
  90.      file.  
  91.  
  92.        It supports the normal AmigaDOS filename pattern matching, as
  93.      well as matching of the tag/value pairs the products of the
  94.      TrapFamily use to store information in the file comment.  
  95.  
  96.        TrapScan will return an error code of 5 when no matching file
  97.      could be located. This can come in very handy in scripts (e.g.
  98.      for looking for a new, legite nodediff).  
  99.  
  100.  
  101.  
  102.   3. How To    
  103.  
  104.        TrapScan is really easy to use. Just type "TrapScan", and it
  105.      will show a summary of its parameters, along with their default
  106.      settings.  
  107.  
  108.   3.1. Parameters     
  109.  
  110.        The following command-line parameters are recognized.  
  111.  
  112.      AND     
  113.  
  114.        Used to join two clauses using a logical and function. See
  115.      below for more about complicated selection criteria.  
  116.  
  117.      DIRECTORY <dir>    
  118.  
  119.        Specifies the directory TrapScan should look for files. This
  120.      defaults to the current directory "", but any other directory
  121.      name will do just fine (e.g. "DIRECTORY Mail:inbound").  
  122.  
  123.  
  124.      How To                                         DIRECTORY <dir>
  125.  
  126.  
  127.      Page 3            TrapDoor's Directory Scanner             Page 3
  128.  
  129.  
  130.  
  131.      FASTER     
  132.  
  133.        The BLink compatibility switch. Consult BLink's documentation
  134.      for more in-depth description of this option.  
  135.  
  136.      FILE <pattern>    
  137.  
  138.        Just as with the LIST or DIR command, you may use patterns to
  139.      select certain files from the directory being scanned. For
  140.      example, "FILE #?.PKT" will select only .PKT files for display.  
  141.  
  142.        Note that because of the SAS supplied library function that
  143.      performs the pattern matching, it may be possible that
  144.      complicated patterns do not work as advertised. Break these up
  145.      in smaller expressions, and join them with AND/OR/NOT.  
  146.  
  147.      LFORMAT <format>    
  148.  
  149.        Just as LIST, TrapScan can be used to build more complicated
  150.      script files using the LFORMAT command. The format string you
  151.      submit to LFORMAT is written verbatim to the output, with the
  152.      exception of a couple of special formatting commands which are
  153.      replaced with their respective value.  
  154.  
  155.        These formatting commands all start with a percent sign (%%)
  156.      and are followed by one of those characters below: 
  157.  
  158.             %c ........ Inserts the file comment.  
  159.             %d ........ Inserts the current directory name, as given
  160.                         by the DIRECTORY parameter.  
  161.             %f ........ Inserts the full file name, including full
  162.                         path description.  
  163.             %l ........ Inserts the current file size (whatever this
  164.                         may be good for).  
  165.             %n ........ Inserts the filename (without any path).  
  166.             %s ........ Inserts the current file name, including
  167.                         relative path ie. the path specified
  168.                         DIRECTORY).  
  169.             %p ........ Inserts the full path to the file, without
  170.                         any filename.  This is different from the %%d
  171.                         command in that the path is always given as
  172.                         an absolute path from the root directory.  
  173.  
  174.        So, for example, 
  175.  
  176.        LFORMAT %f %l 
  177.  
  178.        will produce output like this 
  179.  
  180.           DF0:t/trapdoor.dok 8640
  181.           DF0:t/post16.lzh 206848
  182.           DF0:t/DiskCopy1.pic 9898
  183.  
  184.  
  185.  
  186.      How To                                        LFORMAT <format>
  187.  
  188.  
  189.      Page 4            TrapDoor's Directory Scanner             Page 4
  190.  
  191.  
  192.      NOT     
  193.  
  194.        Logically inverts the following clause.  
  195.  
  196.      OR     
  197.  
  198.        Join the following clause to the current expression, using a
  199.      logical or.  
  200.  
  201.      TAG <tag> <value>   
  202.  
  203.        Just like FILE, this is used to select certain files upon
  204.      their tag/value pairs in the file comment. Wilcards are
  205.      supported in both the tag name and the value description. For
  206.      example, "TAG From 2:310/#?" will select only files that where
  207.      sent to me from a system in the 2:310 net.  
  208.  
  209.   3.2. Complicating things    
  210.  
  211.        As you may have remarked, there are a couple of keywords that
  212.      can be used to join several innocent looking expressions to
  213.      quite a complicated selection criteria.  
  214.  
  215.        Those keywords are AND, OR, and NOT. Just use them as you
  216.      would in everyday language -- for example: 
  217.  
  218.           TAG From 2:310/6.0 AND NOT FILE Nodelist.#? 
  219.  
  220.        will select any file received from 2:310/6 that is not named
  221.      Nodelist.#?.  
  222.  
  223.        This may look strange or complicated to you now, but with a
  224.      bit of experience, it will become very easy. Just start with
  225.      simple expressions, then experiment what happens when you add
  226.      some more...  
  227.  
  228.   3.3. Return Values    
  229.  
  230.        If everything was fine, and files matching the arguments were
  231.      found, TrapScan returns 0. If the arguments were parsed fine,
  232.      but no matching files were found, TrapScan returns 5. This
  233.      allows you to write scripts such as 
  234.  
  235.           TrapScan FILE Pointnet.??? AND FROM 2:310/3
  236.           If NOT WARN
  237.             ; process Pointnet
  238.           Endif
  239.  
  240.        If fatal errors were encountered, TrapScan returns 20.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.      How To                                           Return Values
  249.  
  250.  
  251.      Page 5            TrapDoor's Directory Scanner             Page 5
  252.  
  253.  
  254.                "Thus bad begins, and worse remains behind."
  255.  
  256.  
  257.  
  258.  
  259.   4. Legalese     
  260.  
  261.   4.1. Distribution     
  262.  
  263.        TrapScan is to be considered as a FreeWare product. The
  264.      authors retain the copyright and all other rights within, but at
  265.      the same time allow distribution of the product.  
  266.  
  267.        TrapScan may be redistributed with two restrictions.  First,
  268.      the distributor may only charge a fee up to the costs of
  269.      obtaining a public domain diskette from Fred Fish for the
  270.      complete package.  
  271.  
  272.        Second, the distributor agrees to cease distributing the
  273.      programs and data involved if requested to do so by the author.
  274.      The distributor may only distribute an unmodified copy of the
  275.      original TrapScan package, with all the supplied documentation
  276.      and copyright notices intact and without any files being added,
  277.      changed or omitted.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.   4.2. Support     
  289.  
  290.        If you have any suggestions, bug reports etc., feel free to
  291.      contact the authors of TrapScan/TrapDoor at the addresses below: 
  292.  
  293.           Maximilian Hantsch       Martin Laubach
  294.           Fido: 2:310/6            Fido: 2:310/3.14
  295.           Uucp: max@madvie.co.at   Uucp: mjl@alison.co.at
  296.  
  297.        Also, there is a FidoNet Echomail conference called TRAPDOOR,
  298.      which should be available at major backbones. This conference is
  299.      in English and intended for the users of TrapDoor and, of
  300.      course, TrapScan as well. There, you can freely exchange your
  301.      experience with these programs, discuss future enhancements you
  302.      would like to see etc. Both authors will participate in the
  303.      conference and try to assist you.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.      Legalese                                              Support
  311.  
  312.  
  313.      Page 6            TrapDoor's Directory Scanner             Page 6
  314.  
  315.  
  316.  
  317.   4.3. No Warranty    
  318.  
  319.        THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED
  320.      BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
  321.      COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
  322.      IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
  323.      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  324.      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
  325.      RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
  326.      YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
  327.      ALL NECESSARY SERVICING, REPAIR OR CORRECTION.  
  328.  
  329.        IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  330.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  331.      REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
  332.      FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
  333.      CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
  334.      THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
  335.      BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
  336.      PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  337.      PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED
  338.      OF THE POSSIBILITY OF SUCH DAMAGES.  
  339.  
  340.  
  341.  
  342.  
  343.   4.4. Disclaimer     
  344.  
  345.        No warranty, either express or implied, is made with respect
  346.      to the fitness or merchantability of TrapScan.  
  347.  
  348.        Maximilian Hantsch and Martin Laubach (referred to as "the
  349.      authors"), reserve the right to not develop any future versions
  350.      of TrapScan.  
  351.  
  352.        The authors will try to make a good faith attempt at
  353.      correcting any problems if any are discovered, but are in no way
  354.      required, nor bound to correct them.  
  355.  
  356.        The authors neither assume or accept any responsibility for
  357.      the use or misuse of this program. They also will not be held
  358.      liable for damages or any compensation beyond the original
  359.      registration fee due to loss of profit or any other damages
  360.      arising out of the use, or inability to use this program.  
  361.  
  362.        Neither Maximilian Hantsch nor Martin Laubach will be liable
  363.      for any damage arising from the failure of this program to
  364.      perform as described, or any destruction of other programs or
  365.      data residing on a system attempting to run the program. While
  366.      we know of no damaging errors, the user of this program uses it
  367.      at his or her own risk.  
  368.  
  369.  
  370.  
  371.  
  372.      Legalese                                           Disclaimer
  373.  
  374.  
  375.      Page 7            TrapDoor's Directory Scanner             Page 7
  376.  
  377.  
  378.  
  379.   5. Acknowledgements     
  380.  
  381.        The following names are either trademarks or the efforts of
  382.      the person and/or company listed: 
  383.  
  384.           Amiga and AmigaDOS are trademarks of Commodore-Amiga, Inc.
  385.           Fido and FidoNet are trademarks of Tom Jennings,
  386.                          Fido Software.
  387.           License Agreement inspired by Jack Radigan
  388.                          and the GNU General Public License.
  389.           Special Thanks to all our Registered TrapDoor Users.
  390.           TrapDoor by Maximilian Hantsch and Martin Laubach.
  391.           TrapList by Martin Laubach and Maximilian Hantsch.
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  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.      Acknowledgements
  435.  
  436.  
  437.      Page I            TrapDoor's Directory Scanner             Page I
  438.  
  439.  
  440.   Road Map
  441.  
  442.  
  443.         1. Introduction    .....................................    2
  444.         2. Basics    ...........................................    2
  445.         3. How To   ............................................    2
  446.            3.1. Parameters    ..................................    2
  447.            AND    ..............................................    2
  448.            DIRECTORY <dir>   ...................................    2
  449.            FASTER    ...........................................    3
  450.            FILE <pattern>   ....................................    3
  451.            LFORMAT <format>   ..................................    3
  452.            NOT    ..............................................    3
  453.            OR    ...............................................    4
  454.            TAG <tag> <value>  ..................................    4
  455.            3.2. Complicating things   ..........................    4
  456.            3.3. Return Values   ................................    4
  457.         4. Legalese    .........................................    5
  458.            4.1. Distribution    ................................    5
  459.            4.2. Support    .....................................    5
  460.            4.3. No Warranty   ..................................    6
  461.            4.4. Disclaimer    ..................................    6
  462.         5. Acknowledgements    .................................    7
  463.  
  464.  
  465.  
  466.  
  467.  
  468.                "For some must watch, while some must sleep,"
  469.                          "So runs the world away."
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.      Road Map
  497.  
  498.