@echo off
setlocal

if not exist test\ (
REM setup input directory.
adpack -unpack -nocheck -in test.zip -force -silent
if errorlevel 1 (goto ERROR)
echo.
echo ** setup input test directory.
)

echo.
echo ^> adpack -pack -in test -out testOut.zip -force -list
echo.
echo # -in test         : input directory is "test".
echo # -out testOut.zip : output zip file is "test2.zip".
echo # -force           : overwrite output zip file.
echo # -list            : show all zipped file names.
echo.
if exist test\\META-INF\\Timestamp.tst del test\\META-INF\\Timestamp.tst
echo ---(execute adpack)------------------
echo.

adpack -pack -in test -out testOut.zip -force -list
if errorlevel 1 (goto ERROR)

echo.
echo ---(end adpack)----------------------
echo.
echo # test_pack.bat done.
@echo off
endlocal
exit /b 0

:ERROR
echo.
echo ---(error adpack)--------------------
echo.
echo # test_pack.bat error exit.
@echo off
endlocal
exit /b 1

