@ECHO OFF
REM GRNTZIP.BAT
REM Optional packer for GRNTSTA result files.
REM Requires ZIP.EXE in PATH or current directory.

F:
CD \GRNTCMP

IF EXIST GRNTSTA.ZIP DEL GRNTSTA.ZIP
IF EXIST ZIP.LOG DEL ZIP.LOG

ECHO Creating GRNTSTA.ZIP > ZIP.LOG
ZIP -r GRNTSTA.ZIP RUN.LOG SUMMARY.TXT COMPARE.LOG UCOMP.LOG HELPER.TXT ULOG1.OUT ULOGIN.OUT ULOG2.OUT ULGSUP.OUT OUT PUBOUT SETUP UNOV UPUB USETUP >> ZIP.LOG

REM Cleanup generated test directories after ZIP.
REM Keep the CMP/result directory because it contains the ZIP and ZIP.LOG.
ECHO Cleaning generated test directories... >> ZIP.LOG
IF EXIST \GRNTEST\NUL DELTREE /Y \GRNTEST >> ZIP.LOG
IF EXIST C:\GRNTTMP\NUL DELTREE /Y C:\GRNTTMP >> ZIP.LOG
CD \
ECHO.
ECHO ZIP step finished.
ECHO Check:
ECHO   F:\GRNTCMP\GRNTSTA.ZIP
ECHO   F:\GRNTCMP\ZIP.LOG
ECHO.
