ExtractArchive
ExtractArchive[file]
expands an archive file, saving its content into the current directory.
ExtractArchive[file,dir]
saves the content of an archive file into directory dir.
ExtractArchive[file,dir,pattern]
extracts only files whose names match pattern.
Details and Options

- ExtractArchive supports a variety of file compression formats, including ZIP, GZIP, TAR, and BZIP2.
- ExtractArchive returns the names of the files and directories it created.
- The archive to be extracted can be specified using a relative or absolute file specification.
- The destination directory can be given as a relative or absolute directory path.
- If any file in the archive to be extracted already exists, ExtractArchive returns $Failed without creating any directories or files.
- Directories extracted by ExtractArchive may already exist.
- ExtractArchive[file] does not delete file.
- ExtractArchive takes an option CreateIntermediateDirectories to specify whether intermediate directories should be created. The default setting is True.
- ExtractArchive[File["file"],…] and ExtractArchive[file,File["dir"],…] are also supported.
Examples
open allclose allSee Also
Related Guides
Introduced in 2010
(8.0)