Here's a little VB script that I have scheduled every night at 12:05.
There's probably a more efficient way to do it, but this works for me.
Cris
======================================================
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
dim currdate,oldfile,newfile
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
oldfile = "D:\imail\spool\sys" & currdate & ".txt"
newfile = "E:\imaillogs\sys" & currdate & ".txt"
if objFSO.FileExists(oldfile) then
   objFSO.CopyFile oldfile, newfile, OverwriteExisting
   if objFSO.FileExists(newfile) then
      objFSO.DeleteFile(oldfile)
      end if
   end if
======================================================
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Joe Wolf
Sent: Wednesday, September 08, 2004 8:18 PM
To: [EMAIL PROTECTED]
Subject: [IMail Forum] Remove logs from spool directory...


Has anyone written a batch file or utility that will remove the log files
(except the current ones of course) from the spool directory?

I keep three months of logs and it makes the spool directory confusing.

Why in the world Ipswitch decided to keep the logs in the spool directory is
beyond me!

-Joe


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to