Tag Info

New answers tagged

1

Ok, I got it ! I need to do this : $myfolder = $library.Folders | ?{$_.Name -eq "My Folder"} $sBytes = $Item.OpenBinary() $newfile = $myfolder.Folder.Files.Add($myfolder.Url + "/" + $Item.Name, $sBytes, $true) And this works.


1

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"] = ...


0

http://channel9.msdn.com has a demo for you with explanations from a Microsoft Premier Field Engineer Lori Gowin: Content Types, Metadata and You. In a nutshell, a Default Column Values setting in Document Library settings appears exactly for that when you activate the Metadata Navigation and Filtering, was it? feature. Also take a look at this blog that ...


0

In SharePoint 2010 or later, the Folder content type has ItemChildCount and FolderChildCount columns that can be sorted or filtered by in a view or by an SPQuery <Where/> clause. That way you don't have to write any PowerShell at all to find the empty ones - just look for 0 in both columns, that's all. Later on you can write a simple JavaScript do ...


2

This one provides a little more info than Mike's (again, replace web URL and list name). I'm outputting to a text file because you said there's 32000 folders, I doubt you want to scroll through 32000 lines of window buffer: $TestSPSnapin = get-pssnapin | ? { $_.Name -eq "Microsoft.SharePoint.Powershell"} if($TestSPSnapin -eq $null){ add-pssnapin -Name ...


0

Try this script, replacing the listname and weburl : Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $web = Get-SPWeb http://sharepoint/sitecoll/web $list = $web.Lists["List Name"] foreach($folder in $list.Folders) { if($folder.Folder.SubFolders -eq $null) { Write-Host Empty folder at ...


0

You can create SPItemEventReciver to copy new file from development site to public site.


1

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>')



Top 50 recent answers are included