p7z_unzip_buffer

p7z_unzip_buffer extracts a file from a ZIP or 7z archive and returns the data as a string.

s = p7z_unzip_buffer(ssZipfile, ssFilename)
s = p7z_unzip_buffer(ssZipfile, ssFilename, svOptions)

Return Value

s is a string with the contents of ssFilename. The string may contain 0-characters. In case of an error the function returns an error object (see error_create).

Parameters

ssZipfile

ssZipfile is the complete file name of the ZIP or 7z file.

ssFilename

ssFilename is a file name of an element in the archive.

svOptions

svOptions are extra parameters, e. g. “-pMyPassword” to set a password. See p7z_zip.

Comment

The function uses the “7-Zip Command Line Version”. The program (7za.exe), the license and the documentation (7-zip.chm) can be found in <uniplot>\program\7zip folder.

See also: http://en.wikipedia.org/wiki/7-Zip und http://www.7-zip.org/.

Example

p7z_zip("d:\\script.zip", GetRootDirectory(), "script")
s = p7z_unzip_buffer("d:\\script.zip", "defines.ic")

History

Version

Description

R2013.10

New.

id-2008931