Maybe I am missing something but that script seems a bit over kill just to move some files.

I run this in a batch every night at 12:01AM

MOVE /Y D:\imail\spool\*.txt D:\ImailLogs
MOVE /Y D:\imail\spool\*.log D:\ImailLogs
DEL D:\Imail\spool\*.gse
DEL D:\Imail\spool\*.tmp
DEL D:\Imail\spool\*.owd
D:\IMail\ISplCln.exe -n 4 -l 21

obviously the -l parameter in ISplCln.exe is irrelavant

you will loose the first minute of log lines each night but thats a small price to pay and for us its only spam at that time of night anyway...

Rick Davidson
National Systems Manager
North American Title Group
-
----- Original Message ----- From: "Joe Wolf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 09, 2004 9:37 AM
Subject: Re: [IMail Forum] Remove logs from spool directory...



Thanks for the great script! I can modify it to move the Declude and other
logs as well. This is much better than the Ipswitch Isplcln.exe which just
deletes files (I need to move them to a better location, not delete them).


-Joe

----- Original Message ----- From: "Cris Porter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 08, 2004 10:21 PM
Subject: RE: [IMail Forum] Remove logs from spool directory...



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
======================================================


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