ActiveZIP - Manipulate ZIP and GZ Files by Script (Javascript, VBScript)
How far is it from Script to Win32?
Introduction
ActiveZIP is ActiveX object. It has the following features:
- Support ZIP and GZIP compressing and uncompressing.
- Can be used in JavaScript and VBScript programs.
- Self-Contained: the Tools Interface provides necessary file and folder dialog boxes ---
you can manipulate zip files without assistance of other ActiveX objects.
Usage Example
var at=new ActiveXObject("ActiveZIP.Tools");
var dir=at.SHBrowseForFolder(); // Prompt user to select a folder
if(dir.length>0) // If the length of the folder is less than 1, it means the user has canceled the operation
{
// Prompt the user for the zip file name
var zipFile=at.GetSaveFileName("zip", "", "ZIP Files|*.zip||");
if(zipFile.length>0) // If the length of the file name is less than 1, it means the user has canceled the operation
{
var az=new ActiveXObject("ActiveZIP.ZIP");
az.Create(zipFile); // Create the zip file
az.AddFolder(dir, false, "*.pdf"); // Add the selected folder to the zip
az.Close(); //// Close the zip file
}
}
Interface Details
See Also
- ActivePrinter : Print text, graph, raw data
- ActiveZIP : Use JavaScript or VBScript to make zip archives
- ActiveScreen : Use JavaScript or VBScript to capture screens.
- ActiveGIF : Use JavaScript or VBScript to make GIF images.
- ActiveMISC : You can call Interfaces implemented in different script files.
- SDraw : Visual platform for making images using JavaScript or VBScript.
- Sprint : The executable version of PagePrinter.
Services