SPFile.MoveTo Method (String, SPMoveOperations, Boolean)

Moves the file to the specified destination URL.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Sub MoveTo ( _
    newUrl As String, _
    flags As SPMoveOperations, _
    requireWebFilePermission As Boolean _
)
'Usage
Dim instance As SPFile
Dim newUrl As String
Dim flags As SPMoveOperations
Dim requireWebFilePermission As Boolean

instance.MoveTo(newUrl, flags, requireWebFilePermission)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public void MoveTo(
    string newUrl,
    SPMoveOperations flags,
    bool requireWebFilePermission
)

Parameters

  • requireWebFilePermission
    Type: System.Boolean

    Whether the move operation requires the Add and Customize Web Pages permission when the extension of the moved file has been changed and the extension of the destination URL belongs to WebFileExtensions of the web application. The default value is true.

See Also

Reference

SPFile Class

SPFile Members

MoveTo Overload

Microsoft.SharePoint Namespace