Site Tools


New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)


Function to zip a folder object's contents using 7-Zip. This function is the equivalent of the method .zip().

In order to use this method, you need to have 7-Zip installed. The global variable v7Location must hold a valid path to the 7-Zip executable. When no path is specified, the function shows a dialog with which the user can point to the 7-Zip executable.

Instead of using this method, you can also use the default method RoboHelp.createZipFile(). This method is available starting RoboHelp 11.

Note: This function zips the contents of the folder and not the folder itself.


var folder = new Folder("C:/myfolder");
zipFolder(folder, 'C:/myfolder/');


Parameter Data type Required Description
folder folder object Yes The folder to zip
zipname string Yes The name of the archive, including the extension
method string The zip method to use. Default is tzip
compression string/number The compression to use. Default is false
archivecommand string The archive command to use. Default is a

Return Values

Value Meaning
true The folder has been zipped. Note: This method uses the command line to zip the file. For the command line this method uses the function ExecuteBatchFile(). The return value of this function is limited to the return value of the function ExecuteBatchFile()
false The folder could not be zipped

Available Values for Parameters

This paragraph lists the values you can use for the parameters of the method .zip().


Method Meaning
tz7b 7z format
tgzip GZIP format
tzip ZIP format
tbzip 2 BZIP2 format
tiso ISO format
tudf UDF format


Compression Meaning
0 No compression
1 Very low compression
3 Fast compression
5 Normal compression
7 High compression
9 Ultra compression
false Use default compression


Command Meaning
a Add file to archive
u Update file in archive
folder/zipfolder.txt · Last modified: 2020/02/26 17:10 (external edit)