Thanks for this example. I haven't tested it but I fear that for such large logfiles (4 x 100 - 250 MB) VBScript maybe is a little bit slow compareed to unixtools. I'll let you know if it will work.
Markus > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Darin Cox > Sent: Thursday, December 09, 2004 11:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [Declude.JunkMail] Moving logfiles out of spool > > This is the VBS script I use. It's probably an chopped up > version from someone else... > > ================================== > Const OverwriteExisting = True > Const SpoolPath = "F:\IMail\spool\" > Const LogPath = "F:\IMail\spool\logarchive\" > > dim currdate, curryear, oldfile, newfile > > Set objFSO = CreateObject("Scripting.FileSystemObject") > > currdate= "" > > if month(now()-1)<10 then > currdate=currdate & "0" & month(now()-1) else > currdate=currdate & month(now()-1) > end if > if day(now()-1)<10 then > currdate=currdate & "0" & day(now()-1) else > currdate=currdate & day(now()-1) > end if > > curryear = right(year(now()-1), 2) > > MoveLog "dec", "log", "" > MoveLog "list", "txt", "" > MoveLog "log", "txt", "" > MoveLog "spam", "log", "" > MoveLog "sys", "txt", "" > MoveLog "vir", "log", "" > MoveLog "W1", "log", curryear > MoveLog "W2", "log", curryear > > > Sub MoveLog(strType, strExt, strYear) > oldfile = SpoolPath & strType & strYear & currdate & "." & strExt > > if objFSO.FileExists(oldfile) then > objFSO.MoveFile oldfile, LogPath > end if > End Sub > > ================================== > > Darin. > > > ----- Original Message ----- > From: "Markus Gufler" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, December 09, 2004 4:40 PM > Subject: [Declude.JunkMail] Moving logfiles out of spool > > > Anyone can send me his script (cmdline, unixtools, perl, ...) > that will move > logfiles out of the spool folder to another partition on a > daily or hourly > basis? > > Thanks in advance > Markus > > > > --- > [This E-mail was scanned for viruses by Declude Virus > (http://www.declude.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 was scanned for viruses by Declude Virus > (http://www.declude.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 was scanned for viruses by Declude Virus (http://www.declude.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.
