@setlocal
@set TEMPVERS=
@call zipsetup
@if "%TEMPVERS%x" == "x" goto NOSETUP
@set TEMPF=zips
@if NOT EXIST %TEMPF%\. goto NODIR
@echo Zip (partial) data...
@set TEMP1=excldata.txt
@if "%1x" == "x" goto DEFAULT
@if /i "%1x" == "Fx" goto FULL
@if /i "%1x" == "Px" goto PART
@if "%1x" == "1x" goto FULL
@if "%1x" == "2x" goto PART
@echo ERROR: Unknown input command [%1]
@set TEMP1=
@goto OPTIONS

:DEFAULT
@echo No input command! Will select FULL default...
:OPTIONS
@echo Choices are :-
@echo F - Full zip, excluding only CVS folders, or
@echo P - Partial zip, exclduing CVS AND many aircraft.
@if "%TEMP1%x" == "x" goto END

:FULL
@set TEMPZ=%TEMPF%\fgdata-full-%TEMPVERS%.zip
@echo Selecting FULL, only excluding CVS folders per %TEMP1% file...
@goto WAIT

:PART
@set TEMP1=excldata2.txt
@set TEMPZ=%TEMPF%\fgdata-part-%TEMPVERS%.zip
@echo Selecting PARTIAL, excluding CVS and many Aircraft folders per %TEMP1% file...
@goto WAIT

:WAIT
@if NOT EXIST %TEMP1% goto ERR1
@set TEMPO=-a
@if NOT EXIST %TEMPZ% goto DNCHK
@set TEMPO=-u
@echo.
@echo NOTE file %TEMPZ% already EXISTS! Will only do an UPDATE... %TEMPO%
@echo.
:DNCHK
@echo Output to %TEMPZ% file, using command...
@echo call zip8 %TEMPO% -P -r -o -x@%TEMP1% %TEMPZ% data\*.*
@echo *** CONTINUE? *** Ctrl+C to abort
@pause
@echo Proceeding to do base DATA zip...
call zip8 %TEMPO% -P -r -o -x@%TEMP1% %TEMPZ% data\*.*
@if NOT EXIST %TEMPZ% goto NOZIP
@echo All done...
@goto END

:NOZIP
@echo ERROR: Can NOT create zip file %TEMPZ%! ABorintg...
@goto END

:ERR1
@echo ERROR: Can not locate [%TEMP1%] file, with list of FOLDERS to exclude...
@goto END

:NOSETUP
@echo ERROR: TEMPVER NOT set in environment...
@echo What happened to zipsetup.bat that sets this??? Aborting
@goto END

:NODIR
@echo ERROR: No %TEMPF% output folder...
@echo The oput folder MUST exists! Create it first... Aborting
@goto END

:END
@endlocal
