Here is the script we use:

---------------------------------------------------------
'this script moves imail log files from spool to temp.
'it could be modified to delete the files as well with
'little modification.
'usage is cscript movemxlg.vbs
'Written by John Dobbin - [EMAIL PROTECTED]
'version 2 20030603

'set variables

dim logdate
dim outmonth
dim outdate
dim yestdate
dim logpath
dim archpath
dim logname

' get yesterdays date and format it mmdd

yestdate = Now-1
outday = day(yestdate)
outmonth = month(yestdate)

if outday < 10 then
  logdate = (outmonth & "0" & outday)
  else
  logdate = (outmonth & outday)
end if

' set up log paths and names

logpath = "G:\Imailspool\"
archpath = "F:\TempLogs"
logtxt = "*" & logdate & ".txt"
loglog = "w*" & logdate & ".log"

' move yesterdays log to archive - still needs error checking

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile logpath & logtxt , archpath
objFSO.MoveFile logpath & loglog , archpath
-------------------------------------------------------------

We then manage the temp area instead of keeping all the crap in the spool
directory.

John Dobbin
Pen Publishing Interactive - http://www.penpublishing.com
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 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