BE_Zip ( fileList {; archiveFilePath } )

Compresses the file(s) found at the path file. If the archive parameter is not specified, then the zip file is put into the same folder as file and has the .zip extension appended to the filename. This will overwrite an existing file if it exists with that name already.

Version :
1.3.0 : Added.
2.0.0 : Bug Fixes
2.2.0 : added the archiveFilePath parameter
2.3.0 : modified the file parameter to allow a list of file paths, instead of a single file/folder.
3.0.0 : improved error handling, create empty directories in archives
4.1.3 : don't crash when there's nothing to archive.  return an error if more than one file with the same name is added to the archive

Parameters :
file : a system file path, or a return separated list of paths.
archive ( optional ) : the full path to the archive output file. Will overwrite any existing file.

Result : 0 on success or an OS level error code on failure.

Notes : the zip file format doesn't have a provision for adding files of the same name.  So if you run :

BE_Zip ( List ( "myfile.txt" ; "folder/myfile.txt" ) )

then it will store both files in the zip, BUT when you unzip the second file will overwrite the first one.  This is a limitation of the zip format, not a plugin limitation.

Still need help? Contact Us Contact Us