Script to use Winzip to Package Daily Log Files

Posted on 2009-07-15
Last Modified: 2012-08-13
I'm current running a VB script to archive and clear the Event Log on each of my servers.  I must use Winzip because of licensing.   I would like to use VB so i can tack it on to the end of my current archive script, rather than running a second .bat of .cmd file.  

Event logs are saved to a specific folder as:

What could i add to the end of the script to Package these file into a single Zip file as
Question by:Mark Walden
  • 4
  • 3
LVL 10

Expert Comment

ID: 24861533
dowload the WinZip Command Line Support Add-On from the winzip website.
Then you can make a zip file using the command line using a shell in VB

Author Comment

by:Mark Walden
ID: 24861827
It requires version 12.  We use version 9.
LVL 20

Expert Comment

ID: 24862716
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

LVL 10

Expert Comment

ID: 24862817

command line for winzip version 9.

Author Comment

by:Mark Walden
ID: 24863629
OK 3_S, now what.  I can zip the files and give it a name (  However, this will be a daily task so i need the file name to be  Any ideas?
LVL 10

Accepted Solution

3_S earned 350 total points
ID: 24864454
You could take the zipfile name from your .evt -file. use a replace to make the .evt to .zip
dim fileName
fileName = "ServerName_Sys_Date.evt"
fileName = Replace(fileName ,"_Sys","")
fileName = Replace(fileName ,".evt",".zip")
Dim wshShell
Dim WinZipCommand
WinZipCommand = "Your winzip command" 'Add you winzip command and use variable fileName to define the output winzipfilename
Set wshShell = CreateObject("WScript.Shell")

Open in new window


Author Comment

by:Mark Walden
ID: 24868658
I'll test it this afternoon and let you know.

Author Comment

by:Mark Walden
ID: 25113518
I have still not made this work yet.   I have been placed on a new project so i have move this to the bottom of the list for now.  

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 143
groupSumClump challenge 9 115
Problem to With line 4 57
Android development question 2 37
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question