Moving files with metadata and permissions to another library.

Business case:
We have a document library with files. These files all have specific files level permission. A user can only see files (s)he is allowed to see, and the permission level changes during a workflow. When the document get the status finished, a workflow will remove the contribute right for the contributors and set a read permission for these users. There are also about 30 metadata columns. Some of these columns are just status fields used in a workflow, other ones (about 22) are actual properties of this document.
The library is used to collaborate on files that have a limited time span. When the documents are finished and the responsible people have approved them, they need to be move to a archive.

There are 2 easy ways to do this. (I only discuss solutions without having access to a console on the server to execute STSADM command, nor use solutions that required Visual Studio). Besides these 2 options, you could also execute an STSADM –export of write custom code.

  1. Create a template from your library with content
  2. Create a template from your library without content and move the content using explorer view.

Method one has some restrictions and side-effects. First, the content of the library cannot be more than 10 MB. This limit is in most cases very restrictive, and therefore not the best solution. Also, you can do this only once, since every year the content will change, and you might not want the have a document library template in your template gallery for every year.
You can change the maximum value (10 MB limit) via stsadm -o setproperty -propertyname max-template-document-size –propertyvalue xxxxxx” (xxx being the size in bytes). But hen again, (power)users don’t have acess to the console, so I don’t consider this an option.
We would also have an issue with the item level security since item level security is not maintained in a template.

The second solution is in my opinion a better, more flexible and stable solution.

  1. Create a template from your library using this procedure:

Settings > Document library Settings > Save document library as template
Under the Permissions and Management > Save document library as template

Fill in File name, a Template name and a description for your template, and don’t select Include content. The Template name is the name that will appear when your want to create a document library.

That’s all for the creation of a document library template. This template will now be available when you create a new library or list and appears in the List Template Gallery at http://mySharePointSiteURL/_catalogs/lt/Forms/AllItems.aspx

  1. Create a library based on the new template

The next step is to create a new library based on the template we you created in step 1

In the Quick Launch, click on View All Site Content (or click on Site Actions/View all Site content). This will direct you to the /_layouts/viewlsts.aspx page and shows and overview of all Libraries and lists in your site.

Click create and select the templatename (the one you created in step 1).
Fill in the Name and description and other information.
Once this library is created, validate that all columns exist. (via Document Library settings)

Open the newly created library in Windows Explorer View and open the document library with the source in Explorer view

Then select the documents that you want to move, (using Shift or CTRL and click the documents) and drag them to the destination library.

That’s it.

Reusing a SharePoint list or library

As you probably know there are different kinds of Lists and Libraries available in SharePoint (WSS 3.0 or MOSS 2007). This table shows an overview of available lists and libraries for MOSS 2007 Enterprise.

Libraries Communications Tracking Custom Lists Web Pages
Document Library Announcements Links Custom List Basic Page
Form Library Contacts Calendar Custom List in Datasheet View Web Part Page
Wiki Page Library Discussion Board Tasks KPI List Sites and Workspaces
Picture Library Project Tasks Import Spreadsheet
Data Connection Library Issue Tracking
Translation Management Library Survey
Slide Library
Report Library

You can easily reuse a List or Library, with or without its content. For instance, you have created a survey and you would like to re-use that survey (maybe several times a year, but this doesn’t really matter, you just want to reuse it) without having to input all questions and eventually branching again. The same thing may apply when you Webcast want to reuse a Document Library or a List with several columns.

It’s quite easy to reuse a list. In the following procedure you will see some screenshot how you can do that. I have also created a Webcast about reusing a list or library in SharePoint 2007.

This is my initial setup:

I have a survey called: Users satisfaction.
In this survey there are several questions, and some questions are branched. (This means that depending on your answer, you well go to a specific question instead of the next question)

  • The first thing you need to do is save the List/Library as a template

052010_1158_Reusingalis1

Save survey as template

052010_1158_Reusingalis3

  • To create a new List/Library based on this template: Click on View all Site Content and then create and select your Template.

052010_1158_Reusingalis4

When you want to delete a list template, you can browse to the List Template Gallery http://servername/Sitename/_catalogs/lt/Forms/AllItems.aspx

As you probably know there are different kinds of Lists and Libraries available in SharePoint (WSS 3.0 or MOSS 2007). This overview shows the available lists and libraries for MOSS 2007 Enterprise.

Libraries Communications Tracking Custom Lists Web Pages
Document Library Announcements Links Custom List Basic Page
Form Library Contacts Calendar Custom List in Datasheet View Web Part Page
Wiki Page Library Discussion Board Tasks KPI List Sites and Workspaces
Picture Library Project Tasks Import Spreadsheet
Data Connection Library Issue Tracking
Translation Management Library Survey
Slide Library
Report Library

You can easily reuse a List or Library, with or without its content. For instance, you have created a survey and you would like to re-use that survey (maybe several times a year, but this doesn’t really matter, you just want to reuse it) without having to input all questions and eventually branching again. The same thing may apply when you Webcast want to reuse a Document Library or a List with several columns.

It’s quite easy to reuse a list. In the following procedure you will see some screenshot how you can do that. I have also created a Webcast.

LINK HERE

This is my initial setup:

I have a survey called: Users satisfaction.

In this survey there are several questions, and some questions are branched. (This means that depending on your answer, you well go to a specific question instead of the next question)

  • The first thing you need to do is save the List/Library as a template

052010_1158_Reusingalis1

clip_image002

052010_1158_Reusingalis3

  • To create a new List/Library based on this template: Click on View all Site Content and then create and select your Template.

052010_1158_Reusingalis4