@echo off
:: BuildUG.bat - Zip all the necessary files for ftp
:: and stash them in g:\omnisys\UG\Out
:: Usage: BuildUG nn
:: where: nn is the current two-digit release number

if "%1" == "" goto NOARG
g:
cd g:\omnisys\UG\Out
copy /Y..\source\history.txt .
dir history.txt
if not exist history.txt goto NOHIST

:: Build UGpdf??.zip
"g:\program files\winzip\wzzip" UGpdf%1.zip UserGd.pdf history.txt >> BldUG%1.log

echo WARNING: Freshen files DOES NOT WORK.  Do it by hand.
:: Build UGfrm??.zip by copying an existing .zip and freshening files
copy UGfrm00.zip ugfrm%1.zip
"c:\program files\winzip\wzzip" -fpr UGfrm%1.zip >> BldUG%1.log

@echo on
dir UG*%1.zip >> BldUG%1.log
dir UG*%1.zip > ug%1size.txt

goto END

:NOARG
echo Sorry, no release number provided. 
echo Usage: BuildFMPDF nn
echo where nn is the two-digit release number
goto END

:NOHIST
echo history.txt is missing from g:\omnisys\UG\Out

:END

