Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AT Scheduling... pkzip issue

Status
Not open for further replies.

gcw1

Programmer
Jan 12, 2002
204
CA
Hello everyone,

I have a simple batch file that copies files from one folder to a temp folder and then zips the files in the temp folder for archiving. When I manually run the batch file everything runs perfectly. When I schedule the process using the AT command the copying is done, but the zipping doesn't take place. I've posted the script I'm using below. The reason why I'm copying the files to a temp folder before zipping is because some of the files are still in use in the original folder and zipping will fail, but i can copy then zip. I would just delete what I can on a daily basis, but we need to hold on to the files for about 4 months.

I heard that there are issues with the AT command on win2k, is there truth in that?

Any help given will be greatly appreciated. As these files constantly build up and I'm tired of getting phone calls when I'm not at work.

Thanks

Glenn

-----------------------------------------------------------
@ECHO off

IF (GOTO:)==(%1) %1%2 {Subroutine-Handler}

CALL %0 GOTO: _DTM

copy c:\ccanywhere\log\*.* c:\temp\*.*

pkzip n:\blogs\%DT% c:\temp\*.*

SET DT=

GOTO EOF {=Subroutine-section-below=}
:_DTM (Usage: CALL %0 GOTO: _DTM)
ECHO.e100 e8 0 0 80 c3 2 88 dc cd 1a 89 97 1e 1 89 8f 22 1 c3>%TEMP%.\_DT.BAT
FOR %%C IN (g d121L7 q) DO ECHO.%%C>>%TEMP%.\_DT.BAT
TYPE %TEMP%.\_DT.BAT|debug|find ":">%TEMP%.\_DT.BAT
FOR %%C IN (e100'%%1'20'%%2'20'%%3'20 w q) DO ECHO.%%C>>%TEMP%.\_DT.BAT
TYPE %TEMP%.\_DT.BAT|debug %TEMP%.\_DT.BAT>NUL
CALL %TEMP%.\_DT.BAT %0 GOTO: 1_DTM
DEL %TEMP%.\_DT.BAT
GOTO EOF
:1_DTM
SET DT=%9%8%5%4.zip

:EOF {End-of-file}

erase c:\temp\*.*
erase c:\ccanywhere\log\*.log
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top