문제

I am trying to update the name of a folder with the code below:

folder.Item[SPBuiltInFieldId.Title] = "New folder name";
folder.Item.SystemUpdate();

I can see that the Title field of the item associated with the folder is changed. But on the default view of the document library, under the Name column I still see the old folder name.

What is the proven way of changing a folder name in SharePoint?

Thanks.

도움이 되었습니까?

해결책

You need to update the Name field instead of the Title field.

folder.Item[SPBuiltInFieldId.Name] = "New folder name";
folder.Item.SystemUpdate();

다른 팁

You have to update the Name property of the SPFolder object.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top