home *** CD-ROM | disk | FTP | other *** search
- LOOKFOR .ZIP ASCII SEARCH UTILITY
-
- Syntax: LOOKFOR {ZipFile} {Search criteria}
-
- To print the results of your search: LOOKFORP {ZipFile} {Search criteria}
-
- This very simple batch file allows you to search inside ASCII .ZIPs for
- text WITHOUT UNZIPPING THE FILE. It shows the line or lines that match
- your search criteria, or can print them. LOOKFOR.BAT is very useful for
- searching BBS file lists. You can download these file lists ZIPPED, then
- use LOOKFOR to find file descriptions with your search criteria without
- unzipping them. This saves a lot of online time spent searching for files.
-
- LOOKFOR.BAT uses the amazing FGREP ASCII search program by Chris Dunford,
- PKware's fine PKUNZIP program, and the good ol' DOS program MORE.COM. You
- must have these programs available in the same directory as the LOOKFOR
- batch file in order for this program to work. The LOOKFOR batch file
- functions by using PKUNZIP's -c option, which lists the contents of a zip
- to the screen. We then send or "pipe" this output to FGREP, which searches
- for a word or words you specify as the {search criteria} from the .ZIP
- file's output. MORE.COM is used in case the listing is too big for the
- screen. PKUNZIP and FGREP are available through many BBS systems;
- MORE.COM is a DOS utility program.
-
- Follow these instructions:
-
- 1. Copy PKUNZIP.EXE, FGREP.COM, MORE.COM, LOOKFOR.BAT and LOOKFORP.BAT
- to the same directory. If you don't do this LOOKFOR will display an error
- message and will not function.
-
- 2. To run LOOKFOR, type LOOKFOR, the zipfile name and the search criteria (in
- quotes if it's more than one word) at the DOS prompt. Make sure you're in
- the directory where you copied these files.
-
- Example: If you want to look in the file PRETTY.ZIP for the word THINGS:
-
- at the prompt type LOOKFOR PRETTY.ZIP THINGS
-
- If you're looking in the file NATURE.ZIP for the words OAK TREES:
-
- at the prompt type LOOKFOR NATURE.ZIP "OAK TREES"
-
- NOTE THAT YOU MUST USE QUOTATION MARKS IF THE TERM YOU'RE LOOKING FOR
- IS MORE THAN ONE WORD, or LOOKFOR will not function properly. If you'd like,
- you can use quotes all the time so you don't forget. One word criteria in
- quotes work fine. YOU CAN USE UP TO EIGHT WORDS in your search criteria.
-
- If the file you wish to search is not in the same directory as LOOKFOR,
- simply specify the directory:
-
- To search in the file NICE.ZIP in directory C:\OVERALL for the word THINGS:
-
- at the prompt type LOOKFOR C:\OVERALL\NICE.ZIP THINGS
-
- You'll see SEARCHING...PLEASE WAIT on the screen. You will then see all
- lines that contain the word THINGS on the screen. If the file you're
- searching is long this can take a few minutes.
-
- 3. To print the results of your search instead of their appearing on the
- screen, use LOOKFORP.BAT. Follow the same instructions using LOOKFORP
- instead of LOOKFOR. This option will print to LPT1:; if your printer is
- hooked up to a different port, see instructions below.
-
-
-
- To print text with the word THINGS in the file NICE.ZIP in directory
- C:\OVERALL:
-
- at the prompt type LOOKFORP C:\OVERALL\NICE.ZIP THINGS
-
- POSSIBLE PROBLEM: For reasons that I don't completely understand, one of
- the programs used by LOOKFOR will sometimes write temporary files onto your
- hard drive under certain circumstances:
-
- 1. If you specify more than one word in your search
- criteria and forget to enclose the words in
- quotation marks
-
- 2. If the search criteria is not found
-
- Note that the temporary files are only written under these circumstances,
- and NOT CONSISTENTLY. The temporary files in my tests were always
- written to the root directory, and they always started with numbers. Check
- for these files if either one of the above situations occurs and delete them.
- You'll know that the files were generated by LOOKFOR because the date and
- time will match the date and time you ran LOOKFOR.
-
- Options for advanced users:
-
- - SEARCH A SPECIFIED FILE ONLY - use an ASCII word processor to substitute
- a file name for the %1 in LOOKFOR.BAT or LOOKFORP.BAT. I use this myself to
- search the BBS EXECPC's file list. I ZIPped all of the BBS's directory of
- files in one ZIP called EXECPC.ZIP. I then substituted EXECPC.ZIP for the %1
- expression in LOOKFOR.BAT, and changed the numbering of the % expressions
- after FGREP so they start with %1:
-
- PKUNZIP -C EXECPC.ZIP | FGREP %1 %2... etc.
-
- I changed the name of LOOKFOR.BAT to EXECLOOK.BAT. Now I just type:
-
- EXECLOOK "THINGS"
-
- to search for the word "THINGS" in this file. I have modified LOOKFOR for
- several text files of BBS file lists, so I have a batch file for each one.
-
- - SEND THE RESULTS OF YOUR SEARCH TO A PRINTER CONNECTED TO A
- DIFFERENT PORT THAN LPT1- Just use an ASCII text editor to modify the line
- beginning with PKUNZIP in LOOKFORP.BAT to change the port:
-
- PKUNZIP -C %1 | FGREP %2 %3 %4 %5 %6 %7 %8 %9 > LPT2:
-
- for port LPT2:
-
- - USE LOOKFOR WITH OTHER FILE COMPRESSION PROGRAMS- You can modify
- LOOKFOR to work with file compression programs other than PKUNZIP, as long as
- the program has an "extract to screen" option. For example, LHarc has an option
- "e" that extracts to the screen. To use LOOKFOR with LHarc, you would modify
- the LOOKFOR.BAT line that starts with PKUNZIP to:
-
- LHarc e %1 | FGREP %2 %3 %4 %5 %6 %7 %8 %9 | MORE
-
- Also change all references to PKUNZIP in LOOKFOR.BAT to LHarc references so
- LOOKFOR's error checking and messages are correct. The line of LOOKFOR.BAT
- that says "if exist PKUNZIP.EXE" would be changed to "if exist LHarc.exe", etc.
- You get the idea.
-
-
-
- ----------------------------------------------------------------------------
-
- I hereby release LOOKFOR into the public domain for the public's unlimited
- use. That's just the kind of guy I am. HOWEVER, please make ABSOLUTELY
- sure that if you like this program and use it that you register your
- copies of PKUNZIP and FGREP. Registration information is contained in
- those .ZIPs.
-
- A final note: this batch file has only been tested with DOS 3.3. I cannot
- assume any responsibility or liability for this program not working
- correctly on other versions of DOS. Nor am I responsible or liable for
- any damages, consequential or inconsequential, arising from the use of
- LOOKFOR.BAT or LOOKFORP.BAT. Hey, it's free, what do you want for nothing?
-
- NEIL ZIMMERMAN
- Englewood, CO USA
- Contact me on EXECPC or CompuServe 72417,723.
-