Removing Old Logs
Removing Old Logs
I've tried to seach here there and everywhere, but to no avail.
Is there a setting that purges all the ME log files after X days as its filling my harddrive!
Is there a setting that purges all the ME log files after X days as its filling my harddrive!
Regards.
Mark
Mark
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
I usually just configure a batch file that runs on a schedule.
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
net stop meimaps
del "C:\Program Files\Mail Enable\Logging\smtp\*.*,y
net start meimaps
net stop mepops
del "C:\Program Files\Mail Enable\Logging\pop\*.*,y
net start mepops
This will delete all the logs for smtp and pop
del "C:\Program Files\Mail Enable\Logging\smtp\*.*,y
net start meimaps
net stop mepops
del "C:\Program Files\Mail Enable\Logging\pop\*.*,y
net start mepops
This will delete all the logs for smtp and pop
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Hi,
You could also download a copy of "fileremover".
Then setup the batch file to run (see below)
Just google "fileremover". It is the first result.
Cheers Steve
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\HTTPMAIL
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\IMAP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\LS
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MEAVgen
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTA
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTAFilter
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POPC
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SF
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SMTP
You could also download a copy of "fileremover".
Then setup the batch file to run (see below)
Just google "fileremover". It is the first result.
Cheers Steve
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\HTTPMAIL
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\IMAP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\LS
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MEAVgen
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTA
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTAFilter
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POPC
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SF
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SMTP
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
Have you tested the fileremover in this manner Steve does it handle the fact that the services will have some of the files locked, preventing the deletion?
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Hey Ben,
Well yes and no.
No because I haven't, but yes because if you add the criteria "path to program - # of days old to delete - What to delete - Path of the file/s to delete, as in my batch file in prevuous post, and as long as the criteria for # of days old to delete is greater than 1 then it won't be locked, will it?
Hope that makes sense.
Cheers Steve
Well yes and no.
No because I haven't, but yes because if you add the criteria "path to program - # of days old to delete - What to delete - Path of the file/s to delete, as in my batch file in prevuous post, and as long as the criteria for # of days old to delete is greater than 1 then it won't be locked, will it?
Hope that makes sense.
Cheers Steve
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
Yep cool that makes sense and will work, should have realised what the 8 was - cheers.
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Hi Guys,
The link is here and it has a nifty bit about mailenable
http://www.chenry.com/fileremover/
The link is here and it has a nifty bit about mailenable
http://www.chenry.com/fileremover/
Regards.
Mark
Mark
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
Thanks Mark thats great
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Hi all
Any idea what happened to the scipt that was available at www.chenry.com?
If anyone has a copy, would they email it me at wizard AT sybaweb.com
TIA
Peter
Any idea what happened to the scipt that was available at www.chenry.com?
If anyone has a copy, would they email it me at wizard AT sybaweb.com
TIA
Peter
-
- Posts: 5858
- Joined: Fri Jan 16, 2004 6:49 am
- Location: Melbourne
Hi guys I found a new util that will auto delete your logs as it seems the link in this thread is now defunct.
Here is a new web site;
http://www.freewarefiles.com/
The name of the application is;
FileDelete24
(copy filedelete24.exe to \mailenable\bin)
And here is a batch file you can run from scheduler to delete the logs older than 7 days old. The paths will have to be edited if you have changed the MailEnable paths from default.
Here is a new web site;
http://www.freewarefiles.com/
The name of the application is;
FileDelete24
(copy filedelete24.exe to \mailenable\bin)
And here is a batch file you can run from scheduler to delete the logs older than 7 days old. The paths will have to be edited if you have changed the MailEnable paths from default.
Code: Select all
filedelete24 "C:\Program Files\Mail Enable\Logging\httpmail" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\imap" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\ls" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\mta" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\pop" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\popc" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\radms" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\sf" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\smtp" *.log 7
Regards,
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Product Services
MailEnable Pty Ltd
To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.
Re: Removing Old Logs
The filedelete24 method did not work for me. Here is another solution using the windows tool "forfiles" http://technet.microsoft.com/en-us/libr ... S.10).aspx.
In a batch file you can remove all log files not within the last 7 days by using:
forfiles /s /p "C:\Program Files (x86)\Mail Enable\Logging" /m *.log /d -7 /c "cmd /c del @PATH"
This will recursively track down all .log files that are older than 7 days and delete them.
You can delete the different logging folders separately using:
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\httpmail" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\imap" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\ls" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\mta" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\pop" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\popc" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\radms" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\sf" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\smtp" /m *.log /d -7 /c "cmd /c del @PATH"
Read the Microsoft link to review the functionality of forfiles.
In a batch file you can remove all log files not within the last 7 days by using:
forfiles /s /p "C:\Program Files (x86)\Mail Enable\Logging" /m *.log /d -7 /c "cmd /c del @PATH"
This will recursively track down all .log files that are older than 7 days and delete them.
You can delete the different logging folders separately using:
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\httpmail" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\imap" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\ls" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\mta" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\pop" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\popc" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\radms" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\sf" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\smtp" /m *.log /d -7 /c "cmd /c del @PATH"
Read the Microsoft link to review the functionality of forfiles.