Rhodan
asked on
Automatically zip Blackberry Server logs
Is there a way to automatically zip the daily folder for Blackberry Logs, and then have it remove that folder after its zipped?
You will need the WinZip an the command line zip utility. To do this
Also, take at look at this freebie from MS http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
using compress.exe from the resource kit, you can create batch script and create a scheduled task.
ASKER
Yes I have 7zip, and the resource kit, but I was wanting something along the lines of a script etc. Someone must have one to share?
ASKER
How would I go about removing the older daily log folders if I had to use the compress option?
ASKER
I have thought of using forfiles and robocopy, any idea's / advice?
Answer the questions below and i will help you make a script to run.
OK what is the path to your BES server logs?
Do to want the logs to contain a date?
Where do you want the files to be saved after being zipped?
OK what is the path to your BES server logs?
Do to want the logs to contain a date?
Where do you want the files to be saved after being zipped?
ASKER
They are in the default location, c:\program files\research in motion\blackberry enterprise server\logs.
Each day there's a folder created by BES, in this format: YYYYMMDD. I want the zip file to be in that format and to be zipped to another location, such as D:\Archived BES Logs.
I then want the original folder deleted.
I would scheduled this to run every week for instance, so it would need to zip and remove the oldest last 5 days for example.
Is something like that possible?
Each day there's a folder created by BES, in this format: YYYYMMDD. I want the zip file to be in that format and to be zipped to another location, such as D:\Archived BES Logs.
I then want the original folder deleted.
I would scheduled this to run every week for instance, so it would need to zip and remove the oldest last 5 days for example.
Is something like that possible?
ASKER
Alternatively, if I could just get something that I can run once a week with a scheduled task that will:
1. Zip each daily folder using the existing folder name, ie. YYYYMMDD
2. After zipping them, delete the folder that was zipped.
I'll then use robocopy to move the zipped files to another location.
Cheers
1. Zip each daily folder using the existing folder name, ie. YYYYMMDD
2. After zipping them, delete the folder that was zipped.
I'll then use robocopy to move the zipped files to another location.
Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.