Moo_ZipCompress  -  Compress files into a Zip archive.

Moo_ZipCompress ( sPath; bTemp; bOverwrite; bFolderName; sPassword );

This function creates/adds to a Zip file.

Parameters

NameTypeRequiredDefaultDescription
sPathStringYes The input file(s) to be compressed.
bTempBoolean/StringNoFalseIf false the ZIP file is created in the same folder as the input file.
Can also specify the output file as either a full path or just a filename.
bOverwriteBooleanNoFalseOverwrite existing files within the Zip file if they already exist.
bFolderNameBooleanNoTrueInclude the folder name when folders are added.
sPasswordStringNoPassword Protect the Zip archive.

Return Value

Returns the path to the created Zip file, or an error code.

Notes

Had some big changes in MooPlug Version 0.4.7.

Errors

Error CodeDescription
Moo_ZipCompress|Err_1Invalid number of arguments.
Moo_ZipCompress|Err_2Invalid source file input.
Moo_ZipCompress|Err_3Source file doesn't exist.
Moo_ZipCompress|Err_4Output Zip file already exists.
Moo_ZipCompress|Err_5Error creating Zip file.

Related Functions