logo
search
SharePoint Document Issues

How to Restrict SharePoint File Uploads by File Name

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user wants to know if it is possible to block specific file uploads in SharePoint based on exact file names, and what practical alternatives or workarounds exist.

Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Managing SharePoint document libraries and enforcing strict file naming conventions or restrictions.
Observed behavior
SharePoint allows uploads regardless of the file name, as there is no standard built-in setting to block them based on specific naming criteria.
Before you start

Ensure you have the necessary administrative permissions in your SharePoint environment to create Power Automate flows or execute PowerShell scripts.

Solution 1Recommended

Use Power Automate to Remove Noncompliant Files

Since SharePoint doesn't natively block uploads by name, a Power Automate flow can automatically delete or move files with restricted names immediately after they are uploaded.

While column validation exists in SharePoint, it does not stop the initial upload of a file. Power Automate provides an automated post-upload cleanup method to enforce your naming conventions.

1
Create an automated cloud flow

Navigate to Microsoft Power Automate and create a new automated cloud flow. Select the trigger 'When a file is created (properties only)' for your specific SharePoint site and library.

2
Add a condition

Add a 'Condition' action to check if the 'File name with extension' dynamic content contains or exactly matches your restricted keywords or file names.

3
Set the deletion action

In the 'If yes' branch of the condition, add the 'Delete file' action for SharePoint. Map the 'Identifier' field to the Identifier dynamic content from the trigger to remove the noncompliant upload.

Temporary File Visibility: Because the flow triggers after the upload, the noncompliant file may be briefly visible in the document library before Power Automate processes and deletes it.
Free Microsoft Office alternative

Discover WPS Office for Seamless Document Management

While dealing with complex SharePoint upload restrictions, managing the actual documents shouldn't be a hassle. WPS Office provides a lightweight, highly compatible alternative to Microsoft Office, letting you create, edit, and collaborate on documents for free.

Highly compatible with Microsoft Word, Excel, and PowerPoint file formats.Lightweight software with fast installation and smooth operation.Familiar user interface requiring no learning curve for Office users.Built-in PDF editing and format conversion tools.Easily save and upload your standardized documents to cloud services.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use SharePoint column validation to block uploads by file name?

No, column validation only prevents users from saving metadata if it doesn't meet specific criteria; it does not block the initial file upload process into the document library.

Are compliance policies able to restrict exact file names in SharePoint?

Compliance policies are generally designed for content scanning (like identifying sensitive data) or blocking specific file types entirely, rather than restricting exact or partial file names.

Will Microsoft add a built-in feature to block file names in SharePoint?

Currently, there is no built-in feature planned for this exact functionality. Administrators are encouraged to submit this as a feature request through the official Microsoft SharePoint feedback portal.