locked
Changing Folders to Document-Sets RRS feed

  • Question

  • We are working on a migration strategy to move content from a file-server to SharePoint 2010.  We are planning to use document-sets in order to avoid having to re-enter a lot of the same metadata on several of the documents.

    As I import content from the fileserver, the content is stored in folders.  As I upload documents and folders, I have tried to change the content type of the folder to a document set content-type.  While the properties settings allow the content-type to change to a document-set, it does not act like a document-set.

    I am curious if it is possible to change a folder to a document-set content-type.  I am further wondering if anyone has ideas on the best ways to handle an import from a fileserver to document-sets.

     

    Monday, February 7, 2011 4:40 PM

Answers

  • Although document set are derived from Folder Content Type I don't think you will get document set just my changing content type from Folder to Document Set. You may want to check if you can automate the document upload directly into document set. If you want a code sample lets us know.
    Microsoft SharePoint MVP |http://razirais.wordpress.com| MCT| MCPD SharePoint 2010 Developer| MCITP SharePoint Administrator 2010
    • Marked as answer by KeFang Chen Friday, February 18, 2011 7:12 AM
    Monday, February 7, 2011 10:42 PM
  • Hi,

    why don't you create the document set first and then uploade the files to the documents using multiple document upload ? This doesn't make it nessecary to change the content type from folder to document set.
    Another thing you should mention is that you cannot have nested document sets like you have it in a folder based structure. Document Sets can contain folder but they cannot contain document sets.

    As Razi bin Rais mention you cannot easy change becaus it will have the content type assign to the previous folder but the schema of the folder won't be update. Another thing you can do is make a bulk upload using Explorer View or Mulitple file upload (this can handle folder upload too) and then move the files to the specified document-set using mange content and structure.

    Hope this helps
    Kind regards
    Stefan


    http://www.n8d.at/blog
    twitter: n8design
    Microsoft Community Contributor 2011
    MCTS - SharePoint / WSS Configuration and Development
    • Marked as answer by KeFang Chen Friday, February 18, 2011 7:12 AM
    Monday, February 7, 2011 11:17 PM

