Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to copy Document Library Reviewer Discussion from one site to another?

  Asked By: Gonzalo    Date: Oct 09    Category: Sharepoint    Views: 1071

I have a need to copy Document Library and Review
comments from one web site to another. Basically I
need to copy two lists from a site to another site:
"Documents for Review" and "Review Discussion".

One way to do it is through "save as template -
include content". But several concerns/issues make me
inclined to the second approach. One concern/issue I
have is: the new site has already have a "Documents
for Review" and "Review Discussion" items, and I also
want to preserve its own setting.

The second approach I have is to use SharePoint Object
Model in a web part or web service. To copy "Documents
for Review" items I have come up the following:

SPSite sourceSite = new
SPWeb sourceWeb = sourceSite.RootWeb;

SPSite newSite = new
SPWeb newWeb = newSite.RootWeb;

SPFolder sourceFolder = theWeb.GetFolder("Documents
for Review");
SPFolder destFolder = newWeb.GetFolder("Documents for

if(sourceFolder.Exists && destFolder.Exists)
for(int i=0; i<sourceFolder.Files.Count; i++)
SPFile srcFile =
string fileName = srcFile.Name;
byte[] binFile = srcFile.OpenBinary();
destFolder.Files.Add(fileName, binFile,

This works well.

However, I couldn't find a good way to copy the
corresponding "Review Discussion" list. I tried
SPDocDiscussion, SPDocDiscussionCollection objects but
didn't go anywhere.

What object model should I use?



3 Answers Found

Answer #1    Answered By: Matt Prince     Answered On: Oct 09

if its not a custom list, try sharepoint  2003 backup elite
sc at webfox.ca to copy  doc libs and lists. it is a backup
and site  migration tool. otherwise, dont know which lib
group it is sorry... let you know if i find  one

Answer #2    Answered By: Brooks Bond     Answered On: Oct 09

heres a tool thats free you can try or might help:


not as easy to use but may work in your case, also may
find useful code there..

Answer #3    Answered By: Gregg Wilkinson     Answered On: Oct 09

It looks like that there is no easy answer. But I will
try to follow what you have suggested.


Related Topics:



Related Post