09-05-2008 08:47 AM - edited 09-05-2008 09:08 AM
@ECHO OFF
REM -- Script to individually zip BES Log files ...
REM -- Place this file along with forfiles.exe and zip.exe in the root directory of your BlackBerry Logs folder
REM -- By Default: C:\Program Files\Research in Motion\BlackBerry Enterprise Server\Logs
REM -- This will zip all TXT files in the current and all sub-directories 10 days old or older
REM -- 4/23/2008 - Updated to delete old files / directories
REM -- Change "-d-90" if you want to delete files at an age different than 90 days
REM -- Uncomment the REM -- lines at the bottom if you actually want it to do deletion
forfiles.exe -p. -s -m*.txt -d-10 -c"zip -m @FILE.zip @FILE"
REM -- forfiles.exe -p. -s -d-90 -m*.txt -c"cmd /c if @ISDIR==FALSE del /q /f @FILE"
REM -- forfiles.exe -p. -s -d-90 -m*.csv -c"cmd /c if @ISDIR==FALSE del /q /f @FILE"
REM -- forfiles.exe -p. -s -d-90 -m*.zip -c"cmd /c if @ISDIR==FALSE del /q /f @FILE"
REM -- forfiles.exe -p. -s -d-90 -m*.* -c"cmd /c if @ISDIR==TRUE rd /q @FILE"
09-05-2008 10:46 AM
09-23-2008 01:51 PM
09-23-2008 01:55 PM
I am on AT&T. Please edit your Personal Profile with your DEVICE TYPE, DEVICE OS and Carrier
09-25-2008 11:11 AM
Just gave this a good workout. 12 gig of weblogs squished into 1. Did not max out CPU either.![]()
I just might use this on the BES too.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
BESAdmin's, please make a signature with your BES environment info. SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
01-09-2009 03:21 PM
Superb, many thanks for this. I had over 19GB of log files & was reluctant to delete them, this has saved me so much time.
02-15-2009 03:54 PM
01-09-2010 11:39 AM
Here's a question from an absolute novice.
Where do I input this script?
I am on AT&T. Please edit your Personal Profile with your DEVICE TYPE, DEVICE OS and Carrier
01-09-2010 12:54 PM
1
Put the 3 files in the root of your BES Logs directory ... by default it is: "C:\Program Files\Research in Motion\BlackBerry Enterprise Server\Logs"
2 schedule go.cmd as a task to run nightly; you'll keep the last 10 days of logs easily accessible and older logs on the file system, just compressed.
um thats about it.
or you can manually run the go.cmd, it is your choice.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
BESAdmin's, please make a signature with your BES environment info. SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
11-14-2012 11:44 AM