All replies

  • Although document set are derived from Folder Content Type I don't think you will get document set just my changing content type from Folder to Document Set. You may want to check if you can automate the document upload directly into document set. If you want a code sample lets us know.
    Microsoft SharePoint MVP |http://razirais.wordpress.com| MCT| MCPD SharePoint 2010 Developer| MCITP SharePoint Administrator 2010
    • Marked as answer by KeFang Chen Friday, February 18, 2011 7:12 AM
    Monday, February 7, 2011 10:42 PM
  • Hi,

    why don't you create the document set first and then uploade the files to the documents using multiple document upload ? This doesn't make it nessecary to change the content type from folder to document set.
    Another thing you should mention is that you cannot have nested document sets like you have it in a folder based structure. Document Sets can contain folder but they cannot contain document sets.

    As Razi bin Rais mention you cannot easy change becaus it will have the content type assign to the previous folder but the schema of the folder won't be update. Another thing you can do is make a bulk upload using Explorer View or Mulitple file upload (this can handle folder upload too) and then move the files to the specified document-set using mange content and structure.

    Hope this helps
    Kind regards
    Stefan


    http://www.n8d.at/blog
    twitter: n8design
    Microsoft Community Contributor 2011
    MCTS - SharePoint / WSS Configuration and Development
    • Marked as answer by KeFang Chen Friday, February 18, 2011 7:12 AM
    Monday, February 7, 2011 11:17 PM
  • There is a MS bug that causes Folders to only partially convert to doc sets via a content type change.  Apply the following fix and enjoy! :)

    http://rrfreeman.blogspot.com/2011/05/sharepoint-folder-to-document-set.html


    RobertRFreeman
    Saturday, May 28, 2011 1:02 AM
  • This is absolutely possible - I'm doing it right now for our legal department.  I hate folders in Sharepoint (preferring metadata instead), but in the legal world, folders are synonymous with "folios" or "case files" - which is EXACTLY the functionality that document sets provide.  Here's how I implemented it.  Note that this is PER LIBRARY.

    IMPORTANT:  Before you start, you will need the fix to the SP 2010 bug that only partially converts folders to document sets when you change the content type (like @RobertRFriedman mentioned in his reply).  You can get it on Codeplex:  http://foldertodocsetfix.codeplex.com/

    Install that and activate it for your site collection before continuing.

    1.  "Make New Folder command available" on the library (in the Library, click on Library Settings on the Ribbon, then "Advanced Settings", then check "Make New Folder Command Available".

    2.  Ensure that the library can allows management of content types.  (In the same "Advanced Settings" screen, check "Yes" under "Allow management of content types".

    3.  Add the Document Set content type (or one derived from Document Set) to the library under Library Settings.

    4.  NOW... you must create a new workflow using Sharepoint Designer 2010.  You need to add a LIST workflow, tied to the appropriate document library.  The workflow has two parts:

    1. A condition that checks if the Current Item's Content type is "Folder".
    2. If it is, set the current item's "Content Type ID" to your document set content type (which should be "Document Set" if using the default).

    (Hopefully, you know how to use SP 2010 to do this... if not, please post and I'll provide detailed instructions)

    5.  Ensure that this new workflow fires automatically on an added item.

    6.  Save and publish your workflow.

     

    That's it!  Now, whenever you drag a folder into the library, or create a new folder, the workflow will convert it to a document set!

    And the cool thing... the files UNDER the folder become files in a document set!

    ONE BIG NOTE:  The files will come over as the default content type in the document set (which, OOTB is "Document").  If you want something else, you'll need to change that in the Document Set settings for the Document Set content type that you created.

     



    • Proposed as answer by Bill_Richardson Wednesday, November 2, 2011 6:32 PM
    • Edited by Bill_Richardson Wednesday, November 2, 2011 7:03 PM Change document type to Content type in 4.1.
    Wednesday, July 27, 2011 5:26 PM
  • Bill

    I hope its not to late. Just stumbled on this article.

    Can you provide me with instructions on how to achieve part 4?

    1. A condition that checks if the Current Item's document type is "Folder".
    2. If it is, set the current item's "Content Type ID" to your document set content type.

    Thanks


    nando

    Wednesday, November 2, 2011 6:23 PM
  • Nando,

    Do you have any experience using Sharepoint Designer 2010?

    This should start you out:

    http://www.sharepoint-videos.com/sp10creating-a-workflow-on-a-list-using-sharepoint-designer-2010/

    Then, the action in step 2 would just set the current item's "Content Type ID" to "Document Set" if you're using the default Document Set content type, OR the name of your custom Document Set Content Type if you've created your own.

    Bill


    Wednesday, November 2, 2011 6:31 PM
  • i do.

    Here is what i used. If you used a different approach let me know 

    Condition - If the file Type is Folder

    Set Content Type ID to Document Set

    Wednesday, November 2, 2011 6:37 PM
  • No, that's exactly the way to do it... if you're using the default Document Set.  Otherwise, you just use the name of your custom Document Set Content Type.

    Bill

     

    Wednesday, November 2, 2011 6:41 PM
  • For some reason the folder is still a folder. 

    I had to type in the word "Folder" after file type. Is there another trick to this? i did install the codeplex wsp to change the folder to document set.

    Wednesday, November 2, 2011 6:51 PM
  • The condition shouldn't be on file type it should be the CurrentItem:Content Type = "Folder"

    That's probably your issue.


    Wednesday, November 2, 2011 7:04 PM
  • That totally worked. You were right it was my syntax. Thanks a bunch.
    Wednesday, November 2, 2011 7:14 PM
  • No problem - I hope they update this thread with my answer as the correct one.  I don't think the other two are correct - it's obviously quite easy to do this, don't know why answers saying it can't be done are marked as the "Answer".

    Seems to me, all you need to do is follow my instructions, and then import files from a fileshare via the Document Explorer view - that should fix the problem.

    Wednesday, November 2, 2011 7:24 PM
  • For folks reading this post, I would recommend that you use Stefan's approach.  The other 'proposed' answers below are incomplete solutions and will cause sorting issues in your solutions.

    I am not sure if the code changes below are supported or not, but they are difficult to debug and you should not implement them.


    Shannon Bray - MCM, MCT, MCPD, MCTS, MCITP
    Planet Technologies
    Blog || Colorado SharePoint

    Monday, April 30, 2012 8:24 PM
  • Shannon - can you elaborate on that?  What do you mean when you refer to "sorting issues"?

    Stefan was correct in stating that Document Sets can't hold other document sets - and that would be a reason to not use the "explorer view" to move over hierarchies - but manually creating the folders as document sets before uploading files and folders into those document sets might not be a good solution as well.

    The only "proposed answer" was mine, so I guess I'm safe in assuming you were directing your response to my posts.  But if you'll read the thread again, I think you'll see that I wasn't actually addressing the original poster's challenge, but rather the moderator (Razi bin Rais), who stated that he didn't believe that you could get a document set simply by changing the content typ, which was then erroneously marked as the answer by another moderator.

    Monday, April 30, 2012 9:28 PM
  • @BillRichardson - Carefully read about side effect (pointed by Stefan) when you change the content type from Folder to Document Sets. Also this thread is more than year old so its possible that certain CU might have fixed these side effect(s) but generally changing content type like that should be avoided.

    PS: If you think this particular topic interest you feel free to start a new discussion around it as a separate thread so more people can participate in it.


    Microsoft SharePoint MVP |http://razirais.wordpress.com| MCT| MCPD SharePoint 2010 Developer| MCITP SharePoint Administrator 2010

    Tuesday, May 1, 2012 12:01 AM
  • I'm not sure what he meant by "becaus it will have the content type assign to the previous folder but the schema of the folder won't be update".  I've created a content type of "Legal Document Set' based on a "Document Set', with the appropriate schema.  When my workflow fires, it changes the Content Type ID from "Folder" to "Legal Document Set", and the result is a document set with the correct schema.

    It may be that Stefan did not investigate the fix to the bug that RobertRFreeman spoke of.  Without that fix, a form won't complete convert to a document set (or any other content type derived from Document Set).  However, with the fix, it works perfectly for me.

    I really do hope that the recent CUs have fixed this, though I haven't seen anything in the release notes to make me think it so.

    I don't really want to start a separate discussion - I just felt that it should remain in this thread in the interest of thoroughness.  However, if I (or anyone else) does start a thread on this, we should simply reference it from this thread.  I'd hate to lose this discussion.

    Tuesday, May 1, 2012 12:52 AM
  • Hi Bill 

    This is wonderful solution

    I did this however i get a message in documents set "Update the Document Set"

    Do you know how to solve this?

    Nehal

    Tuesday, November 17, 2015 3:15 PM