WOLFRAM

ExtractArchive[source]

expands an archive file, saving its content into the current directory.

ExtractArchive[source,dir]

saves the content of an archive file into directory dir.

ExtractArchive[source,dir,pattern]

extracts only files whose names match pattern.

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Uncompress a GZIP file, storing the result in the current directory:

Out[6]=6

Delete the resulting files:

Specify the destination directory:

Out[1]=1

Delete the resulting files:

Scope  (2)Survey of the scope of standard use cases

Create an archive from the ExampleData directory:

Out[4]=4

Extract only JPEG files from the resulting archive:

Out[5]=5

Delete the resulting files and archive:

Extract an archive from a URL:

Out[1]=1

Delete the resulting files:

Options  (4)Common values & functionality for each option

CreateIntermediateDirectories  (2)

By default, intermediate directories are automatically created:

Out[4]=4

Delete the created directory:

Prevent creation of intermediate directories to the destination path:

Out[1]=1

IgnoreCase  (1)

Create an archive from the ExampleData directory:

Out[14]=14

By default, ExtractArchive uses case sensitive patterns:

Out[15]=15

Use IgnoreCase -> True to treat lowercase and uppercase letters as equivalents:

Out[16]=16

Delete the resulting files and archive:

OverwriteTarget  (1)

Create a ZIP archive:

Out[26]=26

Extract only the JPEG files from the archive:

Out[27]=27

Delete the first two extracted files:

By default, ExtractArchive will not extract any contents if any destination files already exist:

Out[29]=29

Use OverwriteTarget->Automatic to only extract files that do not already exist:

Out[30]=30

Use OverwriteTarget->True to overwrite any existing files:

Out[31]=31

Properties & Relations  (1)Properties of the function, and connections to other functions

CreateArchive creates a zip archive on the file system:

Out[11]=11

ExtractArchive creates new files with the extracted contents, without reading the file into memory:

Out[8]=8

Import can be used to import a specific file from an archive directly into Wolfram Language:

Wolfram Research (2010), ExtractArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/ExtractArchive.html (updated 2020).
Wolfram Research (2010), ExtractArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/ExtractArchive.html (updated 2020).

Text

Wolfram Research (2010), ExtractArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/ExtractArchive.html (updated 2020).

Wolfram Research (2010), ExtractArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/ExtractArchive.html (updated 2020).

CMS

Wolfram Language. 2010. "ExtractArchive." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/ExtractArchive.html.

Wolfram Language. 2010. "ExtractArchive." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/ExtractArchive.html.

APA

Wolfram Language. (2010). ExtractArchive. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExtractArchive.html

Wolfram Language. (2010). ExtractArchive. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExtractArchive.html

BibTeX

@misc{reference.wolfram_2025_extractarchive, author="Wolfram Research", title="{ExtractArchive}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ExtractArchive.html}", note=[Accessed: 26-March-2025 ]}

@misc{reference.wolfram_2025_extractarchive, author="Wolfram Research", title="{ExtractArchive}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ExtractArchive.html}", note=[Accessed: 26-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_extractarchive, organization={Wolfram Research}, title={ExtractArchive}, year={2020}, url={https://reference.wolfram.com/language/ref/ExtractArchive.html}, note=[Accessed: 26-March-2025 ]}

@online{reference.wolfram_2025_extractarchive, organization={Wolfram Research}, title={ExtractArchive}, year={2020}, url={https://reference.wolfram.com/language/ref/ExtractArchive.html}, note=[Accessed: 26-March-2025 ]}