WebFolder.Copy Method
SharePoint Designer Developer Reference |
Copies the specified object to a designated URL.
Syntax
expression.Copy(DestinationUrl, Unused, ForceOverwrite)
expression A variable that represents a WebFolder object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
DestinationUrl | Required | String | The target URL. |
Unused | Optional | Boolean | This parameter is unused. Setting it or not setting it has no effect on the functionality of the Copy method. |
ForceOverwrite | Optional | Boolean | Specifies whether to overwrite when a file or folder is found with the same name. Set the argument to True to force a file overwrite. Default value is False. |
Remarks
During the copy process you can choose to update hyperlinks or force a file overwrite if the specified object has the same name as the designated object.
The Copy method copies files or folders only within the same Web site. You cannot copy across Web sites. However, you can use the SaveAs method for the PageWindow object to save a page whose file is located in one Web site to save the page to a file in another Web site. Or you can use the Add method for the WebFile object to add a file that is currently located in one Web site to another Web site.
See Also