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

F:
CD \LGNTCMP

IF EXIST LGNTSTA.ZIP DEL LGNTSTA.ZIP
IF EXIST ZIP.LOG DEL ZIP.LOG

ECHO Creating LGNTSTA.ZIP > ZIP.LOG
ZIP -r LGNTSTA.ZIP RUN.LOG SUMMARY.TXT OUT >> ZIP.LOG

REM Cleanup generated temporary files after ZIP.
REM Keep LGNTCMP because it contains the ZIP and ZIP.LOG.
ECHO Cleaning generated temporary files... >> ZIP.LOG
DELTREE /Y C:\LGNTTMP >> ZIP.LOG
IF EXIST C:\LGNTC.BAT DEL C:\LGNTC.BAT >> ZIP.LOG

CD \
ECHO.
ECHO ZIP step finished.
ECHO Check:
ECHO   F:\LGNTCMP\LGNTSTA.ZIP
ECHO   F:\LGNTCMP\ZIP.LOG
ECHO.
