@echo off
if not "%1" == "/*" goto aa
if "%2" == "..1.12" goto us1
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 -
:us1
echo - SETFWKCS.BAT to set "defaults" in FWKCS.COM.
echo -
echo - (Note: this does not install option g. See SETUP.112, FWKCS112.REF.)
echo -
echo - Usage:
echo -         SETFWKCS d n b D N "<enter>"
echo -
echo - d  without a ":" is drive for the \CS Contents_Signature subdirectory.
echo -
echo - n = 1 accept only zipfiles locally, any/no extension, self_extracting or not.
echo -     2 accept any non_directory file locally.
echo -
echo - b = 1 accept only zipfiles under Auxiliary Functions 5 and 6. (e.g., BBS) 
echo -     2 accept any non_directory file under /a5, /a6.
echo -
echo - D  without a ":" is drive for the \CSA Contents_Signature Activity place.
echo -
echo - N = 1 single user, no bulletin board system.
echo -     2 single local user, with (multi_node) bulletin board system.
echo -     3 multiple local users, with (multi_node) bulletin board system.
echo -
goto ng
:aa
cls
if "%1" == "" goto help1
if "%2" == "1" goto ab
if "%2" == "2" goto ab
goto help2
:ab
if "%3" == "1" goto ac
if "%3" == "2" goto ac
goto help3
:ac
if "%4" == "" goto help4
if "%5" == "1" goto bb
if "%5" == "2" goto bb
if "%5" == "3" goto bb
goto help5
:bb
md %1:\cs > nul
echo TEST > %1:\cs\!@#^#@!@.tmp
if not exist %1:\cs\!@#^#@!@.tmp goto nmd1
del %1:\cs\!@#^#@!@.tmp > nul
rd %1:\cs > nul
md %4:\csa > nul
echo TEST > %4:\csa\!@#^#@!@.tmp
if not exist %4:\csa\!@#^#@!@.tmp goto nmd2
del %4:\csa\!@#^#@!@.tmp > nul
rd %4:\csa > nul
fwkcs %1:\cs\cslist.ndx /d1
fwkcs %1:\cs\cslist.srt /d2
fwkcs %1:\cs\cslist1.ndx /d3
fwkcs %1:\cs\cslist1.srt /d4
if "%5" == "1" goto ea
if "%5" == "2" goto eb
if "%5" == "3" goto ec
:ea
fwkcs a18bc,%1:\csa\zcomb;f,%1:\csa\##cellar;j,%1:\csa\junkb;k0n2,1;o,oust;pwv /db
fwkcs b,%1:\csa\bav;e,%1:\csa\ziz;q,%1:\csa\potvirus;f,%1:\csa\##cellar; /dc
goto ff
:eb
fwkcs a18bc,%1:\csa\zcomb;f,%1:\csa\##cellar;j,%1:\csa\junkb;k0n2,1;o,oust;pwv /db
fwkcs b,%1:\csa\bav;e,%1:\csa\ziz;q,%1:\csa\potvirus;f,##cellar; /dc
goto ff
:ec
fwkcs a18bc,%1:\csa\zcomb;f,##cellar;j,%1:\csa\junkb;k0n2,1;o,oust;pwv /db
fwkcs b,%1:\csa\bav;e,%1:\csa\ziz;q,%1:\csa\potvirus;f,##cellar; /dc
:ff
fwkcs %1:\csa\fwkupld.log /da
fwkcs v1,%1:\csa\telsysop;t,%1:\csa\trashold;a18,,%1:\csa\old;n2,1,%1:\csa\qsn;opw /dd
fwkcs iyj,%1:\csa\junk;h,%1:\csa\msg;k0ke,%1:\csa\enc;kf,%1:\csa\fzt; /de
fwkcs c,%1:\csa\zcom;v /df
if "%2" == "2" goto gg
fwkcs z[b] /db
:gg
if "%3" == "2" goto end1
fwkcs [d]z /dd
goto end1
:nmd1
echo - Did not succeed in making %1:\CS.  Please check your system, and...
goto helpr
:nmd2
echo - Did not succeed in making %4:\CSA.  Please check your system, and...
goto helpr
:help1
echo - Where should I put the \cs subdirectory?
goto helpr
:help2
echo - I need a digit re local use:  n = 1 only zipfiles. 2 any non_directory file.
goto helpr
:help3
echo - I need a digit re BBS use:  b = 1 only zipfiles. 2 any non_directory file.
goto helpr
:help4
echo - Where should I put the Contents_Signature Activity \CSA place?
goto helpr
:help5
echo - I need a digit N (1 2 3) re system configuration.
:helpr
echo -
echo -           Please try again.
echo -
goto usage
:end1
echo         -
echo - Please check this screen, and insert any paths needed for items 5-9.
:ng
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
