home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / FILE / LF31.ZIP / LF.DOC next >
Encoding:
Text File  |  1990-08-16  |  10.8 KB  |  215 lines

  1.  
  2.  
  3.  
  4.           LF -- LOCATE FILE  (c)1990 William Pemberton    Version 3.1
  5.           ----------------------------------------------------------- 
  6.           Purpose: Finds a file on a hard disk system or network.
  7.              
  8.           Format:  LF [options] filespec [Command String]
  9.                 
  10.           Remarks:  LF is similar to other file location utilities, except
  11.                     LF looks across multiple drives and gives you the
  12.                     ability to execute a command, on the files that are
  13.                     located.
  14.  
  15.                     LF can be fully configured by the user.  All command line
  16.                     options can be written back to the .EXE so that they
  17.                     then become the default options.
  18.  
  19.                     A given filespec is searched for on all the disks
  20.                     starting with the default start drive.
  21.  
  22.                     [Options] may be any of the following:
  23.                     (upper case is also allowed)
  24.  
  25.                               /s  - Start Drive
  26.                               /e  - End Drive
  27.                               /o  - Only Drive
  28.                               /i  - Interactive
  29.                               /y  - Not Interactive
  30.                               /a  - Find only files with the given attribute(s).
  31.                               /w  - Write options back to .EXE
  32.  
  33.                     The Start Drive (/s) option specifies on which drive you
  34.                     want LF to start its search. The letter of the drive
  35.                     should be given following a '=' after the option
  36.                     ("/s=H" would start with the H: drive, for example). If
  37.                     no "/s" option is given, LF will start at whatever
  38.                     drive has been designated as the default starting
  39.                     drive.
  40.  
  41.                     The End Drive (/e) option specifies the last drive that
  42.                     you would like LF to look on for the file. If no
  43.                     "/e" option is given, LF will stop it's search at
  44.                     either the last drive that it can find or at the
  45.                     default last drive that is specified in the .EXE,
  46.                     whichever comes first.
  47.  
  48.                     The Only Drive (/o) option specifies that you want
  49.                     LF to conduct a search of the given drive only.
  50.                     This would be equivalent to giving the using the
  51.                     "/s" and "/e" option to set the starting and ending
  52.                     drive to the same drive.  If the Writeback option
  53.                     (/w) is used, both start and end drive will be set
  54.                     to the same drive.
  55.  
  56.                     If the Interactive (/i) option is given, LF will ask
  57.                     for confirmation before executing each command string.
  58.                     The command string that LF intends to send to COMSPEC
  59.                     will be printed on the screen followed by a ?. Pressing
  60.                     Y will cause the command to be executed, pressing Q will
  61.                     abort LF, pressing S will skip processing on the
  62.                     current sub-directory an continue to the next
  63.                     sub-directory in the tree, and pressing any other key will
  64.                     cause LF to not execute the command on that file and
  65.                     continue looking for the next file. If no command string
  66.                     is given, the option is ignored.
  67.  
  68.                     The "/a" option is used to specify that you want LF to
  69.                     only find files with the specified attribute set.  The
  70.                     format for the command is "/a [attribute list]" where
  71.                     the attribute list may be any combination of the letters
  72.                     "SHRA", but must be in uppercase!  These letters stand for:
  73.  
  74.                                 S - System
  75.                                 H - Hidden
  76.                                 R - Read Only
  77.                                 A - Archive
  78.  
  79.                     These options can be written to the .EXE.  To unset
  80.                     an options, use lowercase.
  81.  
  82.                     The /w option will write all parameters to the .EXE
  83.                     file so that they become the defaults.  Because of
  84.                     the method used to perform this task, the /w option
  85.                     probably will not work with DOS 2.XX.
  86.  
  87.                     Filespec is any valid file specification, the standard
  88.                     DOS wild cards are accepted.
  89.  
  90.                     [Command String] is a command line to be executed on a
  91.                     file once it is found. This may be anything that you
  92.                     would normally type from the DOS prompt, a DOS
  93.                     command, a program, a batchfile, whatever!  You should
  94.                     place the characters "%s" at the location that you desire
  95.                     the full path name to appear.  If the "%s" is omitted,
  96.                     then one will automatically be appended to the end of
  97.                     the command string.
  98.  
  99.                     If no command string is given, then LF will just
  100.                     print the name of the found file(s).  If any of the
  101.                     special attributes are set (such as hidden), LF will
  102.                     also display which ones are set.
  103.  
  104.                     While LF is working, you may press any key to pause it.
  105.                     During the this pause, you will also be given a chance
  106.                     to abort LF.
  107.  
  108.                     Typing LF with no parameters will give a short help
  109.                     screen.  The default value for each parameter will be
  110.                     shown in this screen.  Parameters that are ON or OFF
  111.                     will have * by them if they are enabled.  The start
  112.                     drive and end drive parameters will show the actual
  113.                     values.
  114.  
  115.      Configuration: The first thing that you should do with LF is
  116.                     customize the values of start drive and end drive to
  117.                     your system.  For most PC's, you really don't need
  118.                     to do anything.  As provided, LF will start it's
  119.                     search at the C: drive and end at Z: (or the last
  120.                     disk it can find).  If your hard disk(s) start
  121.                     somewhere other than C:, you should do:
  122.                         lf /s=X /w
  123.  
  124.                     Where 'X' would be replaced with the letter of your
  125.                     starting drive.
  126.  
  127.                     If you are using LF on a Novell network, you should set
  128.                     both start drive and end drive to the appropriate
  129.                     values for your network.  If you do not do this, LF
  130.                     will probably search the same physical drive several
  131.                     times (due to the way Novell sets up the search
  132.                     drive mappings).
  133.  
  134.           Examples:
  135.  
  136.                     lf *.doc
  137.                        - find all .doc files on the disk system.
  138.  
  139.                     lf foo.bar cdate foo %s 01-17-90
  140.                        - find all files named foo.bar and run CDATE
  141.                          on them (CDATE would then change their time/date
  142.                          stamp so the date was 01-17-90).
  143.  
  144.                     lf /s=H /e=L *.txt type %s
  145.                        - find all .txt files located between drives
  146.                          H: and L:,  LF will then execute a DOS type on
  147.                          them.
  148.  
  149.                     lf /o=C *.tmp
  150.                        - find all .tmp files on the C: drive.
  151.  
  152.                     lf /i *.bak del
  153.                        - find all .bak files and ask, individually,
  154.                          if you want to delete them (note the %s was not
  155.                          needed).
  156.  
  157.                     lf /a=HS *.com
  158.                        - find all .com files that are Hidden and System
  159.  
  160.                     lf /a=R *.doc chmod /r %s
  161.                        - find all .doc files that are Read Only and run
  162.                          CHMOD on them to make them not Read Only.
  163.  
  164.                     lf /i /w
  165.                        - set up LF so that it always runs in interactive
  166.                          mode.
  167.  
  168.           Note:     The command string can be a very powerful or a very
  169.                     dangerous thing to use!  I recommend ALWAYS using the
  170.                     "/i" option when the command string could alter files
  171.                     (like del), or better yet use the /w option to make
  172.                     LF always work in interactive mode.
  173.  
  174.                      Remember! A command like:
  175.  
  176.                           lf *.* del
  177.                             - DON'T try this one at home folks!  It
  178.                               deletes everything it can get its hands
  179.                               on!  This could really ruin your day.
  180.  
  181.         Disclaimer: The author hereby disclaims all warranties relating to
  182.                     this software, whether express or implied, including
  183.                     without limitation any implied warranties of
  184.                     merchantability or fitness for a particular purpose.
  185.                     The author will not be liable for any special,
  186.                     incidental, consequential, indirect or similar damages
  187.                     due to loss of data or any other reason, even if the
  188.                     author or an agent of the author has been advised of
  189.                     the possibility of such damages. In no event shall the
  190.                     author's liability for any damages ever exceed the
  191.                     price paid for the license to use software, regardless
  192.                     of the form of the claim. The person using the
  193.                     software bears all risk as to the quality and
  194.                     performance of the software. 
  195.  
  196.          Shareware: LF is distributed as Shareware. You are free to try
  197.                     the utility and make copies for others (copies must
  198.                     include this file). If you continue to use LF,
  199.                     however, you are asked to make a donation to the author
  200.                     of $10 or more to support continued development of this
  201.                     and other software.
  202.  
  203.                     Distributors of "Public Domain", "Shareware", and/or
  204.                     User Supported software may distribute LF only after
  205.                     obtaining written permission from the author.
  206.  
  207.                     Please address any comments, suggestions, etc. to:
  208.                           
  209.                               William Pemberton
  210.                               PO Box 5754 
  211.                               Charlottesville, VA 22905
  212.                               
  213.                     Internet: flash@virginia.edu
  214.  
  215.