SPBackupRestoreObject.Rename Method (String, String, String)
Renames a component that is being restored to a different place on the farm from where it was backed up.
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function Rename ( _
newServer As String, _
newLocation As String, _
newName As String _
) As Boolean
'Usage
Dim instance As SPBackupRestoreObject
Dim newServer As String
Dim newLocation As String
Dim newName As String
Dim returnValue As Boolean
returnValue = instance.Rename(newServer, _
newLocation, newName)
public bool Rename(
string newServer,
string newLocation,
string newName
)
Parameters
newServer
Type: System.StringThe name of the new server, which can be a null reference (Nothing in Visual Basic) if the restoration is to the same server.
newLocation
Type: System.StringThe name of the new location, which can be a null reference (Nothing in Visual Basic) if the location is not changing.
newName
Type: System.StringThe new name of the component, which can be a null reference (Nothing in Visual Basic) if the component is changing only location or server.
Return Value
Type: System.Boolean
true if the renaming is successful; otherwise, false.
Remarks
This overload of Rename() is really a special case of the more general Rename(String, String): it resets the value of one or more of three particular parameters: SPServer, SPLocation, and SPName.