23 comments on “Move a file to a document set

    • to deploy:

      you can use powershell to install the solution
      and then you do the deployment through the Central Administration – Farm Solutions

      to enable:
      this is done at site features level by activating the following feature : Sam.MoveToDocumentSet Feature

  1. I’m no SharePoint expert, but it looks to me like a document set is very similar to a folder, so I connected to the doc library from explorer, and copied the documents into the document set. It seems to have worked.

    • Hello,

      My article explicitly said that a Document Set is derived from a SPFolder, so it is a kind of special folder.
      The custom action I have developed shows how to move easily document around Document Set from the Web Interface.
      If you want to move documents using the webdav interface (open in explorer), it is your call but I do not see what does it have to do with my article…

      Gilles

  2. Thanks Gilles!

    The files doesn’t seem to be in Skydrive anymore… If I could get a copy I’d be really greatful.

    -Robin

      • “You will find the Visual Studio Solution here.”

        When I click the link I’m led to a Skydrive page, saying:

        “This item might not exist or is no longer available.
        This item might have been deleted, expired, or you might not have permission to view it. Contact the owner of this item for more information”

        –Robin

  3. Hi Gilles

    This is a really good solution. I can see a couple of instances that this would be useful.

    I do have a question however is there a way you know of that you can do this for more than one document at a time.

    Lee

  4. Hi Gilles,

    1st up thanks for the solution ans it really is a great idea.

    I have deployed the solution>activated on the site features and the option show up on the documents but the drop down on the “Choose a document set” is inactive.

    Did I miss anything? Please help.

    • Hello,

      The dropdown is inactive when there isn’t any document set in the current document library. Using my feature, you can only move to an existing document set, not create a new one and move the docuemnt inside. You have the full Visual Studio 2013, you could implement that if it is what you are looking for.

      • Thanks for your quick response Gilles,

        I went back to make sure as per your response and here’s a screenshot for your reference.

        Please let me know if you have any questions. Appreciate your time and efforts.

        Regards,
        Chandra

      • I have just tested the solution (the SharePoint 2013 one) in a brand new site and it works for me.

        for your information the dropdown is populated with all the items of the document library which have a ContentType name equal to the localized string of the Doc Set content type name (“DocSet_CT_Name” in dlccore)

        you have the source code, you can debug it

  5. Do you know of a programmatic way to move the documents? Say you have a 3rd party application that can only import into a Document Library and/or folders but it associates all the Meta Data that would correlate to a document set. So I would want a workflow that would receive a document and move it to a Document set with matching Meta data.
    Your solution is great but having the systematic way to move content from a folder to a set would be fantastic.

  6. I’m attempting to download the solution but receiving a Service Unavailable error page, I’m assuming that OneDrive or what have you may have some type of interruption (status page seems to show everything is good though), but just wanted to check to confirm and if the file is gone, is it hosted elsewhere now?

    • Sorry about that Robert, not sure what happened though! With all the new updates on OneDrive, the old links stopped working maybe? Hopefully it is not that because that would be sad.

      Anyway I updated the links with brand new ones.

      Regards,

  7. Any way to get this working with Sharepoint online? I assume this is a farm solution .wsp file and that’s why it doesn’t work since I get the following error. Is there an easy way to convert it to a sandboxed solution?

    This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution ‘f06c453e-bef9-4f28-88fc-d9bf510335fb’ failed validation, file manifest.xml, line 6, character 4: The element ‘Solution’ in namespace ‘http://schemas.microsoft.com/sharepoint/’ has invalid child element ‘TemplateFiles’ in namespace ‘http://schemas.microsoft.com/sharepoint/’. List of possible elements expected: ‘ActivationDependencies, FeatureManifests’ in namespace ‘http://schemas.microsoft.com/sharepoint/’.

  8. What would it take to convert this to a sandboxed solution so it could be used with SharePoint Online? Currently it will not activate citing an error with the “templatefiles” stanza in the manifest.xml.

  9. THANK YOU! This works perfectly!!
    Question. I have a document set content type with a different name, and I have content queries on other pages filtering by this name. I can go through and change the filter, but I was wondering, how do I change the code to reflect the name of my custom doc set?
    I’m new to development and I don’t know where to start. I have Visual Studio 2015 (free version), and SharePoint Designer 2013. I tried opening the project in VS but it gave me an error. Although I might’ve tried opening the wrong file.

    I don’t need a step by step, but could you point me in the right direction?

    Thank you again for providing this. You should see what I came up with to accomplish the same thing (workflows on workflows on workflows).

    • You need to open the sln file with Visual Studio. You should have the Office Dev Tools to support the SharePoint solution.
      The code you want to modify to get your custom doc set, you will find it in the ExtensionsMethods file, the method is called GetDocumentSets.

      Good Luck

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s