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

I'm writing now code agains the document library, that code adds files to the document library. Basically what I want to do is, when the particular file already exists in the document library with the same name, i don't want to get an error message, but i want to update it.

By updating I mean, i want to upload the new document instead of an old one, but not like deleting whole item and then uploading file and all metadata etc, i just want to update the file and also i have versioning on the document library so basically it should increase in version ...

Any idea how to do that? Because now when i programmatically try to upload a file with the same name I get an error ..

share|improve this question
up vote 0 down vote accepted

This link might help you. Refer it.

share|improve this answer
Oh right, how could i forget about the overwrite ... thanks for the help – Shkipper Jan 4 '13 at 14:33
yes thats right...always... – Dhaval Kariya Jan 7 '13 at 4:59

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.