SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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 have placed a web part on the welcome screen of a document set. When i click the button i want to be able to rename the document set.

Has anyone accomplished this?

I can get reference to the current document set via SPListItem item = SPContext.Current.ListItem;
DocumentSet set = DocumentSet.GetDocumentSet(item.Folder);

//document set name set.Item["Name"] = "new name"; set.Item.Update();

the above couple lines seems to do something but i get an exception about not able to open folder

any ideas? ty

share|improve this question
up vote 2 down vote accepted

My guess would be that as the DocumentSet object derives from SPFolder,

you should use the same method to rename a folder than a document set

so something like

set.Item[SPBuiltInFieldId.Title] = newDsName;
set.Item.Update(); //or SystemUpdate(false)


you could use the MoveTo Method on the SPFolder Object

share|improve this answer

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.