Skip to main content
Version: 1.28 (Current)

Unpack an archive

Audience: Low-code Engineers

Skill 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.

caution

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.
Action NameDescription
Synchronize FolderRegisters the extracted files in the site's file system. Run it after this action.
Get archive file namesLists the files in an archive without extracting them.
Pack folderCreates an archive from a folder.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
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.Yesnone selectedYes
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.Yesempty stringYes
Output directoryThe folder to extract into. Select a folder, or in expression mode enter a path relative to the portal root.Yesnone selectedYes
Copy non-archivesWhen 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.NoUncheckedNo
Create folders in pathWhen checked, Output directory and any missing parent folders are created on disk if they don't exist.NoUncheckedNo

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, bz2 and xz are supported.
  • Existing files. Files in Output directory with 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​

tip

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