Should you use folders or not?
- Scale by partitioning a document library
- To apply permissions more effectively
- To use location based default metadata properties. You can set default metadata values for every folder. In ‘Library settings’, ‘Column Default Value settings’, you can set defaults on all of you subfolder starting from the root(inherits by default). Also check out the Location-Based Metadata defaults feature: http://msdn.microsoft.com/en-us/library/ee557925.aspx .
- Folders are great for finding info when you know your way around the folder structure.
- Folders improve the efficiency of data access because the creation of a folder leads to the creation of an internal index.
- Folders work great in scenarios where file shares are used. In a file share, the only way of classifying files is through filename and folder structure. In SharePoint we have a choice, and you could consider using both folders and metadata together.
- Folders work a lot better with Windows explorer views. In a flat structure you see everything and nothing in one view….
- Document sets inherit from the folder content type. So, even if you resent the idea of using folders, you’re probably still a fan of using them without recognizing it (that is, unless you deny the usefulness of Document Sets).
- You can use folders while still removing them from view. If you don’t want to use the folders all the time, create a view that does not display the folders. In ‘Library settings’ – ‘Create View’ – ‘standard view’ – under ‘Folders’ – you have a choice of ‘show all items without folders’. This will turn your folder based structure into a flat library.
- Folders is a great way to introduce metadata to old school change-reluctant users, using default folder values will allow you to add metadata without the user noticing.
- Folders save you time in migrations if you can copy an existing fileshare folder structure.
- If you don’t know the folder structure, finding info is easier using metadata based navigation.
- Folders increase URL length, which breaks when it pops above around 260 characters. See: http://www.loisandclark.eu/Pages/limitsurl.aspx
- Folders don’t look great when you put a Library web part on a page (there’s no navigation back up to the parent folder).
- Folders without metadata, can cause you to ‘loose’ documents.
Additional comments about Security…
You can have several document libraries in one site, that is also a way to separate security/permissions. There is a commercial third party tool available for SharePoint that allows you to set permissions by the use of metadata. So, if you’re interested in that, you can investigate further.
Try and keep the folder hierarchy as flat and minimal as you can, but don’t limit yourself to metadata views exclusively. Mix the opportunities for the best results! If you choose to depend on metadata only, you should separate sets of documents by putting them in its own websites and set the permissions on this level. If you need a more granular rights management, folders/libraries are the easier way to do it.
For an up to date version of this discussion, bookmark the TechNet Wiki page at http://social.technet.microsoft.com/wiki/contents/articles/16166.sharepoint-2013-best-practices-using-folders.aspx
Here’s an overview of SharePoint 2013 versions.
- Beta 1 Preview 15.0.3612.1010
- Beta 1 refresh 15.0.3919.1011
- Beta 2 interim 15.0.4107.1000
- Beta 2 public preview 15.0.4128.1014
- Escrow / Release Candidate 15.0.4420.1006
- RTM 15.0.4420.1017
If you need to look it up, keep track of this list at http://social.technet.microsoft.com/wiki/contents/articles/12438.sharepoint-2013-best-practices.aspx#Development , where the list will also be updated.
It’s a simple idea to want to be able to execute PowerShell scripts from code, as you can see in http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/318429d9-fc63-479b-a20a-62883c9132fa. The code is something similar to this:
PowerShell ps = PowerShell.Create();
string scriptText = “Add-PSSnapin Microsoft.SharePoint.Powershell Enable-SPFeature -Identity PublishingSite -URL ” + siteAddress + ” -Force”;
Runspace runspace = RunspaceFactory.CreateRunspace();
Pipeline pipeline = runspace.CreatePipeline();
Collection<PSObject> results = pipeline.Invoke();
StringBuilder stringBuilder = new StringBuilder();
foreach (PSObject obj in results)
In the blog post http://blog.karstein-consulting.com/2011/08/04/sharepoint-powershell-timer-jobs-run-powershell-scripts-in-sharepoint-timer-service-context/ this idea is taken to the next level by allowing you to run PowerShell scripts in the SharePoint Timer Service context. Really useful, and elegantly done!
When you apply enough pressure, every application you or somebody else builds has a point where it breaks. I call this point the pressure point. PressurePoint Dragon for SharePoint 2013 will help you find this point, the follow-up of the generic PressurePoint tool: http://gallery.technet.microsoft.com/PressurePoint-Dragon-for-87572ee1