Help > Reference > Macros > Runtime object > NewZipFile method > ZipFile object

ZipFile object

Sub Open(Filename)
Closes the current archive and opens a new archive file, referenced by Filename.
Parameters
  • Filename: String - Path to a ZIP file.
Sub Close()
Closes the current archive.
Sub Extract(Pattern, Destination)
Extracts all or some of the files in the archive to folder, referenced by Destination.
Parameters
  • Pattern: String - Semi-colon delimited list of file-matching patterns.
  • Destination: String - Path to the base folder where the files will be extracted.
Sub ExtractEx(Include, Exclude, Destination)
Extracts all or some of the files in the archive to folder, referenced by Destination.
Parameters
  • Include: String - Semi-colon delimited list of file-matching patterns. The archived files that match this pattern, but does not match the Exclude pattern, will be extracted to Destination.
  • Exclude: String - Semi-colon delimited list of file-matching patterns. The archived files that match the Include pattern, but does not match this pattern, will be extracted to Destination.
  • Destination: String - Path to the base folder where the files will be extracted.
Sub New(Filename)
Closes the current archive and creates a new archive file.
Parameters
  • Filename: [Optional] String - Path to a file that will hold the ZIP archive. If not supplied, the ZIP archive will be created in a temporary file that will be deleted on close.
Sub AddFile(Filename, InputAs)
Closes the current archive and creates a new archive file.
Parameters
  • Filename: String - The path to a file to be included in the ZIP archive.
  • InputAs: [Optional] String - Name for the file withing the ZIP archive. If not supplied, Filename will be used.
Sub Save()
Saves the archive.
Property ExtractBinary
Saves the archive and returns the binary content of the ZIP file as array of bytes.
Type
  • Read-Only Variant (Array of bytes)

See Also

NewZipFile