SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If two users have two different documents but same name, when the second user saves his file in same document library, it overwrites the first user's document and the document gets new version. Is there any setting on library level that you can set to get a warning and prevent users to save new documents with a name that already exists.

share|improve this question
up vote 3 down vote accepted

No, no OOB settings can prevent a user from overwriting an existing document, unless you do one of the things suggested in the other answers OR you create an event receiver and attach it to your library. In this event receiver, for the itemAdding event handler, you then check if there's another document with the same name and in this case, you cancel the insertion.

share|improve this answer

On upload there is a checkbox "Overwrite current version" (or similar). This is the only setting there is.

The main problem is that this option is not given if the user drag-and-drops documents to a library view!

share|improve this answer

If users have "Contribute" permission only and if document library sets to display only users own documents, they can not overwrite documents of eachother. If they try to save a document with same name, it will give a "Permission Denied" error.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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