Organize Files into Subfolders
Automatically organizing uploaded files into subfolders based on various attributes enhances file management and navigation while improving performance and scalability. This approach prevents exceeding the item limit in a single folder, making it easier to locate specific files. Creating predictable subfolders ensures compatibility with the 100,000-item limits for syncs, FTP, SFTP, and WebDAV, which improves site performance and supports better scalability.
When files are uploaded or created in the selected folder, they can be automatically organized into subfolders based on file extension, creation date, modification date, or regular expression. You can choose to apply these folder organization rules to only new files, keeping existing files as they are, or extend the organization rule to both existing and new files for consistent management.
Organize Files by File Extension
Automatically organize files by their extension by placing them into subfolders that match their file types. For example, files with a .jpg extension will be moved into a subfolder called jpg, while files with a .pdf extension will be placed in a subfolder called pdf.
Organize Files by File Created Date
Automatically organize files into subfolders based on the file creation date, using customizable subfolder name templates that follow various date/time tokens. We support all time-related patterns.
You can use templates like %Y-%m-%d to produce a year month day format, %B-%Y to produce a month year format, or %A-%d to produce 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). These tokens can be combined to create flexible and precise subfolder naming based on your organizational needs.
Organize Files by File Modified Date
Automatically organize files into subfolders based on the modified date provided during upload. Subfolder names are generated using configurable date and time tokens.
Subfolders are created when files are uploaded, and files already present in a folder can also be reorganized using the same rules. Folder names are generated from the modified date sent by the uploading client using the configured template. For example, 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, a folder is 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 that folder on Files.com on February 1, 2026 results in a 2025-07-07 subfolder being created, with the file placed there because the modified date provided by the client during upload is July 7, 2025.
Organize Files by Regular Expression
You can use regular expressions to organize files into subdirectories based on specific patterns in file names. The regular expression field accepts a pattern that determines how subfolders are automatically created, including grouping files by values like year, month, or date extracted from the file name.
For example, consider categorizing files by document type and ID in the filename. Suppose you have files named invoice-12345.pdf, receipt-67890.pdf, and contract-98765.pdf. By using a regular expression like (invoice|receipt|contract)-(\d+).pdf, you can create a subfolder structure that organizes files first by document type (e.g., invoice, receipt, contract) and then by ID.
In this scenario, the file invoice-12345.pdf would be placed in the folder structure invoice/12345, while receipt-67890.pdf would be sorted into receipt/67890, and contract-98765.pdf would go into contract/98765. This approach creates a clear, multi-level subfolder organization, making it easier to manage files based on document type and unique IDs, rather than dates.
Organizing Existing and New Files
By default, the folder organization rules trigger on new files, but you can also apply this logic to files already existing in the folder, moving them into the appropriate subfolders based on the defined rules.
Note that organizing files may not work with recursive folders, as enabling recursion could lead to unintended consequences if subfolders inherit the setting from a parent folder. Additionally, this setting is not intended to work with syncs, as it helps prevent potential conflicts or errors during synchronization.
Get The File Orchestration Platform Today
4,000+ organizations trust Files.com for mission-critical file operations. Start your free trial now and build your first flow in 60 seconds.
No credit card required • 7-day free trial • Setup in minutes