Zieglers

Just little about C#, .NET, SQL Server, SharePoint and SAP

Bulk Move for SharePoint

Posted by zieglers on April 20, 2010

Here is another generic bulk action for SharePoint: Move Documents

 Idea is similar to previous bulk actions i developed. Move operation will give more flexibility to users while working with documents in SharePoint libraries. It’ll help to organize your documents easily by allowing you to move them from one library to another in bulk.

 Sounds simple, but there are many questions to ask on move operation. Here are 2 very important questions to answer:

  • What if documents you are moving belong to one or more content types which don’t exist yet in destination library?

Answer: Before moving files, source and destination library content types are compared. Then, missing content types are added to destination library. In a way, destination library is prepared for move operation.

  • What happens to metadata of the source documents after moving it?

Answer: All metadata of source documents is also moved along with documents.

DEMO: Here is a sample move operation performed on two sample files which belong to content types CT1 and CT2, being moved from ‘Documents’ library to ‘TestLib’.

1. Sample documents in source library

2. Select documents and go to Bulk Actions -> Move.

3. Select destination library, TestLib.

4. Selected documents have been moved to destination library. Source library is empty.

5. Moved documents are TestLib library.

6. Metadata is moved with documents as well.

Let me know if you have any questions, suggestions, or interested in this functionality.

Zieglers

18 Responses to “Bulk Move for SharePoint”

  1. joelplaut said

    I really like this add-on. People at my place really liked the demo. I installed it (Zieglers.CodePlex.BulkListActions.wsp) and it works great. Only issue is whenever I try to move documents between a library using the “move” function, it copies only the first file, and
    leaves the originals, and returns this error “Object reference not set to an instance of an object”.

    I tried by creating two brand new blank standard libraries, and created 3 blank word docs, and this same issue occured. I tried it in two separate instances of SharePoint, same results.

    Thoughts?

    Joel

    • I am having this issue as well, and I do have what I think is the latest version. It appears to only move the first file and it won’t delete it out of the source library. Any ideas? I downloaded it from here: http://spbulkactions.codeplex.com/releases/view/45640

      • zieglers said

        Are you sure you are running the latest version? I just tried and it’s working fine for me. Can you please give the steps and some details to duplicate this problem? For ex: root site or subsite, user permissions executing move operation: contribute, read, SCA, …etc.
        Once I duplicate it, i’ll try to fix.

        zieglers

      • I’m running the version in the link in my original post, which seems to be the latest version. I am running the operation under my user account, which has full control access to both source and destination libraries. I am interested in doing this in a subsite — due to a config error on a third-party product, we have thousands of documents in the root of the doc library rather than in subfolders. Windows Explorer view is not an option.

        I agree that it sounds like I don’t have the latest version, but the link above sure looks like it is the latest.

        Thanks

      • Sorry, I forgot the steps. Here is what I am doing. Let’s call the source library SOURCE and the destination DESTINATION. Here is what I do:

        1. I go to the subsite and then into the library and click the select box for the documents I want to move.
        2. I go to Actions–>Bulk Actions–>Move. I then select the destination library.
        3. I get the error. The destination library does have a copy of the first file selected but that’s it. None of the files are deleted from the source library.

  2. zieglers said

    Hi Joel,
    Thanks for using BulkListActions. I tried to duplicate the issue, however i couldn’t. It seems to be working fine in my environment.
    Here is some more insight on ‘Move’ logic:

    1. Checking if Content Types enabled or not on source and destination libs.
    2. If enabled, creating CTs of docs first, in destination lib.
    3. Then, copying files to dest lib.
    4. Finally deleting files from source lib.

    While trying to do above, it might also be a security related exception thrown. Can you try with different users with different list privileges to get more clue on your exception?

    P.S. Soon, i’ll upload a newer version of bulklistactions in codeplex.

    zieglers

  3. joelplaut said

    I have Full Control and Farm Administrator access to the site and document libraries.
    Source DocLib and Destination DocLibs were set to not allow Management of Content Types. Both are standard new document libraries with all the standard SharePoint 2007 defaults and no additional or changed metadata. No versioning, no content approval, no forced check out, all 3 test word (DOCX) documents are checked in. Tried “Move” of all three. first one copied, the error was thrown “Object reference not set to an instance of an object”. The target document library had “Management of Content Types” enabled, which is one clue.

    I tried enabling management of content types on both source ands destination, and the same error occured.

    Thoughts?

  4. zieglers said

    I updated wsp in codeplex. Can you plz try again?
    zieglers

  5. joelplaut said

    Thanks. I upgraded. I like the new stacked menu layout. I narrowed down the problem. “Move” only works on document libraries in the top level site (Home site), which we don’t really use This Move feature doesn’t work in document libraries in subsites (took some testing to find this out, I get an “object reference not set”). Can you try to create a subsite, and test? Let me know if you want me to test a new WSP.
    p. I love your WSP, it’s really great!

  6. zieglers said

    Thanks, Joel for detailed info on that bug. I was able to duplicate the error. Will announce when i fix it.

    zieglers

  7. joelplaut said

    “Move” works great. I can’t thank you enough! One suggestion for an enhancement, is to enable folders to be selected for move along with the contents in the folders. Today you can select the folder, but it won’t move.

  8. […]   Content explained in this post is additions and enhancements made to the topic explained in Bulk Move Documents post. If you are not familiar with bulk move action, you can refer to that post before reading […]

  9. jstokka said

    Hi. Is it possible to use theis on a WSS 3.0 site?

  10. máy fax HPMáy fax giấy nhiệtMáy fax Sharpmáy in địa chỉ phong bìtài liệu sốmay quet HPmay scan HPscanner Hpmáy scanmáy quét ảnhmáy quétmay quet anhmáy scan ảnh máy in lasermáy in laser đa chức năng canon hpscannerscanner canonMáy scan Fujitsumáy inSc…

    […]Bulk Move for SharePoint « Zieglers[…]…

  11. could you please provide code of Bulk Move for SharePoint

Leave a comment