# Unzip file

### Description

The `Unzip file` action unzips one or more files to a specified target location.

### Options

#### General tab

| Option                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action name                           | The name of the workflow action.                                                                                                                                                                                                                                                                                                                                                                                                          |
| Source files                          |                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Get args from previous                | check this option if you want to use the list of result files (from a previous workflow action) as the list of files to unzip.                                                                                                                                                                                                                                                                                                            |
| Zip file name                         | the name of the zip file or a folder if you want to use a wildcard.                                                                                                                                                                                                                                                                                                                                                                       |
| Source wildcard                       | <p>If the previous option is a folder, you can enter a regular expression. wildcard here.</p><p>For example: to match <code>/folder/test.zip</code> a regex of <code>te..zip</code> will come up empty.</p><p>Use <code>.\*te..zip</code> instead to account for the folders ahead of it.</p><p>For Windows file paths, the direction of the slashes will be reversed in the match, so use <code>/</code> instead of <code>\\</code>.</p> |
| Unzipped files                        |                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Use zipfile name as root directory    | check this if you want to create a separate directory for each zip filename (same name as file)                                                                                                                                                                                                                                                                                                                                           |
| Target directory                      | The target directory to unzip in                                                                                                                                                                                                                                                                                                                                                                                                          |
| Create folder                         | Check this if you want to create the target folder                                                                                                                                                                                                                                                                                                                                                                                        |
| Include wildcard                      | Use this regular expression to select the files in the zip archives to extract                                                                                                                                                                                                                                                                                                                                                            |
| Exclude wildcard                      | Use this regular expression to select the files in the zip archives to extract                                                                                                                                                                                                                                                                                                                                                            |
| Include date in filename              | Include the current date in the unzipped filenames (format yyyyMMdd)                                                                                                                                                                                                                                                                                                                                                                      |
| Include time in filename              | Include the time (format HHmmss)                                                                                                                                                                                                                                                                                                                                                                                                          |
| Specify the date time format yourself | Allows you to specify the date time format yourself (default is: yyyyMMdd'\_'HHmmss)                                                                                                                                                                                                                                                                                                                                                      |
| If files exists                       | Select the action to take if the target (unzipped) file exists: skip, overwrite, etc.                                                                                                                                                                                                                                                                                                                                                     |
| After extraction                      | <p>select the action to take after zip file extraction:</p><ul><li>Do nothing,</li><li>Delete files</li><li>Move files</li></ul>                                                                                                                                                                                                                                                                                                          |
| Move files to                         | If the previous option is "Move files", you can select the target directory here.                                                                                                                                                                                                                                                                                                                                                         |

#### Advanced tab <a href="#advanced_tab" id="advanced_tab"></a>

| Option                       | Description                                                                                                                                                                                      |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Result file name             |                                                                                                                                                                                                  |
| Add extracted file to result | Add the extracted file names to the list of result files of this workflow action for use in the next workflow actions.                                                                           |
| Success condition            |                                                                                                                                                                                                  |
| Success on                   | <p>Allows you to specify the success factor of this workflow action:</p><ul><li>All works fine (default)</li><li>At least we successfully unzipped x files</li><li>Nr errors less than</li></ul> |
| Limit files                  | The number of files unzipped or number of errors, depending on the option chosen for `Success on` above.                                                                                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/unzip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
