@setlocal
@set TMPDST=D:\mperl
@if NOT EXIST %TMPDST%\nul goto NODST
@set TMPFIL=%TEMP%\tempdt5.txt
@set TMPFORM=%%Y%%m%%d

@if NOT EXIST %TMPFIL% goto DNDEL
@del %TMPFIL% >nul
:DNDEL

@dt5 ""+%TMPFORM%"" > %TMPFIL%
@if ERRORLEVEL 1 goto FAILED
@if NOT EXIST %TMPFIL% goto NOFIL

@set /p TMPDT=<%TMPFIL%

@echo TMPDT=%TMPDT%
@set TMPZIP=%TMPDST%\perl-%TMPDT%.zip
@echo Output ZIP is %TMPZIP%
@set TMPA=-a
@if NOT EXIST %TMPZIP% goto DOASK
@echo NOTE: Zip file already exists! *** THIS IS AN UPDATE ***
@set TMPA=-u
:DOASK
@echo *** CONTINUE? *** Only Ctrl+C aborts...
@pause

@call clobnow

@call zip8 %TMPA% -o %TMPZIP% *.pl *.txt *.bat



@goto END

:NOFIL
@echo dt5 failed to wirte to the file...
:FAILED
@echo Failed to run dt5! Is this app in your path?
@goto END

:NODST
@echo Error: Can NOT locate destination %TMPDST%! *** FIX ME ***
:END

