Sharepoint list Import/Export command

Source: Internet
Author: User

Sharepoint list Import/Export command

When using Sharepoint, we often need to do this: transfer a list (or document library) from one website to another.

A common practice is to save the list as a template file and create it again at a new website location. However, this method is cumbersome, complex, and subject to website template type restrictions.

The SharePoint object model provides the ability to import and export content, and its granularity can reach the List entry level.

The built-in "Import/Export" Operation in the stsadm command is to use this API, but only website-level content can be operated.

In order to easily move the list content or archive a specified list, I have developed two stsadm command extension operations.

For example, I want to export and import the "abclist" list on the "http: // Site1" website to the "http: // Site2" website, you can run the following command:

Stsadm-O exportlist-siteurl http: // Site1-listname abclist-filename D: \ abclist. CMP (export the list to a file)

Stsadm-O importlist-siteurl http: // Site2-filename D: \ abclist. CMP (import a file to a Sharepoint site and restore it to a list)

Syntax description: List export operation (exportlist) stsadm-O exportlist

-Siteurl <SharePoint site URL>

-Listname <list display name>

-Filename <content migration package file name>

[-Overwrite]

[-Nocontent] Note:-nocontent: only the column table structure is imported, and the list content is not included. List import operation (importlist) stsadm-O importlist

-Siteurl <SharePoint site URL>

-Filename <content migration package file name>

[-Retainobjectid]

[-Originalinfo <all | none | systemaccount>] Note:-retainobjectid: Import and Export location, which can be used in Backup recovery scenarios.

-Originalinfo: "All": retains all original information, that is, the original modification time and creator information of the imported data. "None" indicates that the above information is not retained. "Systemaccount" is used to change the Creator information to a system account. This option is "all" by default ". This extension command installs the deployment in the form of a WSP solution package: http://www.live-share.com/files/302411/xc_stsadmextension.zip.html known issue: I don't know how to save the entry permission settings through this set of API, who can give some advice? (I tried the includesecurity attribute, but it does not seem to work .)


Del. icio. us: Splist, Sharepoint

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.