If you want to write a custom application that you make the move to a site within the same Site Collection SharePoint provides us with a further technique much easier to use what is called "reparent" (which, I must say truth, I do not know how you can translate in Italian). Using this technique, we can move a SharePoint site within the same site collection without any backup or restore. To use it, we do not have to do is enter in our application the following code (after adding the reference library Microsoft.SharePoint.dll):
Code:
oldUrl string = "http://servername/DaSpostare/";
newURL string = "Peppe / Moved";
using (SPSite site = new SPSite (oldUrl))
using (SPWeb web = site.OpenWeb ())
{
web.ServerRelativeUrl = newURL;
web.Update ();
}
Bookmarks