home *** CD-ROM | disk | FTP | other *** search
/ Tools en Utilities / CDASS_5.ISO / shell / file / lf34.arj / LF.DOC next >
Encoding:
Text File  |  1992-03-09  |  20.0 KB  |  368 lines

  1.  
  2.  
  3.         LF -- LOCATE FILE  (c)1990-1992 William Pemberton
  4.         Version 3.4
  5.         --------------------------------------------------------------
  6.         Purpose:  To find a file on a hard disk system or network and to
  7.                   execute a command on the file(s) if needed.  LF is fast!
  8.                   Despite claims of other file search programs, LF proved to
  9.                   be just as fast as the fastest and much faster than other
  10.                   similar programs tested, and LF is NOVELL compatible.
  11.  
  12.         Syntax:   LF [options] filespec [command string]
  13.  
  14.         Remarks:  LF is similar to other file location utilities, except that
  15.                   LF looks across multiple drives (all drives on a hard disk
  16.                   and all drives to which you have access on a network), and 
  17.                   LF also enable you to execute a command on the files that 
  18.                   it locates. In addition, LF shows you the file even if it 
  19.                   is marked hidden or in a hidden directory.
  20.  
  21.                   LF can be fully configured by the user.  All command line
  22.                   options, except OLDER, NEWER, BIGGER, and SMALLER, can be written back to the
  23.                   .EXE so that they then become the default options.
  24.  
  25.                   LF searches for the given filespec (DOS wildcards are
  26.                   accepted) on all the disks beginning with the default
  27.                   or designated start drive.  If a valid sub-directory
  28.                   is specified in the filespec, LF will search from that
  29.                   sub-directory down.  For example, "LF \home\*.txt"
  30.                   would find the files \home\goo.txt, \home\joe\joe.txt,
  31.                   etc.  but not find \temp\lf.txt.
  32.  
  33.        Options:   The [options] mentioned in the "Syntax:" section above 
  34.                   include the following (case is not important):
  35.  
  36.                             /s      - Start Drive
  37.                             /e      - End Drive
  38.                             /o      - Only Drive
  39.                             /c      - Current Drive
  40.                             /i      - Interactive
  41.                             /y      - not-Interactive
  42.                             /a      - Find files with the given attribute(s)
  43.                             /NEWer  - Find files newer then specified
  44.                                       number of days
  45.                             /OLDer  - Find files older then specified
  46.                                       number of days
  47.                             /BIGger - Find files bigger then specifed
  48.                                       number of bytes
  49.                             /SMaller- Find files smaller then specifed
  50.                                       number of bytes
  51.                             /w      - Writes options back to .EXE
  52.  
  53.                   OLDER, NEWER, BIGGER, and SMALLER can be abbreviated to
  54.                   just the portions that are show in uppercase.
  55.  
  56.                   The Start Drive (/s) option specifies on which drive you
  57.                   want LF to start its search.  An equals sign (=) and 
  58.                   the letter of the drive should follow after the option; 
  59.                   e.g., "lf /s=H filename" would start the search at the 
  60.                   H: drive). If no "/s" option is given, LF will start at 
  61.                   whatever drive has been designated as the default start 
  62.                   drive.
  63.  
  64.                   The End Drive (/e) option specifies on which drive 
  65.                   you would like LF end its search for the file.  For example,     
  66.  
  67.                   "LF /e=g filename" would end the search on the G: drive. 
  68.                   If no "/e" option is given, LF will stop its search at
  69.                   either the last drive that it can find or at the default 
  70.                   last drive that is specified in the .EXE, whichever 
  71.                   comes first.  (To use more than one option, separate each
  72.                   option with space, e.g., "LF /S=F /E=G filename" will begin
  73.                   searching on the F: and end on the G: drive.)
  74.  
  75.                   The Only Drive (/o) option specifies the single drive you 
  76.                   want LF to conduct its search, e.g., "LF /O=H filename."
  77.                   This would be equivalent to using the "/s" and "/e" 
  78.                   options to set the starting and ending drives to the same 
  79.                   drive.  If you use the Writeback (/w) option, both start 
  80.                   and end drive will be set to the same drive.
  81.  
  82.  
  83.  
  84.  
  85.                   The Current Drive (/c) option tells LF to conduct the
  86.                   search only on the current drive.  This is just a
  87.                   shortcut for the /o option if you happen to be on the 
  88.                   drive you wish to search.  If you use the Writeback (/w)
  89.                   option to make the Current Drive the default, "lf /w /c"
  90.                   is the same as "lf /o=(Current Drive)."
  91.  
  92.                   The Attributes "/a" option is used to specify that you want 
  93.                   LF to find ONLY files with the specified attribute set.  The
  94.                   format for the command is "/a=[attribute list]" where
  95.                   the attribute list may be any combination of the letters
  96.                   "SHRA" (in uppercase only).  These letters stand for:
  97.  
  98.                                 S - System
  99.                                 H - Hidden
  100.                                 R - Read Only
  101.                                 A - Archive
  102.  
  103.                   These attributes can be written back to the LF.EXE (see
  104.                   Writeback option below.  When setting the attributes, use
  105.                   capital letters.  When unsetting them, use lower case.
  106.                   LF finds Hidden, Read Only, and Archive files as a default.
  107.                   This option is used for LIMITING the search, but for
  108.                   System files it is necessary to specify (with the /a=S 
  109.                   option) that you want to find files flagged as System; e.g., 
  110.                   "lf /a=S *.sys" tells LF to find the system files with the
  111.                   .sys extension.  Without the /a=S LF would list all .sys
  112.                   except those flagged as system files.
  113.                     
  114.                   If you use the Interactive (/i) option, LF will display 
  115.                   the command string that it intends to send to COMSPEC 
  116.                   followed by a ?, asking for confirmation before executing
  117.                   each command string.  Pressing Y will cause the command to 
  118.                   be executed, pressing Q will abort LF, pressing S will 
  119.                   skip processing on the current subdirectory and
  120.                   continue to the next subdirectory in the tree.  Pressing C
  121.                   (for Continuous) will switch LF into non-interactive mode.
  122.                   Pressing any other key will cause LF to skip the command
  123.                   on that file and continue looking for the next file. This
  124.                   option is to be used when you are executing commands, not
  125.                   just searching for a file.  If you don't use a command
  126.                   string, the /i option will control whether or not LF
  127.                   will pause after each screen full of filenames.
  128.  
  129.                   The non-interactive option (/y) overrides the interactive
  130.                   option.  /y will also un-do the interactive option if
  131.                   it has been written into LF.EXE file (see the Writeback
  132.                   option below).
  133.  
  134.                   The OLDER option (/OLDer), will limit the selection to
  135.                   files that have not been within the last X number of
  136.                   days.  The NEWER option (/NEWer), will limit the
  137.                   selection to files that have been modified within the
  138.                   last X number of days.  If LF receives both an OLDER
  139.                   and a NEWER command, it will try to find files that
  140.                   meet both criteria.  For this to work, NEWER must be
  141.                   greater then OLDER.
  142.  
  143.                   For example, if today's date is 07/01/91 and you have
  144.                   the following files:
  145.  
  146.                         OLD.TXT         05/01/91
  147.                         NEW.TXT         06/20/91
  148.  
  149.                   Then the following command would only find OLD.TXT:
  150.                         lf /older=30 *.*
  151.                   and the following would only find TWO.TXT:
  152.                         lf /newer=30 *.*
  153.  
  154.                   The command line:
  155.                         lf /newer=30 /older=15 *.*
  156.                   would find all files that are between 15 and 30 days
  157.                   old.
  158.  
  159.                   The command line:
  160.                         lf /newer=15 /older=30 *.*
  161.                   would find no files.  LF would be looking for files
  162.                   that are both newer then 15 days and older then 30,
  163.                   which is impossible.
  164.  
  165.                   The BIGGER option (/BIGger), will limit the selection to
  166.                   files that are larger then X bytes.  The SMALLER option
  167.                   (/SMaller), will limit the selection to files that are
  168.                   smaller then X bytes.  If LF receives both an BIGGER
  169.                   and a SMALLER command, it will try to find files that
  170.                   meet both criteria.  For this to work, SMALLER must
  171.                   not be greater then BIGGER.
  172.  
  173.                   OLDER, NEWER, SMALLER, and BIGGER will all work
  174.                   together.  This means that you can perform searchs
  175.                   such as "all files bigger then 1000 bytes that have
  176.                   been changed in the last 10 days."
  177.  
  178.                   The Writeback (/w) option will write all parameters to the 
  179.                   LF.EXE file so that they become the defaults.  All
  180.                   parameters, except /OLDER, /NEWER, /BIGGER, and /SMALLER,
  181.                   can be written into the executable.  For example, you would
  182.                   enter "LF /w /i" to make LF always default to interactive
  183.                   mode.  Due to the method used to perform this task, the /w
  184.                   option probably will not work with DOS versions before
  185.                   3.0.
  186.  
  187.                   Note that this method of storing parameters will save disk
  188.                   space over using a seperate configuration file.  Some
  189.                   virus detection programs will, however, complain about
  190.                   this since the .EXE file is being modified.
  191.  
  192. Command Strings:
  193.                   For the [command string] mentioned in the "Syntax" 
  194.                   statement above to work, you must have specified in
  195.                   your autoexec.bat or your network login script where
  196.                   the command interpreter (usually command.com) is located.
  197.                   For example, you might have "set comspec=c:\command.com" 
  198.                   near the bottom of your autoexec.bat.
  199.  
  200.                   The [command string] discussed above is a command 
  201.                   line to be executed on a file once it is found. 
  202.                   This may be anything that you would normally type from 
  203.                   the DOS prompt--a DOS command, a program, a batchfile, etc.
  204.                     
  205.                   If no command string is given, then LF will just
  206.                   print the name(s) of the found file(s).  If any of the
  207.                   special attributes are set (such as hidden), LF will
  208.                   also display which ones are set with attributes.
  209.  
  210.                   With most commands you do not need to add the path/name of 
  211.                   the file to the end because LF assumes that you intend the
  212.                   command to be done on the filespec searched for.  Therefore,
  213.                   "LF *.bk! del" means locate all files with the .bk! 
  214.                   extension and delete them.  When a set of characters follows 
  215.                   the command, however, you need "#file" where the
  216.                   path/filename would normally be in that command.  For 
  217.                   example, if you want to find all files with an extension
  218.                   of ".txt" and change their dates to 01/17/91, then you would
  219.                   enter "LF *.TXT CDATE #file 01/17/91" (CDATE being the name of
  220.                   a program that changes the dates of files).
  221.  
  222.                   Please not that this is a change from previous
  223.                   versions!  For versions of LF prior to 3.3, the token
  224.                   for the filename was "%s".  This caused some problems
  225.                   with DOS 5.0, so it was changed to "#file".
  226.  
  227. Acceptable Filespecs:
  228.  
  229.                   LF accepts any valid file specification; the standard
  230.                   DOS wild cards are accepted.
  231.  
  232. Interacting with LF (Help Screen, Pause, etc.):
  233.  
  234.                   Entering "LF" with no parameters will give a short help
  235.                   screen which shows the default value for each parameter. 
  236.                   Parameters that can be ON or OFF will have an * (asterisk)
  237.                   by them if they are enabled.  The start drive and end 
  238.                   drive parameters will show the actual values.
  239.  
  240.                   While LF is working, you may press the space bar to pause
  241.                   it.  During this pause, you will also be given a chance to 
  242.                   abort LF.
  243.  
  244. Customizing LF to Meet Your Needs (Configuration):
  245.  
  246.                   The first thing that you should do with LF is customize
  247.                   the default values of start drive and end drive to your
  248.                   system.  For most PCs, you don't need to do anything since
  249.                   LF will start its search at the C: drive and end at Z:
  250.                   (or the last disk it can find).  If your hard disk(s) 
  251.                   start somewhere other than C:, you should customize LF 
  252.                   with a statement which follows this format:
  253.                     
  254.                       lf /s=X /w (where "X" would be replaced with the letter
  255.                       of your starting drive).
  256.  
  257.                   If you are using LF on a Novell network, you should set
  258.                   both start drive and end drive to the appropriate
  259.                   values for your network.  If you do not do this, LF
  260.                   will probably search the same physical drive several
  261.                   times (due to the way Novell sets up the search
  262.                   drive mappings).
  263.  
  264. Examples of LF Commands:
  265.  
  266.                   lf *.doc
  267.                      - Find all .doc files on the disk system.
  268.  
  269.                   lf foo.bar cdate #file 01-17-90
  270.                      - Find all files named foo.bar and run CDATE on them 
  271.                        (CDATE changes the file's time/date stamp date). 
  272.                        The #file is necessary because the command string includes
  273.                        text following the filespec--compare with next example.
  274.  
  275.                   lf /s=H /e=L *.txt type #file  OR  lf /s=H /e=L *.txt type
  276.                      - Find all .txt files located in drives H: through
  277.                        L: and then execute a DOS type on them.  The #file is
  278.                        optional because the syntax of the command has no
  279.                        additional text after the filespec; therefore, LF 
  280.                        assumes the filespec to be found is the one to
  281.                        receive the action of the DOS command.
  282.  
  283.                   lf /o=D *.tmp
  284.                      - Find all .tmp files on the D: drive.  OR if you are
  285.                        on D: drive, you could also type, "lf /c *.tmp."
  286.  
  287.                   lf /i *.bak del
  288.                      - Find all .bak files and ask if each individual file
  289.                        should be deleted.  With the /i option activated,
  290.                        you would be able to enter Y or N to each file prior
  291.                        to its deletion.  (Note the #file was not needed--
  292.                        compare with the second example.)
  293.                          
  294.                   lf /a=HS *.com
  295.                      - Find all .com files that are hidden and system.
  296.  
  297.                   lf /a=R *.doc chmod /r
  298.                      - Find all .doc files that are Read Only and run
  299.                        CHMOD on them to make them not Read Only (see 
  300.                        Attributes option explained above).
  301.  
  302.                   lf /i /w
  303.                      - Set up LF so that it always runs in interactive
  304.                        mode.  (Note: by entering "lf /y /w" you can change 
  305.                        the default mode back to non-interactive.)
  306.  
  307.      CAUTION:     The command string can be very powerful or very
  308.                   dangerous!  I recommend ALWAYS using the "/i" option
  309.                   when using a command string that alters files (like del), 
  310.                   or better yet use the /w option to make LF always work
  311.                   in interactive mode.
  312.  
  313.                   Remember!  The command "lf *.* del" will find every file
  314.                   in every drive you have access to and delete them.  The 
  315.                   best way to avoid unintentional alteration of files is to
  316.                   write the interactive mode in as a default with the 
  317.                   command, "lf /i /w."
  318.  
  319.        Disclaimer:  The author hereby disclaims all warranties relating to
  320.                     this software, whether express or implied, including
  321.                     without limitation any implied warranties of
  322.                     merchantability or fitness for a particular purpose.
  323.                     The author will not be liable for any special,
  324.                     incidental, consequential, indirect or similar damages
  325.                     due to loss of data or any other reason, even if the
  326.                     author or an agent of the author has been advised of
  327.                     the possibility of such damages.  In no event shall the
  328.                     author's liability for any damages ever exceed the
  329.                     price paid for the license to use software, regardless
  330.                     of the form of the claim.  The person using the
  331.                     software bears all risk as to the quality and
  332.                     performance of the software. 
  333.  
  334.        Shareware:   LF is distributed as Shareware.  You are free to try
  335.                     the utility and make copies for others (Copies must
  336.                     include this file.)  If you continue to use LF,
  337.                     however, you are asked to make a donation to the author
  338.                     of $15 or more to support continued development of this
  339.                     and other software.
  340.  
  341.                     LF may be freely copied solely for the purpose of
  342.                     allowing others to try it, as long as the executable
  343.                     is unmodified and this .DOC is also provided.  No
  344.                     charge or payment may be levied for LF.
  345.  
  346.                     LF may be posted on Bulletin Boards or other
  347.                     electronic systems as long the long as the above
  348.                     paragraph is met.  If system has a general access
  349.                     fee, it is not considered a charge for LF (so a
  350.                     for-fee BBS MAY carry LF).
  351.  
  352.                     Distributors of "Public Domain," "Shareware," and/or
  353.                     User Supported software, who make a profit from the
  354.                     distribution of such software,  may distribute LF only
  355.                     after obtaining written permission from the author.
  356.  
  357.                     Please address any comments, suggestions, etc., to:
  358.                           
  359.                               William Pemberton
  360.                               P.O. Box 5754 
  361.                               Charlottesville, VA 22905
  362.                               
  363.                     Internet: wfp@turing.acs.virginia.edu
  364.  
  365.                     I can also be reached on the following BBSs:
  366.                        CVBBS - (804) 978-1376
  367.  
  368.