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

F:
CD \RGHTCMP

IF EXIST RGHTSTA.ZIP DEL RGHTSTA.ZIP
IF EXIST ZIP.LOG DEL ZIP.LOG

ECHO Creating RGHTSTA.ZIP > ZIP.LOG
ZIP -r RGHTSTA.ZIP RUN.LOG SUMMARY.TXT COMPARE.LOG UCOMPARE.LOG UPART2.LOG HELPER.TXT ULOG1.OUT ULOGIN.OUT ULOG2.OUT ULOGSUP.OUT OUT PUBOUT 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 \RGHTEST\*.* DELTREE /Y \RGHTEST >> ZIP.LOG
IF EXIST C:\RGHTTMP\*.* DELTREE /Y C:\RGHTTMP >> ZIP.LOG
CD \
ECHO.
ECHO ZIP step finished.
ECHO Check:
ECHO   F:\RGHTCMP\RGHTSTA.ZIP
ECHO   F:\RGHTCMP\ZIP.LOG
ECHO.
