@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 - DELCS.BAT to delete non_directory file(s) from the \CS Contents_Signature
echo -              subdirectory; and
echo -           if the \CS subdirectory is then empty, to remove \CS.
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 \CS subdirectory is located;  and
echo -      rights to make and delete files in the \CS subdirectory.
echo -
echo - Usage:
echo -           DELCS d "<enter>"
echo -
echo - where  d  without a ":" is a single letter for the drive on which
echo -           to find the \CS subdirectory for deletion and removal.
echo -
if "%1" == "/*" goto z1
if "%1" == "" goto nd
echo - This is a deletion program, to delete and remove  %1:\CS
echo -           ~~~~~~~~             ~~~~~~     ~~~~~~
echo -     To quit, press Ctrl+C, then y
echo -
pause
if not exist delcs.bat goto nbat
if exist %1:\cs\#@!^^##@.#!# attrib -r %1:\cs\#@!^^##@.#!# > nul
if exist %1:\cs\#@!^^##@.#!# del %1:\cs\#@!^^##@.#!# > nul
echo test > %1:\cs\#@!^^##@.#!#
if not exist %1:\cs\#@!^^##@.#!# goto ncs
del %1:\cs\#@!^^##@.#!# > nul
copy delcs.bat %1:\ > nul
if not exist %1:\delcs.bat goto ncop
%1:
cd\
echo skip_intro > #@!^^##@.#!#
delcs %1
:cn
if exist #@!^^##@.#!# attrib -r #@!^^##@.#!# > nul
if exist #@!^^##@.#!#  del #@!^^##@.#!# > nul
attrib -r %1:\cs\*.* > nul
echo y|del %1:\cs > nul
rd %1:\cs > nul
del delcs.bat > nul
:nbat
echo - This program, DELCS.BAT, must be executed in same directory with DELCS.BAT.
goto helpr
:ncop
echo - This program, DELCS.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 \cs subdirectory?
goto helpr
:ncs
echo -  Did not find %1:\CS subdirectory.
: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
