@echo off
if exist #@!^^##@.#!# goto cn
if "%2" == "..1.12" goto us1
cls
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 - DELCSA.BAT to delete non_directory file(s) from the \CSA Contents_Signature
echo -   Acvitity place; and
echo -   to remove (empty) subdirectories in the Contents_Signature Activity place.
echo -
echo -      This program must have rights to create and delete files, and to
echo -        delete a subdirectory, in the root directory of the drive on which
echo -        the \CSA subdirectory is located;
echo -      rights to create and delete files and remove subdirectories in \CSA; and
echo -      rights to create and delete files in subdirectories below \CSA.
echo -
echo - Usage:    DELCSA d "<enter>"
echo -
echo - where  d  without a ":" is a single letter for the drive on which
echo -           to find the \CSA Contents_Signature Activity place for
echo -           deletion and removal.
echo -
if "%1" == "/*" goto z1
if "%1" == "" goto nd
echo - This is a deletion program, to delete and remove  %1:\CSA
echo -           ~~~~~~~~             ~~~~~~     ~~~~~~
echo -     To quit, press Ctrl+C, then y
pause
if not exist delcsa.bat goto nbat
if exist %1:\csa\#@!^^##@.#!# attrib -r %1:\csa\#@!^^##@.#!# > nul
if exist %1:\csa\#@!^^##@.#!# del %1:\csa\#@!^^##@.#!# > nul
echo test > %1:\csa\#@!^^##@.#!#
if not exist %1:\csa\#@!^^##@.#!# goto ncsa
del %1:\csa\#@!^^##@.#!# > nul
copy delcsa.bat %1:\ > nul
if not exist %1:\delcsa.bat goto ncop
%1:
cd\
echo skip_intro > #@!^^##@.#!#
delcsa %1
:cn
if exist #@!^^##@.#!# attrib -r #@!^^##@.#!# > nul
if exist #@!^^##@.#!#  del #@!^^##@.#!# > nul
echo x > %1:\csa\##cellar\dummy
attrib -r %1:\csa\##cellar\*.* > nul
echo y|del %1:\csa\##cellar > nul
rd %1:\csa\##cellar > nul
echo x > %1:\csa\potvirus\dummy
attrib -r %1:\csa\potvirus\*.* > nul
echo y|del %1:\csa\potvirus > nul
rd %1:\csa\potvirus > nul
echo x > %1:\csa\ziz\dummy
attrib -r %1:\csa\ziz\*.* > nul
echo y|del %1:\csa\ziz > nul
rd %1:\csa\ziz > nul
echo x > %1:\csa\qsn\dummy
attrib -r %1:\csa\qsn\*.* > nul
echo y|del %1:\csa\qsn > nul
rd %1:\csa\qsn > nul
echo x > %1:\csa\trashold\dummy
attrib -r %1:\csa\trashold\*.* > nul
echo y|del %1:\csa\trashold > nul
rd %1:\csa\trashold > nul
echo x > %1:\csa\bav\dummy
attrib -r %1:\csa\bav\*.* > nul
echo y|del %1:\csa\bav > nul
rd %1:\csa\bav > nul
echo x > %1:\csa\old\dummy
attrib -r %1:\csa\old\*.* > nul
echo y|del %1:\csa\old > nul
rd %1:\csa\old > nul
echo x > %1:\csa\accepted\dummy
attrib -r %1:\csa\accepted\*.* > nul
echo y|del %1:\csa\accepted > nul
rd %1:\csa\accepted > nul
echo x > %1:\csa\enc\dummy
attrib -r %1:\csa\enc\*.* > nul
echo y|del %1:\csa\enc > nul
rd %1:\csa\enc > nul
echo x > %1:\csa\fzt\dummy
attrib -r %1:\csa\fzt\*.* > nul
echo y|del %1:\csa\fzt > nul
rd %1:\csa\fzt > nul
echo x > %1:\csa\msg\dummy
attrib -r %1:\csa\msg\*.* > nul
echo y|del %1:\csa\msg > nul
rd %1:\csa\msg > nul
attrib -r %1:\csa\*.* > nul
echo y|del %1:\csa > nul
rd %1:\csa > nul
del delcsa.bat > nul
:nbat
echo - This program, DELCSA.BAT, must be executed in same directory with DELCSA.BAT.
goto helpr
:ncop
echo - This program, DELCSA.BAT, must be able to copy itself into the  %1:\  root
echo -   directory...
goto helpr
:nd
echo -  On which drive should I look for the
echo -     \CSA Contents_Signature Activity place?
goto helpr
:ncsa
echo -  Did not find %1:\CSA Contents_Signature Activity place.
:helpr
echo -
echo -      Please try again.
:sp
if "%1" == "/*" goto z1
echo -
:z1
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
