Hi John, I just use the winzip command line tool every day to turn the 1 day old "log" file into a "zip" file by the SAME name in the SAME location. This way, you can simply move anything *.zip to a different drive, while *.log are "current" log files.
Here is the content of my Compress2DayOldLogs.cmd file: C: CD "C:\WINNT\system32\LogFiles\" FOR /R %%f in (ex*.log) do "C:\Program Files\WinZip\WZzip.exe" -m -ex -Td01 %%~dpnf.zip %%f Best Regards Andy Schmidt Phone: +1 201 934-3414 x20 (Business) Fax: +1 201 934-9206 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John T (Lists) Sent: Monday, April 17, 2006 02:13 PM To: Declude.JunkMail@declude.com Subject: RE: [Declude.JunkMail] OT: Help with WinZip command line Problem is the file names are unique by date, not by day, so to use that you would have to create a dynamic script, correct? John T eServices For You "Seek, and ye shall find!" > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:Declude.JunkMail- > [EMAIL PROTECTED] On Behalf Of Darin Cox > Sent: Monday, April 17, 2006 11:07 AM > To: Declude.JunkMail@declude.com > Subject: Re: [Declude.JunkMail] OT: Help with WinZip command line > > Hi John, > > If you use daily IIS logfiles I would go by filename instead of time stamp. > Our log archival script is scheduled for a few days (5) afterwards to > zip up > the previous month's files. You don't need to wait that long, but > since IIS > sometimes locks the file for a while, I would wait at least one day > before running the script. We wait a bit longer due to the > occassional need to do > additional reporting for the previous month. > > In your case, running the script on Monday evening or Tuesday morning > for the previous Monday through Sunday filenames should work fine. > > Darin. > > > ----- Original Message ----- > From: "John T (Lists)" <[EMAIL PROTECTED]> > To: <Declude.JunkMail@declude.com> > Sent: Monday, April 17, 2006 1:44 PM > Subject: [Declude.JunkMail] OT: Help with WinZip command line > > > I am trying to create a batch file that will zip up a weeks worth of > logs and then move that zip file. > > The problem I am having is that I want to zip the previous 7 days, but > sometimes the last log is time stamped say 04/16/06 11:59 PM and > sometimes say 04/17/06 12:00 AM. Because of that, if I run the batch > file on 04/17/06, > it may or may not include the log file for 04/16/06 depending on the > final time stamp. > > Other than stopping services just before midnight and then restarting, what > is the best way to always ensure that I am processing the correct > day's files? > > John T > eServices For You > > "Seek, and ye shall find!" > > > > --- > This E-mail came from the Declude.JunkMail mailing list. To > unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type > "unsubscribe Declude.JunkMail". The archives can be found at > http://www.mail-archive.com. > > --- > This E-mail came from the Declude.JunkMail mailing list. To > unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type > "unsubscribe Declude.JunkMail". The archives can be found at > http://www.mail-archive.com. --- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com. --- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com.