@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 - NEWCSL.BAT to make new cslist.ndx, cslist.srt, cslist1.ndx, cslist1.srt,
echo -            on a system with no overlapping paths, any/all drives C: - Z:,
echo -            searching for non_directory files.
echo -
echo -      This is executed from within the \cs directory.
echo -
echo - Usage:
echo -
echo -      NEWCSL n "<enter>"
echo -
echo - n = 1 include only zipfiles with extension .Z*.
echo -     2 include only zipfiles, any or no extension, self_extracting or not.
echo -     3 include all accessible non_directory files.
goto ee
:aa
cls
if "%1" == "1" goto ab
if "%1" == "2" goto ab
if "%1" == "3" goto ab
goto help1
:ab
if exist #@!#@!^^.@!@ attrib -r #@!#@!^^.@!@ > nul
if exist #@!#@!^^.@!@ del #@!#@!^^.@!@ > nul
if exist @@!#@!^^.@!@ attrib -r @@!#@!^^.@!@ > nul
if exist @@!#@!^^.@!@ del @@!#@!^^.@!@ > nul
echo sort test > #@!#@!^^.@!@
qsort #@!#@!^^.@!@ @@!#@!^^.@!@ > nul
del #@!#@!^^.@!@ > nul
if not exist @@!#@!^^.@!@ goto nsrt
cls
del @@!#@!^^.@!@ > nul
if exist cslist.ndx attrib -r cslist.ndx
if exist cslist.srt attrib -r cslist.srt
if exist cslist1.ndx attrib -r cslist1.ndx
if exist cslist1.srt attrib -r cslist1.srt
if exist cslist.ndx del cslist.ndx > nul
if exist cslist.srt del cslist.srt > nul
if exist cslist1.ndx del cslist1.ndx > nul
if exist cslist1.srt del cslist1.srt > nul
if "%1" == "2" goto bb
if "%1" == "3" goto bc
fwkdg /l | find ".Z" | fwkcs /1cfxz | qsort > cslist.srt
goto cc
:bb
fwkdg /l | fwkcs /1cfxz | qsort > cslist.srt
goto cc
:bc
fwkdg /l | fwkcs /1cfpxz | qsort > cslist.srt
:cc
fwkcs cslist.ndx cslist.srt /i
attrib +r cslist.ndx
attrib +r cslist.srt
fwkcs cslist1.ndx cslist1.srt /u
goto end1
:nsrt
echo -
echo - Where is Ben Baker's QSORT?
goto helpr
:help1
echo -
echo - I need a digit n (1 2 3) re files to include.
:helpr
echo -
echo -           Please try again.
echo -
goto usage
:end1
echo -
echo - Created new FWKCS(TM) Contents_Signature System files
echo -  cslist.ndx, cslist.srt, cslist1.ndx, and cslist1.srt,
echo -  in this default subdirectory,
if "%1" == "2" goto db
if "%1" == "3" goto dc
echo -  with only zipfiles with  .Z*  extensions included.
goto ee
:db
echo -  with only zipfiles included, any or no extension, self_extracting or not.
goto ee
:dc
echo -  with all accessible non_directory files included.
:ee
echo -
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
