Unzip Method

Action2 Example

 

Encapsulates the AutoMate™ action in the “Zip” group, “Unzip files.” The method unzips a valid archive in .zip format into the specified directory.

 

Declaration

function UnZip (varFileToUnzip As Variant,

varUnzipPath As Variant,

intOverwriteExisting As Integer,

intPreservePath As Integer) As Integer

 

Parameters

varFileToUnzip

 The filename (including path) of the zip file to uncompress.

 

varUnzipPath

 A valid and existing path to where the contents of the zip file should be extracted to.

 

intOverwriteExisting

 If set to “1”, any existing files will be automatically overwritten by the contents of the zip file without warning. If set to “0”, existing files will be skipped and not uncompressed.

 

intPreservePath

 If set to “1”, AutoMate™ unzips the files into the directories contained in the zip file, restoring directories as necessary. If set to “0”, AutoMate™ will unzip the contents of the zip file into the same directory (as specified by varUnzipPath) without restoring any directories, effectively ignoring any directory information contained in the zip file. 

 

Description

Use the Unzip method to unzip a valid zip file (created using any of the popular zip compressors, or the AutoMate™ Zip method ) into a directory of your choice.