But again, if Windows sees the file as 12:00 AM 04/17/06 rather than 11:59:59 PM 04/16/06 and you are running the script on 04/17/06 then it will not include yesterday’s log as Windows says it was modified today.
FYI, I am doing this for IIS logs, KIWI logs as well as Declude logs so I am looking for a universal solution.
John T eServices For You
"Seek, and ye shall find!"
-----Original Message-----
John,
I run the following 2 commands on my daily IIS log files.
forfiles /p c:\clients /s /d -3 /m ex*.log /c "cmd /c wzzip @fname.zip @file"
forfiles /p c:\clients /s /d -3 /m ex*.log /c "cmd /c del @file"
I keep each of my clients log files underneath their own client directory so I use forfiles to identify the log files and zips anything that is older than 3 day (so that I can review if something happened over the weekend). I then run the same command, but using delete instead of wzzip. Both of these commands are in a simple bat file that I call from windows scheduler.
Hope it helps,
Dean
On 4/17/06, John T (Lists) <[EMAIL PROTECTED]> wrote: I am trying to create a batch file that will zip up a weeks worth of
logs
|
- RE: [Declude.JunkMail] OT: Help with WinZip command line John T \(Lists\)
- Re: [Declude.JunkMail] OT: Help with WinZip command ... Darin Cox
- RE: [Declude.JunkMail] OT: Help with WinZip command ... John T \(Lists\)
- RE: [Declude.JunkMail] OT: Help with WinZip command ... John T \(Lists\)
- RE: [Declude.JunkMail] OT: Help with WinZip command ... Stu Berlin
- RE: [Declude.JunkMail] OT: Help with WinZip command ... John T \(Lists\)
- RE: [Declude.JunkMail] OT: Help with WinZip comm... Andy Schmidt
- RE: [Declude.JunkMail] OT: Help with WinZip ... John T \(Lists\)
- Re: [Declude.JunkMail] OT: Help with Win... Matt
- RE: [Declude.JunkMail] OT: Help wit... John T \(Lists\)