@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 - RCROSREF.BAT
echo -
echo -   To find cross_referenced contents_signature(s) on a remote
echo -     bulletin board system.  Used in conjunction with LOOKUP.
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 -      RCROSREF BBS.CAP ASKFILE.ZIP "<enter>"
echo -
echo -  where   BBS.CAP  is your capture_file containing the reply from a BBS
echo -                       to your recent LOOKUP inquiry.
echo -
echo -          ASKFILE.ZIP  by whatever name you give it, is the zipfile
echo -                       you send to the BBS as your new 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 > nul
if exist fwkcsloo.kup del fwkcsloo.kup > nul
if exist !@#^##^^.@!@ attrib -r !@#^##^^.@!@ > nul
if exist !@#^##^^.@!@ del !@#^##^^.@!@ > nul
fwkcs %1 /a7.4 !@#^##^^.@!@
if not exist !@#^##^^.@!@ goto help5
if exist @@#^##^^.@!@ attrib -r @@#^##^^.@!@ > nul
if exist @@#^##^^.@!@ del @@#^##^^.@!@ > nul
qsort !@#^##^^.@!@ @@#^##^^.@!@
del !@#^##^^.@!@ > nul
if not exist @@#^##^^.@!@ goto help6
fwkcs !@#^##^^.@!@ fwkcsloo.kup /up @@#^##^^.@!@
del !@#^##^^.@!@ > nul
del @@#^##^^.@!@ > nul
pkzip %2 fwkcsloo.kup -om > nul
if exist fwkcsloo.kup goto help7
echo -
echo - Now, if you upload the zipfile "%2" to the BBS which responded
echo - to your recent LOOKUP inquiry, you can quickly find the material
echo - it cross_referred you to in "%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 - Did not find any cross_reference contents_signature in "%1".
goto end
:help6
echo -
echo - What happened to Ben Baker's QSORT?  I didn't find it.
goto hw
:help7
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
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
echo -
