Unpack an archive
Audience:
Low-code EngineersSkill Prerequisites:
Tokens,File upload fields
Extracts the files from an archive, such as a .zip, .7z or .rar file, into a folder. The archive can come from a file upload field on a form or from a file path.
The folder structure inside the archive is kept. The archive itself isn't deleted.
This action writes the extracted files directly to disk. They aren't registered in the site's file system, so they don't appear in the Files interface and can't be found by file ID until you run Synchronize Folder on the output folder.
Typical Use Cases
- Let users upload many files at once as a single
.zip - Import a package of files, such as images or documents, from an integration
- Extract an archive downloaded with Save File
Don't use it to
- Check what an archive contains before extracting it. Use Get archive file names instead.
- Extract untrusted archives into public folders. Anything in the archive becomes available at a public URL in a standard folder.
Related Actions
| Action Name | Description |
|---|---|
| Synchronize Folder | Registers the extracted files in the site's file system. Run it after this action. |
| Get archive file names | Lists the files in an archive without extracting them. |
| Pack folder | Creates an archive from a folder. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Archive (in forms and grids) | Select a Single File Upload or Multi File Upload field. In expression mode, enter a path relative to the portal root, or an absolute path inside the portal folder. | Yes | none selected | Yes |
| Archive (elsewhere, such as workflows) | A path relative to the portal root (for example Imports/package.zip), or an absolute path inside the portal folder. | Yes | empty string | Yes |
| Output directory | The folder to extract into. Select a folder, or in expression mode enter a path relative to the portal root. | Yes | none selected | Yes |
| Copy non-archives | When checked, a file that isn't an archive is copied into Output directory as it is. When unchecked, files that aren't archives are skipped. Useful with Multi File Upload fields where users can upload a mix of archives and regular files. | No | Unchecked | No |
| Create folders in path | When checked, Output directory and any missing parent folders are created on disk if they don't exist. | No | Unchecked | No |
Working with Multi File Upload fields
- When the action runs on a button (for example Submit), every file uploaded in the selected field is processed.
- When the action runs in the field's For Each File actions, only the current file is processed.
Considerations
- Supported formats. The format is detected from the file extension. Common formats such as
zip,7z,rar,tar,gz,bz2andxzare supported. - Existing files. Files in
Output directorywith the same names as files in the archive are overwritten. - Paths must be inside the portal. The archive path and the output directory must both resolve to locations inside the current portal folder.
- Missing files. If the archive path doesn't point to an existing file, the action does nothing.
- The action doesn't produce output tokens. To get the names of the extracted files, run Get archive file names on the same archive.
Examples
To understand how to use the below examples, please see Running Examples.
1. Extract an uploaded .zip into the user's folder
Add these actions to the Submit button of a form with a Single File Upload field named Package. The first action makes sure the output folder is registered in the file system. The second action extracts the upload into it. The third action synchronizes the folder so the extracted files can be used.
[
{
"Title": "Get or Create Folder",
"ActionType": "GetOrCreateFolder",
"Description": "Make sure the output folder is registered",
"Condition": null,
"Parameters": {
"FolderPath": {
"Expression": "Members/[User:Username]/Imports",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"FolderMappingConnection": {
"Expression": "",
"Value": "",
"IsExpression": false,
"Parameters": {}
},
"OutputTokenName": "ImportFolder"
}
},
{
"Title": "Unpack an archive",
"ActionType": "Unpack",
"Description": "Extract the uploaded package",
"Condition": null,
"Parameters": {
"ArchiveFileField": {
"Expression": "",
"Value": "Package",
"IsExpression": false,
"Parameters": {}
},
"OutputDirectory": {
"Expression": "[ImportFolder]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"CopyNonArchives": false,
"CreateFolderPath": false
}
},
{
"Title": "Synchronize Folder",
"ActionType": "FileManagement.SyncFolder",
"Description": "Register the extracted files",
"Condition": null,
"Parameters": {
"FolderPath": "[ImportFolder]",
"Recursive": true
}
}
]
Revised 09/25/2026