Get archive file names
Audience:
Low-code EngineersSkill Prerequisites:
Tokens,File upload fields
Reads the list of files inside an archive, such as a .zip or .7z file, without extracting it. The names are saved in a token as a comma-separated list.
Typical Use Cases
- Check that an uploaded
.zipcontains the files you expect before extracting it - Reject archives that contain file types you don't allow, such as
.exefiles - Show users what's inside an archive, or record its contents in a database
Don't use it to
- Read the contents of the files. Extract them with Unpack an archive first.
Related Actions
| Action Name | Description |
|---|---|
| Unpack an archive | Extracts the files from an archive. |
| 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 Parameters Reference
| Parameter | Description |
|---|---|
| Output token file names | Required. The name of the token that receives the comma-separated list of names, for example ArchiveContents. |
For an archive that contains readme.txt and a docs folder with manual.pdf, the token would contain something like:
readme.txt,docs\manual.pdf
Files in subfolders include their folder path inside the archive. Folder entries may also appear in the list.
Considerations
- Multi File Upload fields. When the action runs on a button, the names from all uploaded archives are combined into one list. When it runs in the field's For Each File actions, only the current file is read.
- File names that contain commas can't be told apart from separate entries in the list.
- The action fails if the archive doesn't exist or if
Output token file namesis empty. - The archive must be inside the current portal folder.
Examples
To understand how to use the below examples, please see Running Examples.
1. Read the contents of an uploaded archive
Add this action to the Submit button of a form with a Single File Upload field named Package. It saves the list of files in the ArchiveContents token, which later actions can check or store.
{
"Title": "Get archive file names",
"ActionType": "GetArchiveFileNames",
"Description": "List the files in the uploaded package",
"Condition": null,
"Parameters": {
"ArchiveFileField": {
"Expression": "",
"Value": "Package",
"IsExpression": false,
"Parameters": {}
},
"OutputTokenFileNames": "ArchiveContents"
}
}
2. Read an archive that's already on the server
This action reads Imports/package.zip from a workflow or API.
{
"Title": "Get archive file names",
"ActionType": "GetArchiveFileNames",
"Description": "List the files in a stored package",
"Condition": null,
"Parameters": {
"ArchiveFileField": "Imports/package.zip",
"OutputTokenFileNames": "ArchiveContents"
}
}
Revised 09/25/2026