Hot answers tagged

35

You cannot use the following characters in file/folder name: Tilde (~) Number sign (#) Percent (%) Ampersand (&) Asterisk (*) Braces ({ }) Backslash (\) Colon (:) Angle brackets (< >) Question mark (?) Slash (/) Plus sign (+) Pipe (|) Quotation mark (") There are also restrictions about the positition of a character in a file/foldername: You ...


18

~, #, %, & , *, {, }, \, :, <, >, ?, /, |, " above special character is not allowed for files/folder.. you need to replace these characters for create folder or files..


12

How to create Folder (including nested) via CSOM in SharePoint /// <summary> /// Create Folder (including nested) client object /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> /// <param name="fullFolderPath"></param> /// <returns></returns> public static Folder ...


11

This took forever to figure out, but of course it is simple once you got it. Instead of pasting a bunch of code, here is the context and then the raw HTTP POST request that I ended up with. The documentation is actually right here: http://msdn.microsoft.com/en-us/library/dd962796(v=office.12).aspx Syntax for the slug header is as following: /<...


11

Run this code. I have taken "filename" as a folder - you can replace it with any folder name that you want. ClientContext cxt = new ClientContext("http://win-8c97ll22qqc:100/sites/dev"); List list = cxt.Web.Lists.GetByTitle("Documents"); cxt.Load(list); cxt.Load(list.RootFolder); cxt.Load(list.RootFolder.Folders); cxt.Load(list.RootFolder.Files); cxt....


9

I would suggest you create different content type or use the tagging feature to organize the items. Check this for the list of Pros and Cons http://social.technet.microsoft.com/wiki/contents/articles/16166.sharepoint-2013-using-folders.aspx Folder vs Metadata SPS 2013 search makes it easy to find worthwhile files and list items with or without any added ...


8

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 SPD2010 workflow and use the Update Item action to change the path and name of the document. After inserting the update list item action click on the "this list" ...


7

See SharePoint Document Library List View Web Part with Clickable Breadcrumbs Excerpt from article: The first step is to create a text file that will contain the javascript necessary to generate the clickable breadcrumbs. I called my file LibraryViewBreadCrumbs.txt. Insert the following javascript text in to the file. <script type="text/...


7

SP.Folder.name property is read-only and hence it could not be used in update operation. How to rename Folder using SharePoint 2013 REST The following example demonstrates how to rename Folder using SharePoint 2013 REST API: function executeJson(url,method,additionalHeaders,payload) { var headers = {}; headers["Accept"] = "application/json;odata=...


7

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 file extension. I assumed including so foo.doc.files would not match but foo.files.doc would. ^(?![\._]|.*(?:\.|\.files|_files|-Dateien|_fichiers|_bestanden|...


7

SharePoint contains a hidden Site Column called ItemChildCount. This Site Column stores the calculated number of child items that the folder contains. Note: It does not include the number of subfolders in this count nor does it work recursively and pick up the item counts of subfolders To add the Item Child Count, edit the desired view on your ...


7

You could utilize GetItems method and specify the following query: <View Scope="RecursiveAll"> <Query> <Where> <Eq> <FieldRef Name="FSObjType" /><Value Type="Integer">1</Value> </Eq> </Where> </Query> </View> to return all ...


7

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 the server due to GetItems method call): /_api/web/Lists/GetByTitle('Title of your doc. lib.')/GetItems(query=@v1)?$expand=Folder&$select=Title,Folder/...


7

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.Lists.Event.Name); var item = list.GetItemById(eventId); ctx.Load(list, d => d.Title, d => d.RootFolder.Name, d => d.Id); ctx.Load(item, d =&...


7

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.ContentTypeId.ToString().StartsWith("0x0120D520")


6

How to get current Folder client object via CSOM (JavaScript) function get_currentFolder(OnSuccess,OnError){ var context = SP.ClientContext.get_current(); var web = context.get_web(); var currentFolder = web.getFolderByServerRelativeUrl(decodeURIComponent(ctx.rootFolder)); context.load(currentFolder); context.executeQueryAsync( ...


6

The objects you get from $list.Folders are SPListItems not SPFolders so the ListItems property gives the Lists ListItemCollection not something for the folder. To get the SPFolder you have to access $folder.Folder. If what you're working with is a document library, then it's easy just access $folder.Folder.Files and you'll get the files in the SPFolder, ...


6

I found the solution myself and thought I would share the solution in case someone else encounters a similar challenge. By using the "Update Item" functionality in SPD you can assign the name of the folder to which you would like to move the document in the "Path and Name" field, simply by adding the foldername before the name of the file. (e.g. in my ...


6

You most likely mean a folder inside a document library, because you cannot add a folder to a site that is available for end-users. In order to add a folder inside a document library, you need to open up the ability to add a folder to the document library. Go to the document library where you want to add a folder Go to the Library Settings Advanced Settings ...


6

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 make it create all necessary parent folders in the heirarchy) Now that you have a folder that you want to share, you can turn it into a shared folder using ...


5

SharePoint doesn't support multiple versions of folders in Lists and Libraries.


5

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=((Path to target folder)) to this URL. The ?RootFolder=((...)) can be found by navigating to the target folder in the document library, then checking the ...


5

Use windows explorer, in 2010/2013 it's found on the library tab of the library (and only works in IE on windows)


5

Sure, SP.Web object in SharePoint 2013/Online exposes the following methods: 1) Web.GetFolderById REST endpoint: /_api/web/GetFolderById('<folder unique id>') 2) Web.GetFileById REST endpoint: /_api/web/GetFileById('<file unique id>')


5

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.html UPDATE Here is the sample PowerShell code. I haven't however tested it: $web = Get-SPWeb http://yoursite $list = $web.Lists["YourList"] $docSetName = "...


5

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=Folder/ItemCount&$filter=FSObjType eq 1


5

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 there that you can look at such as the "File Share Library" by Bamboo Solutions or I believe AvePoint also has a solution. On the other hand, if you are asking ...


5

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 · SharePoint Experiences Team ADMIN SharePoint Experiences Team (Admin, Microsoft SharePoint) responded · May 10, 2016 Thanks for your feedback! Just a note to let you ...


5

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, you're much better off using the Client Object Model in this case. See: SP2013 : Create a list item inside a folder August 2020 Update: In the three years since ...


4

Yet another version how to create a folder including nested folders using SharePoint SSOM. How to create nested Folder using SharePoint SSOM internal static class SPFolderExtensions { /// <summary> /// Ensure SPFolder /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> ...


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