When you create a document library in SharePoint, the two properties that are highly visible to the end user is the Name and the Website URL. The name is what the document library is called and URL is the obviously the URL of the library .
Normally both of these are the same. i.e. if you name your library test, then your URL is usually http://sharepointsite/test
The problem is what if you need to rename your library (or you made a spelling mistake).
For example, instead of naming my library “Test Rename”, I called it “Test Renme” here.
So the document library’s name is set to “Test Renme” and the URL is set to "http://intranet/Test%20Renme”.
Now I need to go and edit these two properties and correct my mistake. Obviously the next step is to go to the document library properties and change this, Right??
Well in SharePoint 2010, there is not easy way to change the website URL property. You can change the name as many times as you want, but the URL remains what you created initially.
Here, if I use the in built UI to rename the library, the name changes, but the URL as you can see in the below image stays the same.
So basically, if you made a mistake naming your library when you created it, you are pretty much stuck with the mistake being a part of the URL, if you need to use only the inbuilt UI.
To change the UI you need to use SharePoint Designer 2010. Also though there are a few posts online on how to do this, most of them just say use SharePoint Designer and rename and it is not that simple. The whole point of my writing this post is because, it took me quite a while to figure out the right way to do this.
In SharePoint Designer you can open the library and use the Rename button in the ribbon and this does exactly what the inbuilt UI does and just changes the name and it has no impact on the URL.
The way to change the URL is to first not open the library, but rather for to the All Files option.
This gives you access to all folders in your site.
In this view select the library you want to change and right click on it. Then choose the Rename option in the menu.
This will bring up a dialog for you to enter the new name. Once you ok the dialog, you will get a progress indicator popup and then your URL gets renamed.
What happens behind the scene is important. When you rename this way, what happens is that a new library with the new name is created and all items are copied from the existing library to the new one and then the existing library is deleted. Why is this important? Well the number of items in your current library decides how long the rename takes. More items and bigger items increases the overall time. So it is better you get all your renaming done before you really start using your library.
Also, I am not sure if any parts of the library (history, workflow etc.) go missing on doing this (a bug maybe??). So if you rename a existing production document library, I would recommend you check related data to make sure that everything is fine (and obviously make a backup before you rename).


Comments