Zip()
will zip a given file/directory
Usage
BOOLEAN = Zip(
zipfile,
source,
recurse,
prefix,
compressionlevel,
filter,
overwrite,
newpath,
charset,
zipparams
)
Argument | Summary |
---|---|
zipfile | The path or file name of the zip file on which the action will be performed. |
source | The path or file name of the zip file on which the action will be performed. [optional] |
recurse | recurse indicates whether or not the subdirectories of the directory specified in the source attribute should be included in the zip file. [optional] |
prefix | Used with a create action to prepend a prefix to the path of all files in the created zip file.If the source attribute is a file as opposed to a directory [optional] |
compressionlevel | The compression level to apply when creating a zip file. The range is 0 (no compression) to 9 (maximum compression). DEFAULT:8 [optional] |
filter | A filter to apply against the files in the source directory. For example, *.txt would include only files with a .txt extension. [optional] |
overwrite | Specifies whether to overwrite the contents of a ZIP or JAR file.true: Overwrites all of the content in the ZIP or JAR file if it exists.false: Updates existing entries and adds new entries to the ZIP or JAR file if it exists.DEFAULT:FALSE. [optional] |
newpath | If the source attribute is a file as opposed to a directory, the newpath attribute can be used to specify a new path for the file being included in the created zip file. If the source attribute is a directory the newpath attribute is ignored. [optional] |
charset | Used to specify a character set to be used for file operations. [optional] |
zipparams | Array of structures {src, recurse, filter, newpath, prefix} representing the attributes of ZIPPARAM [optional] |
Calling
Supports named-parameter calling allowing you to use the function like:
Zip( zipfile=?, source=?, recurse=?, prefix=?, compressionlevel=?, filter=?, overwrite=?, newpath=?, charset=?, zipparams=? );
Supports passing parameters as a structure using ArgumentCollection:
Zip( ArgumentCollection={ zipfile : ?, source : ?, recurse : ?, prefix : ?, compressionlevel : ?, filter : ?, overwrite : ?, newpath : ?, charset : ?, zipparams : ? } );
See Also
DirectoryCreate
DirectoryDelete
DirectoryExists
DirectoryList
Expandpath
FileClose
FileCopy
FileDelete
FileExists
FileIseof
FileMove
FileOpen
FileRead
FileReadbinary
FileReadline
FileSeparator
FileSetaccessmode
FileSetattribute
FileSetlastmodified
FileUpload
FileUploadall
FileWrite
FileWriteline
GetDirectoryfrompath
GetFilefrompath
GetFileinfo
GetTempdirectory
GetTempfile
Unzip
Zip
Ziplist