SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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?


share|improve this question
up vote 2 down vote accepted

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

folder.Item[SPBuiltInFieldId.Name] = "New folder name";
share|improve this answer
Name field is read-only. – Élodie Petit Dec 1 '11 at 12:26
What happens if you try to do it like this: 'folder.Item["Name"] = "New folder name";' – Elio Struyf Dec 1 '11 at 12:35
It works! Thanks :-) How did I miss that! – Élodie Petit Dec 1 '11 at 12:45

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

share|improve this answer
It is read-only and cannot be updated. – Élodie Petit Dec 1 '11 at 12:27
See the code posted by user above. That should work...l – Ashish Patel Dec 1 '11 at 12:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.