5.37.4 OPEN
The OPEN command opens an existing zip file and makes it the current archive. The current archive is the archive upon which subsequent ADD and GET commands operate.
Syntax:
Command
|
Keyword
|
Value
|
Developer notes
|
OPEN
|
FILE
|
value
|
Required. File path.
|
MODE
|
*WRITE
|
Opens the zipped file for writing to add new files or replace its contents. If the file does not exist, a new archive is created.
|
*READ
|
Open an existing archive to interrogate its contents or to expand files contained in it. This is the default value.
|
REPLACE
|
*NO
|
This keyword is used in combination with MODE(*WRITE) to indicate that the contents of the existing file can be replaced. This keyword is used in combination with MODE(*WRITE) to indicate that the contents of the existing file can be replaced. This value indicates that the contents of the archive are not to be cleared when the file is opened. New files can be added to the archive. This is the default value.
|
*YES
|
This value indicates that the existing contents of the archive are cleared when the file is opened. New files can be added to the empty archive.
|
ENCODING
|
value
|
Entry encoding. Default is UTF-8.
|
|
Example
OPEN FILE(/folder/file.zip) MODE(*READ)
OPEN FILE(/folder/file.zip) MODE(*WRITE) REPLACE(*NO)