Link to home
Start Free TrialLog in
Avatar of Rhodan
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?

Avatar of Irwin W.
Irwin W.
Flag of Canada image

You will need the WinZip an the command line zip utility. To do this
using compress.exe from the resource kit, you can create batch script and create a scheduled task.
Avatar of Rhodan
Rhodan

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?
Avatar of Rhodan

ASKER

How would I go about removing the older daily log folders if I had to use the compress option?
Avatar of Rhodan

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?
Avatar of Rhodan

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?
Avatar of Rhodan

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
ASKER CERTIFIED SOLUTION
Avatar of Rhodan
Rhodan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial