There is some way to prevent a document from being uploaded to a SharePoint library based on its Name.

Let's say my documents have to meet this requirement


Can I check somehow if the document I'm uploading has a naming format, and if not , not allow the user to upload it and show an error message?

1 Answer 1


Because there are more choices how to upload file into SharePoint library, there is not any way how to check name before uploading, what you can do is Flow or SharePoint Workflow which will be checking all uploaded documents and sending email it's authors about bad name or you can delete them too.

You can create more properties which will be for Name and Date and with Flow or WF merge values to the correct Name of Document. Make them as required fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.