Limit Uploaded Files To Regular Expression
This folder setting limits file names to a specified regular expression, enforcing a naming pattern on incoming files.
It supports automation and downstream-system compatibility by restricting incoming files to specific names, formats, or extensions. It is useful when files must follow a required convention, including document collection through Inboxes and Share Links, and uploads from internal systems, external systems, remote servers, vendors, and users.
This restriction applies to any action that places files or folders directly into the folder, including uploads, Inboxes, Share Links, renames that result in restricted filenames or extensions, manual copy or move actions, and automated processes like Syncs and Automations.
This rule applies to all subfolders unless explicitly overridden at a deeper level.
If you want to limit uploaded files to a certain file name length, use Limit Uploaded Files to File Name Length. Related folder settings include Limit Uploaded Files to Certain File Extensions and Automatically Rename Uploaded Files.
Moving or copying files or folders into restricted folders fails when the destination path has filename-related restrictions that are stricter than the source path, including regular-expression filename rules.
Example Regular Expressions
The patterns below cover common naming requirements. Build your own regex against your specific naming convention.
Restrict Filenames to Start With a Number
To allow only filenames that begin with a number, use ^[0-9].*$. This fits numeric naming conventions for invoices, order numbers, or batch files.
Enforce a Case-Insensitive Invoice Naming Format
To require an invoice naming structure like INV-1234.pdf, use (?i)^INV-\d{4}\.pdf$. The pattern accepts uppercase or lowercase while enforcing the structure.
Limit Filenames to Lowercase Letters, Numbers, and Specific Symbols
To allow only lowercase letters, numbers, dots, underscores, and hyphens, use ^[a-z0-9._-]+$. This fits environments where uppercase letters are not allowed.
Restrict Filenames to a Maximum Length
To cap filenames at a specific length, use ^.{1,20}$ for a maximum of 20 characters. The folder setting Limit Uploaded Files by File Name Length achieves a similar result.
Allow Filenames With Alphanumeric Characters and a Single Dot for Extensions
To require filenames containing only letters, numbers, spaces, underscores, and hyphens with a single dot for the extension, use ^[a-zA-Z0-9 _-]+\.[a-zA-Z0-9]+$.
Allow Only Specific File Types
To restrict uploads to specific extensions like .jpg, .png, or .txt, use ^.*\.(jpg|png|txt)$. The folder setting Limit Uploaded Files to Certain Extensions achieves a similar result.
Prevent Filenames From Containing Restricted Characters
To block filenames containing characters that are disallowed on some operating systems, such as < > : " / \ | ? *, use ^[^<>:"/\\|?*]+$. This prevents storage errors on Windows-based systems and other restricted environments.
Enforce a Specific File Name Format
To require the naming pattern invoice_YYYY-MM-DD.pdf, use ^invoice_\d{4}-\d{2}-\d{2}\.pdf$. The pattern accepts files like invoice_2026-02-01.pdf and rejects anything else.
Allow Only Numeric File Names With a Specific Extension
To restrict uploads to numeric file names ending in .log, use ^\d+\.log$. The pattern accepts 12345.log and rejects filenames containing letters.
Overriding Settings in Subfolders or Excluding Subfolders Entirely
Subfolders can use different regular-expression filename rules by overriding the parent folder's settings. An administrator with the appropriate permissions can configure these restrictions at the subfolder level to enforce unique naming requirements or opt out of inherited rules.