zip

Description

Compress files into a single zip file.

Parameters

Table 8. Parameters

Attribute Type Description Required
destfile string The name of the zip file to create. true
level int The compression level between 0 (no compression) and 9. Default is 5. false
verbose boolean If true, will display the name of all files that are part of the zip file. Default is false. false
if bool If true, the task will be executed, otherwise it will be skipped. The default is true. false
unless bool The opposite of if. If false, the task will be executed, otherwise it will be skipped. The default is false. false

Nested Elements

fileset

The files to be included in the zip file.

Examples

Example 10.  Compress all source files in the project directory to "source.zip"

<zip destfile="source.zip"> <fileset dir="src"> <include name="**/*.bmx" /> </fileset> </zip>