Skip to main content

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 NameDescription
%FfThe name of the source file, with extension.
%FbThe name of the source file, without extension.
%FeThe extension of the source file.
%FlThe name of the source file, with extension, converted to lowercase.
%FnThe name of the source file, without non-alphanumeric characters, with extension.
%FpThe 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, %AAbbreviated or full weekday name.
%y, %YTwo-digit or four-digit year.
%b, %BAbbreviated or full month name.
%mMonth number (01-12).
%d, %eDay of the month, zero-padded (01-31) or not (1-31).
%HHour, 24-hour clock, zero-padded (00-23).
%I, %lHour, 12-hour clock, zero-padded (01-12) or not (1-12).
%MMinute (00-59).
%SSecond (00-59).
%pAM or PM indicator.
%jDay of the year (001-366).
%CCentury number (year divided by 100).
%r12-hour clock time (hh:mm:ss AM/PM).
%R24-hour time (hh:mm).
%T24-hour time with seconds (hh:mm:ss).
%u, %wWeekday number, Monday-first (1-7) or Sunday-first (0-6).
%U, %WWeek number of the year, starting from the first Sunday or first Monday.
%VISO 8601 week number.
%ZTime 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.