9.229 ZIP_ADD

Note: Built-In Function Rules     Usage Options

Allows files to be added to a .zip file. If the .zip file does not exist, it is created.

Also See

ZIP Built-In Function Note

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Zip file/path name

If no path is specified, the file is created in the temporary directory.

If file name does not have an extension, .zip will be appended.

1

256

 

 

2

A

Req

Directory to use as base for zipping.

1

256

 

 

3

L

Opt

Working list containing file names or specifications to include. This argument also applies to files in subdirectories, but not to the subdirectory names.

The default is to include all.

This argument is equivalent to zip –I

256

256

 

 

4

A

Opt

Include subdirectories.

The default is Y.

This argument is equivalent to zip -r

1

1

 

 

5

A

Opt

Delete zipped files if zip successful.

The default is N.

This argument is equivalent to zip -m

Note: it is not an error if files cannot be deleted.

1

1

 

 

6

A

Opt

Compression level. 0 - 9.

0 = no compression (fastest)

9 =  smallest (slowest)

The default is 9.

This argument is the equivalent of zip -#, where # is the number.

Note: zip's default level is 6.

1

1

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return Code

OK = Zip file created successfully

ER = An error was encountered

NR = No matching files found

2

2

 

 

 

Technical Notes

Note: If files to be added to the .zip file are already in the zip file, they will be replaced.