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 requires a Destination Path, which must be a subfolder of the folder where Auto Unzip is configured.
The destination folder can't be within a permission fence or a Partner Channel.
Auto Unzip doesn't accept an invalid destination path to place unzipped files. If a destination path's folder is valid but missing, Files.com automatically creates it when unzipping files.
The default destination path 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.
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.