How to Rename SharePoint Folder Programmatically?
To rename a folder in SharePoint 2010, Navigate to the library where the folder exists. Click on "Edit Properties"
Provide new name to the folder and click on "Save" button.
How rename SharePoint folder programmatically?
To rename a folder in SharePoint document library programmatically, using C# object model code:
Rename SharePoint Folder using PowerShell:
This code renames folder at given path. Unlike Lists & document libraries, Folder URLs will change when you give a new name to it.
Provide new name to the folder and click on "Save" button.
How rename SharePoint folder programmatically?
To rename a folder in SharePoint document library programmatically, using C# object model code:
FolderPath = "http://YOUR-SharePoint-Site/sites/sales/documents/Invoices"; SPFolder TargetFolder = SPContext.Current.Web.GetFolder(FolderPath); Target.Item["Name"] = "Invoices 2014"; Target.Item.Update();
Rename SharePoint Folder using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get the Web $Web = Get-SPWeb "http://sharepoint.crescent.com/sites/branding/" #New Name for the Folder $NewFolderName = "Icons"; #Get the Folder to Rename by its path $folder = $Web.GetFolder("http://sharepoint.crescent.com/sites/branding/DesignDocuments/Symbols"); if ($folder.Exists) { #Set the New Name and Update $folder.Item["Name"] = $NewFolderName; $folder.Item.Update(); }
This code renames folder at given path. Unlike Lists & document libraries, Folder URLs will change when you give a new name to it.
How to Rename SharePoint Folder Programmatically?
Reviewed by Salaudeen Rajack
on
6:40 PM
Rating:

how change folder field "TEAM" value "team 1" same and subfolder if folder name is like ABC
ReplyDeletehow to rename using CSOM?
ReplyDeleteHere is the CSOM PowerShell script to rename folders in SharePoint online: How to rename a Folder in SharePoint Online using PowerShell
Delete