Extract()

edit

extract data out of a compressed file

Requires Extension: Compress Tags and functions for Jakarta EE (Lucee 7+)

Extract( format=string, source=string, target=string );

Returns: Boolean

Argument Description
format
string, required
edit

Format to extract

  • bzip
  • gzip
  • tar
  • tbz (tar bzip)
  • tgz (tar gzip)
  • zip
source
string, required
edit

source file or directory with zip files to extract

target
string, required
edit

name of the target directory

Note: For gzip & bzip format must use the file path as the target

Usage Notes

edit

Since Lucee 7.1, compress/extract functionality moved from core to the Compress extension. Basic zip and gzip support remains available in core using built-in JRE capabilities. Other formats (bzip, bzip2, tar, tbz, tbz2, tgz) require the Compress extension. It is included in the full jar. (LDEV-5959)

Examples

edit
extract("zip", "D:\test.zip", "D:\zipresult")

See also