home *** CD-ROM | disk | FTP | other *** search
-
-
-
- LF -- LOCATE FILE (c)1990 William Pemberton Version 3.1
- -----------------------------------------------------------
- Purpose: Finds a file on a hard disk system or network.
-
- Format: LF [options] filespec [Command String]
-
- Remarks: LF is similar to other file location utilities, except
- LF looks across multiple drives and gives you the
- ability to execute a command, on the files that are
- located.
-
- LF can be fully configured by the user. All command line
- options can be written back to the .EXE so that they
- then become the default options.
-
- A given filespec is searched for on all the disks
- starting with the default start drive.
-
- [Options] may be any of the following:
- (upper case is also allowed)
-
- /s - Start Drive
- /e - End Drive
- /o - Only Drive
- /i - Interactive
- /y - Not Interactive
- /a - Find only files with the given attribute(s).
- /w - Write options back to .EXE
-
- The Start Drive (/s) option specifies on which drive you
- want LF to start its search. The letter of the drive
- should be given following a '=' after the option
- ("/s=H" would start with the H: drive, for example). If
- no "/s" option is given, LF will start at whatever
- drive has been designated as the default starting
- drive.
-
- The End Drive (/e) option specifies the last drive that
- you would like LF to look on for the file. If no
- "/e" option is given, LF will stop it's search at
- either the last drive that it can find or at the
- default last drive that is specified in the .EXE,
- whichever comes first.
-
- The Only Drive (/o) option specifies that you want
- LF to conduct a search of the given drive only.
- This would be equivalent to giving the using the
- "/s" and "/e" option to set the starting and ending
- drive to the same drive. If the Writeback option
- (/w) is used, both start and end drive will be set
- to the same drive.
-
- If the Interactive (/i) option is given, LF will ask
- for confirmation before executing each command string.
- The command string that LF intends to send to COMSPEC
- will be printed on the screen followed by a ?. Pressing
- Y will cause the command to be executed, pressing Q will
- abort LF, pressing S will skip processing on the
- current sub-directory an continue to the next
- sub-directory in the tree, and pressing any other key will
- cause LF to not execute the command on that file and
- continue looking for the next file. If no command string
- is given, the option is ignored.
-
- The "/a" option is used to specify that you want LF to
- only find files with the specified attribute set. The
- format for the command is "/a [attribute list]" where
- the attribute list may be any combination of the letters
- "SHRA", but must be in uppercase! These letters stand for:
-
- S - System
- H - Hidden
- R - Read Only
- A - Archive
-
- These options can be written to the .EXE. To unset
- an options, use lowercase.
-
- The /w option will write all parameters to the .EXE
- file so that they become the defaults. Because of
- the method used to perform this task, the /w option
- probably will not work with DOS 2.XX.
-
- Filespec is any valid file specification, the standard
- DOS wild cards are accepted.
-
- [Command String] is a command line to be executed on a
- file once it is found. This may be anything that you
- would normally type from the DOS prompt, a DOS
- command, a program, a batchfile, whatever! You should
- place the characters "%s" at the location that you desire
- the full path name to appear. If the "%s" is omitted,
- then one will automatically be appended to the end of
- the command string.
-
- If no command string is given, then LF will just
- print the name of the found file(s). If any of the
- special attributes are set (such as hidden), LF will
- also display which ones are set.
-
- While LF is working, you may press any key to pause it.
- During the this pause, you will also be given a chance
- to abort LF.
-
- Typing LF with no parameters will give a short help
- screen. The default value for each parameter will be
- shown in this screen. Parameters that are ON or OFF
- will have * by them if they are enabled. The start
- drive and end drive parameters will show the actual
- values.
-
- Configuration: The first thing that you should do with LF is
- customize the values of start drive and end drive to
- your system. For most PC's, you really don't need
- to do anything. As provided, LF will start it's
- search at the C: drive and end at Z: (or the last
- disk it can find). If your hard disk(s) start
- somewhere other than C:, you should do:
- lf /s=X /w
-
- Where 'X' would be replaced with the letter of your
- starting drive.
-
- If you are using LF on a Novell network, you should set
- both start drive and end drive to the appropriate
- values for your network. If you do not do this, LF
- will probably search the same physical drive several
- times (due to the way Novell sets up the search
- drive mappings).
-
- Examples:
-
- lf *.doc
- - find all .doc files on the disk system.
-
- lf foo.bar cdate foo %s 01-17-90
- - find all files named foo.bar and run CDATE
- on them (CDATE would then change their time/date
- stamp so the date was 01-17-90).
-
- lf /s=H /e=L *.txt type %s
- - find all .txt files located between drives
- H: and L:, LF will then execute a DOS type on
- them.
-
- lf /o=C *.tmp
- - find all .tmp files on the C: drive.
-
- lf /i *.bak del
- - find all .bak files and ask, individually,
- if you want to delete them (note the %s was not
- needed).
-
- lf /a=HS *.com
- - find all .com files that are Hidden and System
-
- lf /a=R *.doc chmod /r %s
- - find all .doc files that are Read Only and run
- CHMOD on them to make them not Read Only.
-
- lf /i /w
- - set up LF so that it always runs in interactive
- mode.
-
- Note: The command string can be a very powerful or a very
- dangerous thing to use! I recommend ALWAYS using the
- "/i" option when the command string could alter files
- (like del), or better yet use the /w option to make
- LF always work in interactive mode.
-
- Remember! A command like:
-
- lf *.* del
- - DON'T try this one at home folks! It
- deletes everything it can get its hands
- on! This could really ruin your day.
-
- Disclaimer: The author hereby disclaims all warranties relating to
- this software, whether express or implied, including
- without limitation any implied warranties of
- merchantability or fitness for a particular purpose.
- The author will not be liable for any special,
- incidental, consequential, indirect or similar damages
- due to loss of data or any other reason, even if the
- author or an agent of the author has been advised of
- the possibility of such damages. In no event shall the
- author's liability for any damages ever exceed the
- price paid for the license to use software, regardless
- of the form of the claim. The person using the
- software bears all risk as to the quality and
- performance of the software.
-
- Shareware: LF is distributed as Shareware. You are free to try
- the utility and make copies for others (copies must
- include this file). If you continue to use LF,
- however, you are asked to make a donation to the author
- of $10 or more to support continued development of this
- and other software.
-
- Distributors of "Public Domain", "Shareware", and/or
- User Supported software may distribute LF only after
- obtaining written permission from the author.
-
- Please address any comments, suggestions, etc. to:
-
- William Pemberton
- PO Box 5754
- Charlottesville, VA 22905
-
- Internet: flash@virginia.edu
-
-