# Archive File

### Overview

The **Archive File Component** allows users to archive a file stored on the system using its unique file ID. This ensures efficient storage management and facilitates long-term data retention.

### Usage

This component is used to create an archive of a specific file, making it useful for workflows that require file compression or long-term storage solutions.

#### Properties

| Property | Type     | Description                                       |
| -------- | -------- | ------------------------------------------------- |
| `fileId` | `string` | The unique identifier of the file to be archived. |

#### Input Ports

| Port | Description                         |
| ---- | ----------------------------------- |
| `in` | Accepts the file ID to be archived. |

#### Output Ports

| Port  | Description                                            |
| ----- | ------------------------------------------------------ |
| `out` | Emits the archived file's ID upon successful archival. |

#### Processing Logic

1. **Receives Input Data**:
   * Accepts a file ID (`fileId`) from the input.
2. **Archives the File**:
   * Calls the system’s file archiving function.
3. **Handles Success & Errors**:
   * If successful, sends the archived file’s `fileId` to the `out` port.
   * If an error occurs, the process fails silently or throws an appropriate error.

#### Output Data Schema

| Property | Type     | Description                                 |
| -------- | -------- | ------------------------------------------- |
| `fileId` | `string` | The unique identifier of the archived file. |

### Notes

* **Ensures File Retention**: Helps store files in an archived state for long-term preservation.
* **Works with File Storage Systems**: Compatible with various file storage mechanisms.
* **Ideal for Data Management Workflows**: Supports automated file compression and archival processes.

This component is essential for workflows that require archiving files for future retrieval or compliance purposes.


---

# 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/files/archive-file.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.
