1

I understand that a list and a library are two different things... But I have a project tracker which is a list. I would like to move it to a different site and as a library. Is there any way I can move this data ? Without having to create a library all over again ? Is there any option to sync a list in one site to a library in another site ? Kindly help..

0

Libraries are associated with documents, it's required to have a document in a library. If you aren't bringing over a document, there is no reason to use a library. Otherwise if you want to move the items over to a different list, the idea is to use powershell:

$sourceweb = get-spweb http://sourceweb
$destinationweb = get-spweb http://destinationweb
$sourcelist = $sourceweb.Lists["List Name"]
$destinationlist = $destinationweb.Lists["New List Name"]

foreach($item in $sourcelist.Items){

$newitem = $destinationlist.Items.Add();
$newitem["Field"] = $item["Field"]
$newitem["Field2"] = $item["Field2"]
$newitem.Update()
}

$sourceweb.Dispose()
$destinationweb.Dispose()
| improve this answer | |
  • Thanks for this info... But to be more precise.. I want the tracker which is a list to moved to a library.. There are many other documents related to the same project in the library and tracker which is now in list must be in the library and its in a different site...any means by which I can bulk load the data from a list in one site to a library in another site ?? Or by using powershell can the same logic be applied ? – kanika Sep 27 '14 at 5:20
  • does this script work withing same site collection lists. for moving data? – Hardik Kothari Sep 27 '14 at 6:20
  • Where are your documents stored? What I'm getting at is every "library item" is a document, not a list item. The metadata is about the document. You are planning to have a document for every list item? I think your best bet is to just create a document library that houses these documents, and if you want you can link list items to the document that it relates to. – Mike Sep 29 '14 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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