Hot answers tagged

8 votes

SP2010: Use Workflow to move library item into folder

I know this is an old thread, but after spending a good while looking about I found an OOTB SharePoint Designer 2010 solution for this problem. To move a document to a different folder create an ...
  • 81
7 votes

Which special Characters are not Allowed in SharePoint 2013\2016 Files\Folders?

Not to resurrect an old thread but I thought I would add my regex. One issue from KB905231 it is not clear if the prohibited file suffixes (i.e. .files or _files, etc.) are including or excluding the ...
7 votes

Retrieve folders and sub folders from document library by REST call

You could utilize GetItems method and specify the following query: <View Scope="RecursiveAll"> <Query> <Where> <Eq> <FieldRef Name="...
7 votes

Retrieve folders and sub folders from document library by REST call

Recently I answered a very similar question here. If you need all of the folders and subfolders (but no documents) recursively from a document library, that is what you should use (send it via POST to ...
  • 3,182
7 votes

Get sub folder from document library using SharePoint.Client.dll

Folders are items as well. Just get the item and load the folder property. using (var ctx = new ClientContext(Constants.SharePointUri)) { var list = ctx.Site.RootWeb.Lists.GetByTitle(Constants....
  • 1,605
7 votes
Accepted

How to tell if an Item is a SPFolder or DocumentSet (through code)

You can check if your item content type inherits from DocumentSet base content type that is 0x0120D520. Using C#: listItem.ContentTypeId.IsChildOf(new SPContentTypeId("0x0120D520")) or listItem....
  • 1,952
6 votes
Accepted

How to create a Shared Folder using Powershell and set permissions

here is the Create folder command: New-Item "C:\Shared" –type directory If you are creating multiple levels at once (like "C:\NewRootFolder\NewChildFolder\NewShared" you can add the –force switch to ...
  • 56.8k
6 votes
Accepted

Create folders in site pages - Possible?

It is possible but you have to enable folders in advanced settings in the library settings. Go to library in question > Library Settings > Advanced settings > Set 'Make "New Folder" command ...
5 votes
Accepted

Copy Document Set from 2010 to 2013

Set the DocumentSet.Folder.Item.ProgId to "SharePoint.DocumentSet". Right now it will be empty. See this for more information: http://www.sharepointnadeem.com/2011/08/sharepoint-2010-document-sets....
5 votes

Document Library WebPart open to specific folder

Adding to jkandiko's answer (which worked for me), If the URL of the page containing your document list web part is http://www.mySharePoint.com/SitePages/Home.aspx, append the text ?RootFolder=((...
  • 51
5 votes
Accepted

How to get ItemChildCount of DocumentSet (folder) using REST Api

You have to expand folder with $expand=Folder property and use ItemCount property of the folder like this: /_api/web/lists/getbytitle('your_list')/?items$select=ID,Title,Folder/ItemCount&$expand=...
  • 1,952
5 votes

With REST recursively retrieve file and folder directory structure

You are probably looking for FileRef property instead of (or in addition to) FileLeafRef property. FileRef property returns server relative file/folder url The following query demonstrates how ...
5 votes
Accepted

Connect Windows File Share with SharePoint Foundation 2013

If you are asking whether you can leave files in a file share and access them through SharePoint with the out-of-the-box features then the answer is no. There are however, 3rd party solutions out ...
  • 1,675
5 votes

Share folder with external users

This feature is yet not available in SharePoint, but product team has confirmed that they are working on this feature...below is comment from SharePoint User Voice forum WORKING ON IT · ...
5 votes
Accepted

How to add list item inside a folder using REST API

The REST API does not have complete support for folders - particularly when it comes to working with list items. While it's quite possible that there is a way to get this to work using the REST API, ...
  • 12.4k
4 votes
Accepted

Reserved folder names sharepoint online

The problem with the folder name "large_files" is that it ends with the string "_files". This is a reserved name for SharePoint Online. Scroll down here http://support.microsoft.com/kb/905231 and you ...
  • 554
4 votes
Accepted

SharePoint 2013 document library folder limitation

As per MSFT the limit of items in a Library (including folder) is 30M, that's mean if you have the 1 folder in your document library that can contain upto 30M items. But real Catch is the List View ...
  • 56.8k
4 votes

How to rename a folder via csom c# in SharePoint List?

You need to get the folder item. I don't think you can get the item directly from folder, but you can get it from the list. Example: public static void Rename(ClientContext ctx, List list, String ...
  • 7,405
4 votes

Adding a folder to a list using the REST API

According to Working with folders and files with REST the following example demonstrates how to create a Folder: url: http://site url/_api/web/folders method: POST body: { '__metadata': { 'type': 'SP....
4 votes

How to change content type of several folders (or subfolders) at once in a document library?

This can be done by using SharePoint administration Shell. You need to retrieve the list and loop through folders. If the folder content type is used, you replace the content type. # Get your site ...
4 votes

How to move list item into folder in Sharepoint online

Example: how to move list item into a folder via SharePoint JSOM API /** * Move ListItem * @param {SP.ListItem} list item * @param {string} targetFolderUrl - server relative url of folder where ...
4 votes
Accepted

How to create SharePoint Folders programmatically?

Considering Folder is at one level, and not folders inside folders. This code will work. Also make sure, in list setting -> Advance Settings -> Make "New Folder" command available? is set to Yes. ...
  • 3,548
4 votes
Accepted

Share folder with external users

No, it's not possible to share folders with "No sign-in required" at this moment. Anonymous links are available only for individual files or document. In future updates to Office 365 it will be ...
  • 30.6k
4 votes
Accepted

Folder in Folder Content Types

Create your own Content Type (MyFolder) which inherits from folder. Add your newly created MyFolder to your library, and you're good to go.
  • 25.5k
4 votes

Sharing folders on SharePoint and variance between "Shared with" and "Advanced"

'Shared With' contains permissions inherited from parent sites, SharePoint Groups, and AD Groups that have access. When you click advanced, it will show these groups and individual users that have ...
4 votes
Accepted

Remove permission on a folder by csom

this worked in my scenario. List companylibrary = clientContext.Web.Lists.GetByTitle(CompanyType); Web site = clientContext.Web; companylibrary.BreakRoleInheritance(...
3 votes

How to parse a SharePoint URL to get CSOM objects?

The following method demonstrates how to resolve ClientContext by request Url: private static bool TryResolveClientContext(Uri requestUri, ref ClientContext context, ICredentials credentials) { ...
3 votes

How to rename a folder via csom c# in SharePoint List?

Most probably in the first example the error occurs due to the line shown below: folderItem.Update(); ctx.Load(folder); //<-loading of folder that has been moved! ctx.ExecuteQuery(); Depending ...
3 votes
Accepted

How to prevent users from renaming a folder

Use ItemUpdating instead of ItemUpdated and set properties.Cancel = true. You can add optional message using properties.ErrorMessage. Edit: Now I see it's obsolete in SP2013 and you should use ...
  • 1,922
3 votes

Realistically manage folders in SP 2013

In SharePoint 2010, any SharePoint expert would recommend the use of metadata. That's how the system was designed to be used. However, there are now a few obstacles to using metadata: Adding files ...
  • 7,970

Only top scored, non community-wiki answers of a minimum length are eligible