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 or created in the selected folder, they are automatically organized into subfolders based on file extension, creation date, modification date, or regular expression. You can apply these rules to new files only, or to both existing and new files.

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.

Organizing Existing and New Files

By default, folder organization rules trigger on new files. You can also apply the rule to files already in the folder, moving them into the appropriate subfolders.

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.