# ExtractArchive

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.ZIP/tree/main/Frends.Zip.ExtractArchive>

{% tabs %}
{% tab title="Parameter: UnzipInputProperties" %}

| Name                            | Description                                                                                                         |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| SourceFile : `String`           | <p>Full path to the source file.</p><p><br>Default: <code>-</code><br>Example: <code>c:\example\file.zip</code></p> |
| 🗝Password : `String`           | <p>Password for the ZIP file.</p><p><br>Default: <code>-</code><br>Example: <code>foobar123</code></p>              |
| DestinationDirectory : `String` | <p>Destination directory.</p><p><br>Default: <code>-</code><br>Example: <code>C:\example</code></p>                 |
| {% endtab %}                    |                                                                                                                     |

{% tab title="Parameter: UnzipOptions" %}

| Name                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DestinationFileExistsAction : `UnzipFileExistAction` | <p>Action to be taken when destination file/files exist.</p><p>Possible values:</p><ul><li><code>Error</code>:</li></ul><p>Action to be taken when destination file/files exist.</p><ul><li><code>Overwrite</code>:</li></ul><p>Action to be taken when destination file/files exist.</p><ul><li><code>Rename</code>:</li></ul><p>Action to be taken when destination file/files exist.</p><p><br>Default: <code>0</code><br>Example: <code>Error</code></p> |
| CreateDestinationDirectory : `Boolean`               | <p>Create destination directory if it does not exist.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                               |
| DeleteZipFileAfterExtract : `Boolean`                | <p>If set to true, the source ZIP file will be deleted after successful extraction.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                  |
| {% endtab %}                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

{% tab title="Result: UnzipOutput" %}

| Name                            | Description                                                                                                                        |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ExtractedFiles : `List<String>` | <p>a List-object of extracted files.<br>Example: <code>"ExtractedFiles": \["C:\temp\sample.txt", "C:\temp\sample2.txt"]</code></p> |
| {% endtab %}                    |                                                                                                                                    |

{% tab title="Changelog" %}

## Changelog

### \[1.3.0] - 2025-12-29

#### Fixed

* Fix repository url in metadata

### \[1.2.0] - 2024-12-13

#### Changed

* Drop DotNetZip in favour of ProDotNetZip because of security reasons
* DotNetZip has a HIGH severity directory traversal vulnerability (CVE reported Nov 2024) affecting versions 1.10.1 through 1.16.0 with no patch available (package is deprecated)
* The migration to ProDotNetZip 1.20.0 addresses this security concern

### \[1.1.0] - 2024-10-22

#### Fixed

* Fixed issue with rename option writing the extracted files to wrong directory.

#### Added

* DeleteZipFileAfterExtract option to enable the deletion of the source file.

### \[1.0.3] - 2022-02-23

#### Changed

* Added documentation link to task description

### \[1.0.2] - 2022-02-23

#### Changed

* Added package description

### \[1.0.1] - 2022-02-23

* Maintenance

### \[1.0.0] - 2022-02-23

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
