Automatically Unzip Files
Auto Unzip automatically decompresses .zip files added to a folder and writes the extracted contents to a destination subfolder. This removes the need to manually extract archives before downstream processes act on their contents. Like other Folder Settings, Auto Unzip can be configured as recursive or non-recursive.
Triggers
Auto Unzip runs when a .zip file is uploaded to or copied into the configured folder. Files already in the folder when Auto Unzip is enabled are not processed; only files that arrive afterward trigger the rule. Auto Unzip works only on zip files, and it unzips new files matching the .zip extension, regardless of case (.zip, .ZIP, and .Zip all trigger it).
Limitations
Auto Unzip cannot unzip password-protected .zip files.
Auto Unzip has the same file limit that applies to manual Unzip, so it doesn't unzip a .zip file containing more than 10,000 files.
Like manual Unzip, Auto Unzip skips a folder with an invalid name and continues extracting the rest of the archive.
Destination Path
Auto Unzip keeps extracted files in the area governed by the folder's rule, ready for subsequent processing. It requires a Destination Path strictly below the folder where Auto Unzip is configured, in the same workspace. The destination cannot be the configured folder itself, a parent folder, or a sibling folder.
The destination folder cannot be within or contain a permission fence or a Partner Channel. These boundaries separate access or routing rules, so extraction must not write archive contents across them. An Automation can handle onward delivery after the files have been extracted.
If a valid destination folder does not exist, Files.com creates it when unzipping files.
In the web interface, Destination Path shows the portion below the configured folder. The form prepends the configured folder's path when saving. The default value shown in the form is:
unzipped/%Y/%m/%d/%H%M%S/%Fb
This includes the date, time, and the zip file's base name, which avoids collisions when a file with the same name is uploaded repeatedly.
In the Behaviors API, value.destination_path is the full destination path from the site root, or from the selected workspace root when using a workspace. It includes the configured folder's path. For example, for an Auto Unzip rule at foo/bar, entering unzipped/%Y/%m/%d in the web form corresponds to foo/bar/unzipped/%Y/%m/%d in the API. A destination such as Uploads/Unzipped/%Y/%m/%d is invalid for that rule because it is outside foo/bar.
When a rule is created or saved, Files.com normalizes the destination path before storing it and returning it in the API response, so the saved configuration shows the path that extraction will use. Normalization removes leading and trailing slashes, collapses repeated slashes, and discards . and .. path segments. These segments do not navigate to a parent folder: foo/bar/../unzipped becomes foo/bar/unzipped. Path tokens remain in the saved value and are expanded when the zip file is processed. The destination must remain below the configured folder after normalization and token expansion.
Building a Destination Path
The destination path supports the tokens below. In the Web UI, you can select placeholder tokens from a clickable list instead of typing them.
| Token Name | Description |
|---|---|
%Ff | The name of the source file, with extension. |
%Fb | The name of the source file, without extension. |
%Fe | The extension of the source file. |
%Fl | The name of the source file, with extension, converted to lowercase. |
%Fn | The name of the source file, without non-alphanumeric characters, with extension. |
%Fp | The name of the source file, with extension, spaces removed, lowercase, non-ASCII normalized. |
%p1, %p2, ... | Folder name in the source path, counted upward from the matched file. %p1 is the matched file's parent folder. |
%P1, %P2, ... | Folder name in the source path, counted downward from the root. %P1 is the top-level folder. |
%a, %A | Abbreviated or full weekday name. |
%y, %Y | Two-digit or four-digit year. |
%b, %B | Abbreviated or full month name. |
%m | Month number (01-12). |
%d, %e | Day of the month, zero-padded (01-31) or not (1-31). |
%H | Hour, 24-hour clock, zero-padded (00-23). |
%I, %l | Hour, 12-hour clock, zero-padded (01-12) or not (1-12). |
%M | Minute (00-59). |
%S | Second (00-59). |
%p | AM or PM indicator. |
%j | Day of the year (001-366). |
%C | Century number (year divided by 100). |
%r | 12-hour clock time (hh:mm:ss AM/PM). |
%R | 24-hour time (hh:mm). |
%T | 24-hour time with seconds (hh:mm:ss). |
%u, %w | Weekday number, Monday-first (1-7) or Sunday-first (0-6). |
%U, %W | Week number of the year, starting from the first Sunday or first Monday. |
%V | ISO 8601 week number. |
%Z | Time zone abbreviation. |
%% | A literal % character. |
Time-based tokens are evaluated only once, when Auto Unzip begins processing the zip file, using the time the triggering upload or copy occurred. Every file extracted from that zip lands in the same resolved destination folder, even if extraction takes long enough to cross a time boundary. The destination reflects when the zip arrived, not when each extracted file is added to the folder.
Time Zone
By default, the datetime tokens in the destination path are calculated in UTC. Set a time zone (for example, Eastern Time (US & Canada)) to calculate them in a different zone instead.