# Archive

### Overview

The **Archive** component allows you to create a ZIP or TAR archive from a set of files. You can also append files to an existing archive, provided it matches the specified format.

### Input Parameters

| Parameter       | Type     | Required | Description                                                                                  |
| --------------- | -------- | -------- | -------------------------------------------------------------------------------------------- |
| `outputFormat`  | `string` | ✅        | The format of the archive file. Options: `zip`, `tar`.                                       |
| `fileName`      | `string` | ✅        | The name of the output archive file, including the extension.                                |
| `files`         | `object` | ❌        | List of files to be added to the archive. Each file is represented by its `fileId`.          |
| `archiveFileID` | `string` | ❌        | The ID of an existing archive file. If provided, new files will be appended to this archive. |

### Output Parameters

| Parameter  | Type     | Description                                                 |
| ---------- | -------- | ----------------------------------------------------------- |
| `fileId`   | `string` | The unique ID of the newly created or updated archive file. |
| `fileName` | `string` | The name of the archive file.                               |

### Instructions

1. **Select Output Format:**
   * Choose between `zip` or `tar` as the output format.
2. **Provide File Name:**
   * Specify a name for the archive file, ensuring it includes the appropriate extension (`.zip` or `.tar`).
3. **Add Files to Archive:**
   * Upload or select files using their `fileId`.
   * If an `archiveFileID` is provided, new files will be appended to the existing archive.
4. **Processing:**
   * The component processes and creates the archive, returning the generated file’s `fileId` and `fileName`.

### Use Cases

* **Batch File Compression**: Combine multiple files into a single ZIP or TAR archive.
* **Incremental Archiving**: Append files to an existing archive for ongoing data collection.
* **Data Backup & Export**: Store or transfer multiple files efficiently as a single archive.

***


---

# 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.appmixer.com/connector-configuration/utils/converters/archive.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.
