1

So I am trying to create a document library with a large folder structure, 13 main top level folders and 20 subfolders, all of which fit inside the 13 main folders. As an example, for one folder we have titled "estimates", the subfolders break down the type of estimate to things like "SD estimate" or "CD estimate".

I have created a content type for each of the folders. Continuing the above example, the estimate content type i created is a child of the document content type. Then, CD estimate would be a child of estimate. Now that they are all created I would like to make it so that if a file or document is added to the folder, it changes the content type of the file to the content type associated with that folder. So, if I add a document to CD estimate, I want a workflow to run that changes the content type of the document from the current content type to the content type CD estimate.

I will be doing this for multiple document libraries, each with the exact same folder structure but assigned to different projects. Is there any way to have something run on each of the document libraries and change the documents in each folder to the right content type? I have SharePoint Designer and Visual Studio and I am fairly new to sharepoint. any advice is happily welcomed, but keep in mind I have not a clue how any of the powershell or actual code editing works or where to even put the code.

2
  • this seem something that would benefit from switching from folders to actual Document Sets. Have you by chance considered this option? A document set can define a list of allowed content types, so user shouldn't be able to insert document of a different CT (or at least, they aren't without abusing a know bug) Commented Mar 4, 2016 at 18:59
  • Well we aren't worried about the users defining the content types, moreover that the documents are of the correct content type based on the folder they are in. The users are going to be SharePoint illiterate and so we just want a workflow that changes the CT whenever something is added. Its more meant for being able to search the website by content type Commented Mar 4, 2016 at 21:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.