Skip to main content

Organize Files into Subfolders

Files.com can automatically place uploaded files into subfolders based on file attributes. This keeps folders below the 100,000-item limit that applies to syncs, FTP, SFTP, and WebDAV, and makes specific files easier to find.

When files are uploaded to the selected folder, they are automatically organized into subfolders based on file extension, creation date, modification date, or regular expression.

Organize files into subfolders setting applies to direct uploads only. Files placed via a copy, move, or Automations are not organized by this rule.

Organize Files by File Extension

Files are placed into subfolders named for their extension. A file with a .jpg extension moves into a subfolder called jpg, and a file with a .pdf extension moves into a subfolder called pdf.

Organize Files by File Created Date

Files are placed into subfolders based on their creation date, using a subfolder name template built from date and time tokens. All time-related patterns are supported.

Templates like %Y-%m-%d produce a year-month-day format, %B-%Y produces a month-year format, and %A-%d produces a weekday-day format.

Supported tokens include weekdays (%a, %A), years (%y, %Y), months (%b, %B, %m), days (%d, %e), and time values (%H, %M, %S). Combine tokens to produce the subfolder structure you need.

Created Date and Folder Organization on Remote Server Mounts

When a folder mounted on a Remote Server is configured to organize files by created date, the rule falls back to the modified date. This happens because all protocols, including file transfer protocols like FTP and SFTP, do not provide created date information, so no created date is available from the mounted source.

For example, consider a folder mounted with Remote Server Mount and configured to organize files by created date using the subfolder name template %Y-%m-%d. An invoice file created on July 7, 2025 on the source system and last modified on February 1, 2026 ends up in a 2026-02-01 subfolder, because the rule falls back to the modified date when the created date is not available from the mount.

When the rule runs against files already in the folder, every file is placed by its modified date. This often groups all the files into a single subfolder for the most recent month or day, rather than spreading them across their original creation dates. New files uploaded to the mount are usually placed correctly because their modified date is close to their created date.

Organize Files by File Modified Date

Files are placed into subfolders based on the modified date provided during upload. Subfolder names are generated using configurable date and time tokens.

Subfolders are created as files are uploaded, and files already in the folder can be reorganized using the same rules. Folder names come from the modified date sent by the uploading client, applied to the configured template. A subfolder template of %B-%Y creates folders like July-2025.

Modified Date and Folder Organization

Folder naming and organization are based on the modified date provided by the client during upload. Subfolders are created using that modified date regardless of the File last modified date semantics setting.

For example, consider a folder configured to organize files by modified date using the subfolder name template %Y-%m-%d. An invoice file last modified on July 7, 2025 on the source system and uploaded to Files.com on February 1, 2026 ends up in a 2025-07-07 subfolder, because the modified date provided by the client during upload is July 7, 2025.

Organize Files by Regular Expression

Regular expressions organize files into subfolders based on patterns in their names. The regular expression field accepts a pattern that determines how subfolders are created, including grouping files by values like year, month, or date extracted from the filename.

For example, consider categorizing files by document type and ID in the filename. Given files named invoice-12345.pdf, receipt-67890.pdf, and contract-98765.pdf, a regular expression like (invoice|receipt|contract)-(\d+).pdf produces a subfolder structure that groups files first by document type and then by ID.

In this scenario, invoice-12345.pdf is placed in invoice/12345, receipt-67890.pdf in receipt/67890, and contract-98765.pdf in contract/98765. The result is a multi-level subfolder structure organized by document type and unique ID rather than by date.

Subfolder Organization in Automations

The Organize Files into Subfolders behavior does not apply to files placed by an Automation. Automations copy or move files rather than upload them, so the upload-triggered rule never fires.

To produce equivalent subfolder organization from an Automation, customize the destination path using tokens in the Automation's destination filename. For extension-based organization, %te resolves to the file's extension at runtime, so a destination of /your/folder/%te/ places each file into a subfolder named for its extension, the same result as the extension-based behavior.

For date-based organization, time tokens such as %Y-%m-%d resolve to the date and time the Automation runs, not the file's original modified or created date. The subfolder structure reflects when the Automation placed the file, which may differ from the file's timestamps.

See Customizing Destination Path and Filenames for the full list of available tokens.

Interaction with Other Folder Settings

When a folder has both Organize Files into Subfolders and other Folder Settings configured, a new file is organized into a subfolder before the other settings act on it. A non-recursive setting only applies to files stored directly in the folder where it's configured, so those other settings can only take effect if they're configured as recursive on the parent folder, since the file is no longer stored directly in the folder where Organize Files into Subfolders is defined.

Retroactive Cleanup of Existing Files

In addition to organizing files as they are uploaded, you can run a one-time cleanup that applies the organization rule to files already in the folder, moving them into the appropriate subfolders. This is a separate, on-demand operation. When setting up the behavior for the first time, choose the option Automatically organize files into subfolders for organizing existing files into subfolders. Running it does not change how the behavior handles future uploads.

Folder organization is not designed to work on recursive folders, because subfolders that inherit the setting from a parent folder produce unintended placements. The setting is also not designed to work with syncs, to avoid conflicts during synchronization.