@echo off
if not "%1" == "/*" goto aa
if "%2" == "..1.12" goto us1
cls
goto us0
:usage
echo -
:us0
echo - For use with FWKCS(TM) Contents_Signature System, Version 1.12.
echo - (C)Copyright Frederick W. Kantor 1991. All rights reserved.
echo - Your use of this program is at solely your own risk.
echo -
:us1
echo - LOOKUP.BAT
echo -
echo -   To find matching material on remote bulletin board systems.
echo -
echo -   (You must have FWKCS.COM and Phil Katz's PKZIP(R) in your
echo -    subdirectory or available on your path.)
echo -
echo - Usage:
echo -
echo -      LOOKUP FILENAME.EXT ASKFILE.ZIP "<enter>"
echo -
echo -  where   FILENAME.EXT is the file you want to look up.
echo -
echo -          ASKFILE.ZIP  by whatever name you give it, is the zipfile
echo -                       you send to the BBS as your inquiry.
echo -
echo -  See LOOKUP.DOC.
goto end
:aa
if "%1" == "" goto help0
if "%2" == "" goto help1
if "%1" == "%2" goto help2
if not exist %1 goto help3
if exist %2 goto help4
if exist fwkcsloo.kup attrib -r fwkcsloo.kup
if exist fwkcsloo.kup del fwkcsloo.kup
fwkcs /1 %1 fwkcsloo.kup
if not exist fwkcsloo.kup goto help5
pkzip %2 fwkcsloo.kup -om > nul
if exist fwkcsloo.kup goto help6
echo -
echo - Now, if you upload the zipfile "%2" to any BBS which runs
echo -   FWKCS(TM) Contents_Signature System, Version 1.10 or later,
echo -             Remote Contents_Signature Inquiry option,
echo - you can quickly find what it has that
echo - matches the contents of "%1".
goto end
:help0
echo -
echo -  Nothing to do!
goto usage
:help1
echo -
echo - I also need to have the FILENAME.EXT to use for the output file.
goto try
:help2
echo -
echo - The output file must be different from the input file.
goto try
:help3
echo -
echo - did not find  %1
goto try
:help4
echo -
echo - the output file "%2" already exists. First delete it, and then
:try
echo -
echo -   Please try again...
goto usage
:help5
echo -
echo - What happened to Dr. Fred Kantor's FWKCS(TM)?  I didn't find it.
goto hw
:help6
del FWKCSLOO.KUP > nul
echo -
echo - What happened to Phil Katz's PKZIP(R)?  I didn't find it.
:hw
echo - How am I supposed to do this work?
:end
echo -
if not "%2" == "..1.12" goto zz
if exist QUERYFLA.GUP attrib -r QUERYFLA.GUP > nul
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
:zz
