@echo Zipping CONFIG files ... per cfglist.txt ...
@if "%TEMPVERS%." == "." goto ERR1
@if "%TEMPVCV%." == "." goto ERR2
@if NOT EXIST cfglist.txt goto ERR3
@set TEMPGCNT=0
@set TEMPGERR=no
@for /F "tokens=*" %%i in (cfglist.txt) do @(call :CHKIT %%i)
@if "%TEMPGERR%x" == "yesx" goto ERR4
@echo Found %TEMPGCNT% files, in cfglist.txt. Zipping to %TEMPVCV%cfg%TEMPVERS%.zip...
@call zip8 -a -o -P %TEMPVCV%cfg%TEMPVERS%.zip @cfglist.txt
@if NOT EXIST %TEMPVCV%cfg%TEMPVERS%.zip goto ERR5
@goto END

:CHKIT
@if "%1x" == "x" goto :EOF
@if NOT EXIST %1 goto :CHKIT2
@set /A TEMPGCNT+=1
@goto :EOF
:CHKIT2
@set TEMPGERR=yes
@echo ERROR: File %1 can NOT be located!!! Abort and fix
@goto WAIT

:ERR1
@echo ERROR: Version (TEMPVERS) NOT SET!
@goto WAIT

:ERR2
@echo ERROR: VC Version (TEMPVCV) NOT SET!
@goto WAIT

:ERR3
@echo ERROR: File cfglist.txt DOES NOT EXIST!
@goto WAIT

:ERR4
@echo ERROR: Some file in cfglist.txt DOES NOT EXIST! Abort, and fix...
@goto WAIT

:ERR5
@echo ERROR: Can NOT create %TEMPVCV%cfg%TEMPVERS%.zip zip file! Abort and fix...
@goto WAIT

:WAIT
@echo Ctrl+C to abort...
@pause
:END
