UnzipSetCurrentItem

Sets the current item, and returns information about it.

Synopsis

error = UnzipSetCurrentItem(ZipHandle, VariableName, Index)

Args

ZipHandle is the handle returned by UnzipOpen.

VariableName is the name of some stem variable where you would like information about the item stored. If you're passing the variable name directly, remember to quote it.

The following information is returned:

Variable Contains
VariableName.0 The item's name, fully qualified, and relative to the root directory set by ()UnzipSetRootDir.
VariableName.1 The item's uncompressed size (ie, the size after it is extracted).
VariableName.2 The item's compressed size (ie, the size before it is extracted).
VariableName.3 The item's attributes.
VariableName.4 The item's last accessed date, in REXX "S" date format, followed by a space, and then the time in REXX "N" format.
VariableName.5 The item's creation date, in REXX "S" date format, followed by a space, and then the time in REXX "N" format.
VariableName.6 The item's last modified date, in REXX "S" date format, followed by a space, and then the time in REXX "N" format.

Index is the desired number of the item, where 1 is the first item in the archive, 2 is the second item, etc.

Returns

An empty string if the item is successfully set, or an error message if not. (If ZipErr is set to "NUM", then 0 is returned for success, or an error number).

Notes

To determine how many items are in a ZIP archive, call UnzipFindItem, passing only the ZipHandle and VariableName.