Is there any way so that a library only allows to upload files with the name which matches to specific format?

Example format:

[Static name].[Actual year].[Unique number in the year][Static document Extension].

If the file name is not matched with the specified format, it should not allow to upload the file in library.

  • I would use a[n] [Remote] Event Receiver for this. You can either perform a regex check and allow or deny the item to be added, or manipulate the file name to conform to your specs.
    – user6024
    Oct 26, 2018 at 15:26
  • Hello, yes. I need this. I Will use Event Receiver. Sorry my english isn't good Oct 29, 2018 at 19:54

1 Answer 1


Finally I resolved this problem. I am using Event Receiver that start when the item is adding to the library. If the name document is diferent to the default name, the library send a error. I am using this link

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.