Archive.Extract
---------------

Extracts files in an archive.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Archive](component_Archive.md) | [9.0](newinversion90.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Archive.Extract"; Archive; FileList; DestinationFolder { ; Passphrase; Options } ) 

**MBS**( **"Archive.Extract";** /\* Extracts files in an archive. \*/  
**$Archive**; /\* Either container with archive or native file path.e.g. "C:\\test\\test.zip" \*/   
**$FileList**; /\* Optional list of files to extract.  
Pass empty text when you need all files.e.g. "" \*/   
**$DestinationFolder**; /\* The native path to the destination folder.e.g. "/Users/cs/Desktop" \*/   
**$Passphrase**; /\* Optional; Password to use. \*/   
**$Options**) /\* Optional; The options to pass to reader.  
This is a comma-separated list of options. Option names can be prefixed with module name. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Archive | Either container with archive or native file path. | "C:\\test\\test.zip" |  |
| FileList | Optional list of files to extract.   Pass empty text when you need all files. | "" |  |
| DestinationFolder | The native path to the destination folder. | "/Users/cs/Desktop" |  |
| Passphrase | Password to use. |  | Optional |
| Options | The options to pass to reader.   This is a comma-separated list of options. Option names can be prefixed with module name. |  | Optional      Added in version **14.3**. |

### Result

Returns OK or error.

### Description

Extracts files in an archive.  
Restores file permissions, times, Mac metadata and file flags.  
  
Use [Archive.ExtractFile](ArchiveExtractFile.md) if you only need one file as container.  
You may need to use [Plugin.LoadIconvLibrary](PluginLoadIconvLibrary.md) to load iconv library for text conversion.  
### Examples

Expand an archive:

 MBS ( "Archive.Extract";   
"/Users/cs/Desktop/invoices-2019-02-12\_1924.zip"; /\* path to archive (or container) \*/  
"" /\* all files \*/;   
"/Users/cs/Desktop/"; /\* dest \*/   
"98234kjh245234" /\* password \*/)  
### See also

- [Archive.CompressText](ArchiveCompressText.md)
- [Archive.ExtractFile](ArchiveExtractFile.md)
- [Archive.FileList](ArchiveFileList.md)
- [Archive.Verify](ArchiveVerify.md)
- [Plugin.LoadIconvLibrary](PluginLoadIconvLibrary.md)
- [RegEx.Extract](RegExExtract.md)
- [UnZipFile.OpenContainer](UnZipFileOpenContainer.md)
- [UnZipFile.OpenFile](UnZipFileOpenFile.md)

### Release notes

- **Version 14.3**
    - Added Options parameter for [Archive.Content](https://www.mbsplugins.eu/ArchiveContent.shtml), [Archive.Extract](https://www.mbsplugins.eu/ArchiveExtract.shtml), [Archive.ExtractFile](https://www.mbsplugins.eu/ArchiveExtractFile.shtml), [Archive.FileList](https://www.mbsplugins.eu/ArchiveFileList.shtml) and [Archive.GZipDecompress](https://www.mbsplugins.eu/ArchiveGZipDecompress.shtml) functions.
- **Version 10.4**
    - Added [Archive.ExtractFile](https://www.mbsplugins.eu/ArchiveExtractFile.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 14.3pr7](https://www.mbsplugins.de/archive/2024-07-05/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 10.5](https://www.mbsplugins.de/archive/2020-11-23/New_in_MBS_FileMaker_Plugin_10/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2023, Seite 39](https://filemaker-magazin.de/neuigkeit/4233-Appetithappen-FMM_202304)
- [Ausgabe 6/2020, Seite 25](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function checks for a license.

Created 11st December 2018 , last changed 4th July 2024

  
[Archive.Create](ArchiveCreate.md) - [Archive.ExtractFile](ArchiveExtractFile.md)

[HTML Version](ArchiveExtract.shtml)