@setlocal
@echo Zip CVS backup, before copying FGCVS files...
@set TEMPZ=zips\%2
@if "%2x" == "x" goto HELP
@if NOT EXIST %1 goto ERR1
@if EXIST zips\. goto CHKFIL
@echo The 'zips' folder does not exist. It will be created.
@md zips
@if NOT EXIST zips\. goto ERR2
:CHKFIL
@set TEMPU=-a
@if NOT EXIST %TEMPZ% goto NEWZIP
@echo WARNING, %TEMPZ% ALREADY EXIST! It will be updated only...
@set TEMPU=-u
@goto DNZCHK
:NEWZIP
@echo Note, %TEMPZ% does not exist. A NEW files will be created...
:DNZCHK
@echo *** CONTINUE? *** Ctrl+C to abort...
@pause
@echo.
call zip8 %TEMPU% -P -o %TEMPZ% %1 @%1
@echo.
@dir %TEMPZ%
@echo All done...
@goto END

:HELP
@echo Usage:
@echo zipcvsbu list_file_in zip_file_out
@echo The 'list_file_in' is a line separated list of files to add to the zip
@echo The 'zip_file_out' is the name of hte outputs zip files, added to 'zips' folder...
@goto END

:ERR1
@echo ERROR: Can not locate input list file [%1]! Check name, location...
@goto END

:ERR2
@echo ERROR: Can not create a [zips] folder! Maybe there is already a 'xips' file?
@goto END


:END
