home *** CD-ROM | disk | FTP | other *** search
-
-
- LF -- LOCATE FILE (c)1990-1992 William Pemberton
- Version 3.4
- --------------------------------------------------------------
- Purpose: To find a file on a hard disk system or network and to
- execute a command on the file(s) if needed. LF is fast!
- Despite claims of other file search programs, LF proved to
- be just as fast as the fastest and much faster than other
- similar programs tested, and LF is NOVELL compatible.
-
- Syntax: LF [options] filespec [command string]
-
- Remarks: LF is similar to other file location utilities, except that
- LF looks across multiple drives (all drives on a hard disk
- and all drives to which you have access on a network), and
- LF also enable you to execute a command on the files that
- it locates. In addition, LF shows you the file even if it
- is marked hidden or in a hidden directory.
-
- LF can be fully configured by the user. All command line
- options, except OLDER, NEWER, BIGGER, and SMALLER, can be written back to the
- .EXE so that they then become the default options.
-
- LF searches for the given filespec (DOS wildcards are
- accepted) on all the disks beginning with the default
- or designated start drive. If a valid sub-directory
- is specified in the filespec, LF will search from that
- sub-directory down. For example, "LF \home\*.txt"
- would find the files \home\goo.txt, \home\joe\joe.txt,
- etc. but not find \temp\lf.txt.
-
- Options: The [options] mentioned in the "Syntax:" section above
- include the following (case is not important):
-
- /s - Start Drive
- /e - End Drive
- /o - Only Drive
- /c - Current Drive
- /i - Interactive
- /y - not-Interactive
- /a - Find files with the given attribute(s)
- /NEWer - Find files newer then specified
- number of days
- /OLDer - Find files older then specified
- number of days
- /BIGger - Find files bigger then specifed
- number of bytes
- /SMaller- Find files smaller then specifed
- number of bytes
- /w - Writes options back to .EXE
-
- OLDER, NEWER, BIGGER, and SMALLER can be abbreviated to
- just the portions that are show in uppercase.
-
- The Start Drive (/s) option specifies on which drive you
- want LF to start its search. An equals sign (=) and
- the letter of the drive should follow after the option;
- e.g., "lf /s=H filename" would start the search at the
- H: drive). If no "/s" option is given, LF will start at
- whatever drive has been designated as the default start
- drive.
-
- The End Drive (/e) option specifies on which drive
- you would like LF end its search for the file. For example,
-
- "LF /e=g filename" would end the search on the G: drive.
- If no "/e" option is given, LF will stop its 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. (To use more than one option, separate each
- option with space, e.g., "LF /S=F /E=G filename" will begin
- searching on the F: and end on the G: drive.)
-
- The Only Drive (/o) option specifies the single drive you
- want LF to conduct its search, e.g., "LF /O=H filename."
- This would be equivalent to using the "/s" and "/e"
- options to set the starting and ending drives to the same
- drive. If you use the Writeback (/w) option, both start
- and end drive will be set to the same drive.
-
-
-
-
- The Current Drive (/c) option tells LF to conduct the
- search only on the current drive. This is just a
- shortcut for the /o option if you happen to be on the
- drive you wish to search. If you use the Writeback (/w)
- option to make the Current Drive the default, "lf /w /c"
- is the same as "lf /o=(Current Drive)."
-
- The Attributes "/a" option is used to specify that you want
- LF to find ONLY 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" (in uppercase only). These letters stand for:
-
- S - System
- H - Hidden
- R - Read Only
- A - Archive
-
- These attributes can be written back to the LF.EXE (see
- Writeback option below. When setting the attributes, use
- capital letters. When unsetting them, use lower case.
- LF finds Hidden, Read Only, and Archive files as a default.
- This option is used for LIMITING the search, but for
- System files it is necessary to specify (with the /a=S
- option) that you want to find files flagged as System; e.g.,
- "lf /a=S *.sys" tells LF to find the system files with the
- .sys extension. Without the /a=S LF would list all .sys
- except those flagged as system files.
-
- If you use the Interactive (/i) option, LF will display
- the command string that it intends to send to COMSPEC
- followed by a ?, asking for confirmation before executing
- each command string. Pressing Y will cause the command to
- be executed, pressing Q will abort LF, pressing S will
- skip processing on the current subdirectory and
- continue to the next subdirectory in the tree. Pressing C
- (for Continuous) will switch LF into non-interactive mode.
- Pressing any other key will cause LF to skip the command
- on that file and continue looking for the next file. This
- option is to be used when you are executing commands, not
- just searching for a file. If you don't use a command
- string, the /i option will control whether or not LF
- will pause after each screen full of filenames.
-
- The non-interactive option (/y) overrides the interactive
- option. /y will also un-do the interactive option if
- it has been written into LF.EXE file (see the Writeback
- option below).
-
- The OLDER option (/OLDer), will limit the selection to
- files that have not been within the last X number of
- days. The NEWER option (/NEWer), will limit the
- selection to files that have been modified within the
- last X number of days. If LF receives both an OLDER
- and a NEWER command, it will try to find files that
- meet both criteria. For this to work, NEWER must be
- greater then OLDER.
-
- For example, if today's date is 07/01/91 and you have
- the following files:
-
- OLD.TXT 05/01/91
- NEW.TXT 06/20/91
-
- Then the following command would only find OLD.TXT:
- lf /older=30 *.*
- and the following would only find TWO.TXT:
- lf /newer=30 *.*
-
- The command line:
- lf /newer=30 /older=15 *.*
- would find all files that are between 15 and 30 days
- old.
-
- The command line:
- lf /newer=15 /older=30 *.*
- would find no files. LF would be looking for files
- that are both newer then 15 days and older then 30,
- which is impossible.
-
- The BIGGER option (/BIGger), will limit the selection to
- files that are larger then X bytes. The SMALLER option
- (/SMaller), will limit the selection to files that are
- smaller then X bytes. If LF receives both an BIGGER
- and a SMALLER command, it will try to find files that
- meet both criteria. For this to work, SMALLER must
- not be greater then BIGGER.
-
- OLDER, NEWER, SMALLER, and BIGGER will all work
- together. This means that you can perform searchs
- such as "all files bigger then 1000 bytes that have
- been changed in the last 10 days."
-
- The Writeback (/w) option will write all parameters to the
- LF.EXE file so that they become the defaults. All
- parameters, except /OLDER, /NEWER, /BIGGER, and /SMALLER,
- can be written into the executable. For example, you would
- enter "LF /w /i" to make LF always default to interactive
- mode. Due to the method used to perform this task, the /w
- option probably will not work with DOS versions before
- 3.0.
-
- Note that this method of storing parameters will save disk
- space over using a seperate configuration file. Some
- virus detection programs will, however, complain about
- this since the .EXE file is being modified.
-
- Command Strings:
- For the [command string] mentioned in the "Syntax"
- statement above to work, you must have specified in
- your autoexec.bat or your network login script where
- the command interpreter (usually command.com) is located.
- For example, you might have "set comspec=c:\command.com"
- near the bottom of your autoexec.bat.
-
- The [command string] discussed above 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, etc.
-
- If no command string is given, then LF will just
- print the name(s) of the found file(s). If any of the
- special attributes are set (such as hidden), LF will
- also display which ones are set with attributes.
-
- With most commands you do not need to add the path/name of
- the file to the end because LF assumes that you intend the
- command to be done on the filespec searched for. Therefore,
- "LF *.bk! del" means locate all files with the .bk!
- extension and delete them. When a set of characters follows
- the command, however, you need "#file" where the
- path/filename would normally be in that command. For
- example, if you want to find all files with an extension
- of ".txt" and change their dates to 01/17/91, then you would
- enter "LF *.TXT CDATE #file 01/17/91" (CDATE being the name of
- a program that changes the dates of files).
-
- Please not that this is a change from previous
- versions! For versions of LF prior to 3.3, the token
- for the filename was "%s". This caused some problems
- with DOS 5.0, so it was changed to "#file".
-
- Acceptable Filespecs:
-
- LF accepts any valid file specification; the standard
- DOS wild cards are accepted.
-
- Interacting with LF (Help Screen, Pause, etc.):
-
- Entering "LF" with no parameters will give a short help
- screen which shows the default value for each parameter.
- Parameters that can be ON or OFF will have an * (asterisk)
- by them if they are enabled. The start drive and end
- drive parameters will show the actual values.
-
- While LF is working, you may press the space bar to pause
- it. During this pause, you will also be given a chance to
- abort LF.
-
- Customizing LF to Meet Your Needs (Configuration):
-
- The first thing that you should do with LF is customize
- the default values of start drive and end drive to your
- system. For most PCs, you don't need to do anything since
- LF will start its 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 customize LF
- with a statement which follows this format:
-
- 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 of LF Commands:
-
- lf *.doc
- - Find all .doc files on the disk system.
-
- lf foo.bar cdate #file 01-17-90
- - Find all files named foo.bar and run CDATE on them
- (CDATE changes the file's time/date stamp date).
- The #file is necessary because the command string includes
- text following the filespec--compare with next example.
-
- lf /s=H /e=L *.txt type #file OR lf /s=H /e=L *.txt type
- - Find all .txt files located in drives H: through
- L: and then execute a DOS type on them. The #file is
- optional because the syntax of the command has no
- additional text after the filespec; therefore, LF
- assumes the filespec to be found is the one to
- receive the action of the DOS command.
-
- lf /o=D *.tmp
- - Find all .tmp files on the D: drive. OR if you are
- on D: drive, you could also type, "lf /c *.tmp."
-
- lf /i *.bak del
- - Find all .bak files and ask if each individual file
- should be deleted. With the /i option activated,
- you would be able to enter Y or N to each file prior
- to its deletion. (Note the #file was not needed--
- compare with the second example.)
-
- lf /a=HS *.com
- - Find all .com files that are hidden and system.
-
- lf /a=R *.doc chmod /r
- - Find all .doc files that are Read Only and run
- CHMOD on them to make them not Read Only (see
- Attributes option explained above).
-
- lf /i /w
- - Set up LF so that it always runs in interactive
- mode. (Note: by entering "lf /y /w" you can change
- the default mode back to non-interactive.)
-
- CAUTION: The command string can be very powerful or very
- dangerous! I recommend ALWAYS using the "/i" option
- when using a command string that alters files (like del),
- or better yet use the /w option to make LF always work
- in interactive mode.
-
- Remember! The command "lf *.* del" will find every file
- in every drive you have access to and delete them. The
- best way to avoid unintentional alteration of files is to
- write the interactive mode in as a default with the
- command, "lf /i /w."
-
- 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 $15 or more to support continued development of this
- and other software.
-
- LF may be freely copied solely for the purpose of
- allowing others to try it, as long as the executable
- is unmodified and this .DOC is also provided. No
- charge or payment may be levied for LF.
-
- LF may be posted on Bulletin Boards or other
- electronic systems as long the long as the above
- paragraph is met. If system has a general access
- fee, it is not considered a charge for LF (so a
- for-fee BBS MAY carry LF).
-
- Distributors of "Public Domain," "Shareware," and/or
- User Supported software, who make a profit from the
- distribution of such software, may distribute LF only
- after obtaining written permission from the author.
-
- Please address any comments, suggestions, etc., to:
-
- William Pemberton
- P.O. Box 5754
- Charlottesville, VA 22905
-
- Internet: wfp@turing.acs.virginia.edu
-
- I can also be reached on the following BBSs:
- CVBBS - (804) 978-1376
-
-