@echo off
if "%1" == "/*" goto sc01
cls
if exist QUERYFLA.GUP attrib -r QUERYFLA.GUP > nul
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
if exist QUERYFLA.GUP goto r1
if exist !@#^^^@@.#!@ attrib -r !@#^^^@@.#!@ > nul
echo hat > !@#^^^@@.#!@
fwkhi < !@#^^^@@.#!@
if not errorlevel 10 goto nhi
del !@#^^^@@.#!@ > nul
:sc01
cls
:usage
echo - For use with FWKCS(TM) Contents_Signature System, Version 1.12.
echo - (C)Copyright Frederick W. Kantor 1991. All rights reserved.
echo -
echo - CSM.BAT  \CS Contents_Signature subdirectory on_line help Menu, for
echo -          information on special_purpose .BAT and .COM programs.
echo -
echo -         (See CONTENTS.112, FWKCS112.REF, SETUP.112, and UTILS.112.)
echo -
echo - CSM.BAT is for use in the \CS subdirectory.
echo -
echo - Usage:      CSM "<enter>"
echo -
echo -  To select a program group, press
echo -
echo -  B  for .BAT programs:
echo -     NEWCSL.BAT    S_NEWCSL.BAT  REVCSL.BAT    S_REVCSL.BAT  CSDUPS.BAT
echo -     CS_SPLIT.BAT  CSFILKIT.BAT  AVONLY.BAT    FINDUNAV.BAT  KEEPMACS.BAT
echo -     REVERT.BAT    SETFWKCS.BAT  SETDRIVE.BAT  NULSTART.BAT  CSAMACS.BAT
echo -     DELCS.BAT
echo -
echo -  C  for .COM programs:
echo -     FWKCS.COM    FWKDG.COM    FWKDSA.COM ("DSA")    FWKHI.COM
echo -
if "%1" == "/*" goto zend
echo -  To abort (quit), press A.
:ask01
fwkhi
if errorlevel 13 goto ask01
if errorlevel 12 goto g5
if errorlevel 11 goto sc02
if errorlevel 10 goto ng1
goto ask01
:sq02
echo -
echo - To browse, press B.    To quit (abort), press A.
:sq0a2
fwkhi
if errorlevel 12 goto sq0a2
if errorlevel 11 goto sc02
if errorlevel 10 goto ng1
goto sq0a2
:sc02
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
cls
echo - For on_line help from each program, press the corresponding numeric key...
echo -
echo -   1. NEWCSL.BAT    make new contents_signature list.
echo -   2. S_NEWCSL.BAT  as in 1, above, but with many options,
echo -                      string searches, etc.
echo -
echo -   3. REVCSL.BAT    revise contents_signature list, keeping unique cs's
echo -                      from files which have been retired from active use.
echo -   4. S_REVCSL.BAT  as in 3, above, but with many options,
echo -                      string searches, etc.
echo -
echo - These are of particular value in cleaning out unwanted files,
echo -   for example, after doing a new installation or a major revision:
echo -
echo -   5. CSDUPS.BAT    find and tabulate duplicate files.
echo -   6. CS_SPLIT.BAT  split main contents_signature list into special groups.
echo -   7. CSFILKIT.BAT  do both 5 and 6, above, in one operation.
echo -
echo -   8. AVONLY.BAT    find and delete files which do not have Authenticity
echo -                      Verification ("AV") from inside AV_zipfiles.
echo -   9. FINDUNAV.BAT  this finds the non_AV files in AV_zipfiles for 8, above.
echo -
echo -  B = Back 1 screen.  F = Forward 1 screen.  C = .COM programs.  A = Abort.
echo inter_.BAT query > QUERYFLA.GUP
:ask02
fwkhi
if errorlevel 15 goto sc03
if errorlevel 13 goto ask02
if errorlevel 12 goto g5
if errorlevel 11 goto sc01
if errorlevel 10 goto ng1
if errorlevel 9 goto n19
if errorlevel 8 goto n18
if errorlevel 7 goto n17
if errorlevel 6 goto n16
if errorlevel 5 goto n15
if errorlevel 4 goto n14
if errorlevel 3 goto n13
if errorlevel 2 goto n12
if errorlevel 1 goto n11
goto ask02
:n11
cls
call NEWCSL /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open NEWCSL.BAT
goto sq02
:n12
cls
call S_NEWCSL /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open S_NEWCSL.BAT
goto sq02
:n13
cls
call REVCSL /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open REVCSL.BAT
goto sq02
:n14
cls
call S_REVCSL /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open S_REVCSL.BAT
goto sq02
:n15
cls
call CSDUPS /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open CSDUPS.BAT
goto sq02
:n16
cls
call CS_SPLIT /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open CS_SPLIT.BAT
goto sq02
:n17
cls
call CSFILKIT /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open CSFILKIT.BAT
goto sq02
:n18
cls
call AVONLY /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open AVONLY.BAT
goto sq02
:n19
cls
call FINDUNAV /* ..1.12
if not exist QUERYFLA.GUP goto sq02
echo - did not find/open FINDUNAV.BAT
goto sq02
:sq03
echo -
echo - To browse, press B.    To quit (abort), press A.
:sq0a3
fwkhi
if errorlevel 12 goto sq0a3
if errorlevel 11 goto sc03
if errorlevel 10 goto ng1
goto sq0a3
:sc03
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
cls
echo - For on_line help from each program, press the corresponding numeric key...
echo -
echo - These are special_purpose programs used during installation or removal
echo - of an FWKCS Contents_Signature System:
echo -
echo -   1. KEEPMACS.BAT transfers macros from a working copy of FWKCS.COM to
echo -                     a new copy, prior to installation.
echo -   2. REVERT.BAT   reverts all defaults on right side of "=" in FWKCS /d to
echo -                     their original values on left of "=" (deletes macros).
echo -   3. SETFWKCS.BAT sets FWKCS.COM defaults 1-4, A-F, (including macros) to
echo -                     work with \CS subdirectory and \CSA Contents_Signature
echo -                     Activity place.
echo -   4. SETDRIVE.BAT sets the drive designation in default entries 1..4, to
echo -                     point to the \cs subdirectory.
echo -   5. NULSTART.BAT deletes CSLIST.NDX, CSLIST.SRT, CSLIST1.NDX, CSLIST1.SRT;
echo -                     sets drive for default entries 1..4, sets up empty
echo -                     contents_signature system (for example, used in
echo -                     preparing for sequential search for redundancy).
echo -   6. CSAMACS.BAT  used in installing \CSA Contents_Signature Activity place,
echo -                     automatically installs macros and creates subdirectories.
echo -   7. DELCS.BAT    deletes non_directory files in the \CS subdirectory, and,
echo -                     if the \CS is then empty, removes it.
echo -
echo -  B = go Back 1 screen.  C = go to .COM programs.  A = Abort (quit).
echo inter_.BAT query > QUERYFLA.GUP
:ask03
fwkhi
if errorlevel 13 goto ask03
if errorlevel 12 goto g5
if errorlevel 11 goto sc02
if errorlevel 10 goto ng1
if errorlevel 8 goto ask03
if errorlevel 7 goto n27
if errorlevel 6 goto n26
if errorlevel 5 goto n25
if errorlevel 4 goto n24
if errorlevel 3 goto n23
if errorlevel 2 goto n22
if errorlevel 1 goto n21
goto ask03
:n21
cls
call KEEPMACS /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open KEEPMACS.BAT
goto sq03
:n22
cls
call REVERT /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open REVERT.BAT
goto sq03
:n23
cls
call SETFWKCS /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open SETFWKCS.BAT
goto sq03
:n24
cls
call SETDRIVE /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open SETDRIVE.BAT
goto sq03
:n25
cls
call NULSTART /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open NULSTART.BAT
goto sq03
:n26
cls
call CSAMACS /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open CSAMACS.BAT
goto sq03
:n27
cls
call DELCS /* ..1.12
if not exist QUERYFLA.GUP goto sq03
echo - did not find/open DELCS.BAT
goto sq03
:sq52
echo - To browse, press B. To quit (abort), press A.
:sq5a2
fwkhi
if errorlevel 12 goto sq5a2
if errorlevel 11 goto sc52
if errorlevel 10 goto ng1
goto sq5a2
:sc52
:g5
cls
echo - For on_line help from each program, press the corresponding numeric key...
echo -
echo -   On_line help from .COM programs:
echo -
echo -   1. FWKCS command_line format, file_manipulation, find, get, timing.
echo -
echo -   2. FWKCS /1 options: contents_signature generation, special functions.
echo -
echo -   3. FWKCS Auxiliary Functions (terse listing), special Column_17 flags,
echo -              credits.
echo -   4. FWKCS default settings, macros;  the d:\path\filename.ext, of the copy
echo -              of FWKCS.COM which was reached, appears near bottom of display.
echo -   5. FWKCS error_levels and related messages.
echo -
echo -   6. FWKCS license and dedication.
echo -
echo -   7. FWKDG for gathering filenames on system, making system directory, etc.
echo -
echo -   8. FWKDSA ("DSA") Directory Spacing Adjust, to parse DOS directory list.
echo -
echo -   9. FWKHI Hexadecimal Input, a .COM utility for input to .BAT programs.
echo -
echo -  B = go to .BAT programs.  A = Abort (quit).
:ask52
fwkhi
if errorlevel 12 goto ask52
if errorlevel 11 goto sc02
if errorlevel 10 goto ng1
if errorlevel 9 goto n59
if errorlevel 8 goto n58
if errorlevel 7 goto n57
if errorlevel 6 goto n56
if errorlevel 5 goto n55
if errorlevel 4 goto n54
if errorlevel 3 goto n53
if errorlevel 2 goto n52
if errorlevel 1 goto n51
goto ask52
:n51
cls
fwkcs /*
echo  -
echo -
echo -
echo -
goto sq52
:n52
cls
fwkcs /1*
echo  -
echo -
echo -
echo -
goto sq52
:n53
cls
fwkcs /a
goto sq52
:n54
cls
fwkcs /d
echo         -
goto sq52
:n55
cls
fwkcs /e
echo   -
echo -
goto sq52
:n56
cls
fwkcs /l
echo  -
echo -
echo -
echo -
goto sq52
:n57
cls
fwkdg /*
goto sq52
:n58
cls
dsa /*
echo -
goto sq52
:n59
cls
fwkhi /*
echo -
goto sq52
:r1
echo -
echo - This program must have the right to create and delete, in this
echo - (sub)directory, a file called QUERYFLA.GUP.
echo -
echo - Programs this program calls must have the right to delete, in this
echo - (sub)directory, the QUERYFLA.GUP file this program creates.
echo -
echo - Please provide those creation and deletion rights,
echo -   and then please try again.
goto ng
:nhi
del !@#^^^@@.#!@ > nul
echo -
echo - Where is Dr. Fred Kantor's FWKHI.COM?
:ng
echo -
:ng1
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
:zend
