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

How can I programmatically move a document from one document library to another while preserving metadata? Preferably using the server OM.

share|improve this question

I don't have the source code handy but the SPListItem.Copy() method would probably be a good place to start -

share|improve this answer

There is SPFile.MoveTo() method which moves the file within the same site:

share|improve this answer

I know you have expressed an interest in using the server object model, but there is also the Copy.asmx web service (specifically the CopyIntoItems() method). I, myself, don't like the Copy web service, because it creates a link back to the original document. I just wanted to provide another alternative.

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.