We have a multiple document libraries used in different projects in Sharepoint. Each document library in each project needs to have a unique naming convention for the files. For example. One of the library will use the naming convention as Cust1-Proj1-Dept1-Ver1.01.doc Another file in the same library will be like Cust2-Proj2-Dept3-Ver1.35.doc We want to force the users to upload the files to this particular library only in this naming convention. If someone uploads another file with just abc.doc as the file name, it should be rejected or display a warning message saying that, "for this particular document library please upload files in this format".

1 Answer 1


You could code an event receiver catching the ItemAdding and make some logic to ensure the naming convention is respected. The, you could cancel the event and set the good error message to the user.

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.