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

F:
CD \RCMP

IF EXIST RMTSTA.ZIP DEL RMTSTA.ZIP
IF EXIST ZIP.LOG DEL ZIP.LOG

ECHO Creating RMTSTA.ZIP > ZIP.LOG
ZIP -r RMTSTA.ZIP RUN.LOG SUMMARY.TXT PRE POST CMP >> 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 \TRMOVE\NUL DELTREE /Y \TRMOVE >> ZIP.LOG
IF EXIST \RMTTEST\NUL DELTREE /Y \RMTTEST >> ZIP.LOG
IF EXIST \DFILE\NUL DELTREE /Y \DFILE >> ZIP.LOG
CD \
ECHO.
ECHO ZIP step finished.
ECHO Check:
ECHO   F:\RCMP\RMTSTA.ZIP
ECHO   F:\RCMP\ZIP.LOG
ECHO.
