Copy Method

See Also         Example         Applies To

Copies the specified object to a designated URL. 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.

Syntax

expression.Copy(DestinationUrl As String, UpdateLinks As Boolean, ForceOverwrite As Boolean)

expression   An expression that returns a WebFile or WebFolder object.

DestinationUrl   Required String. The target URL.

UpdateLinks   Required Boolean. Specifies whether links are to be updated during the copy process. True to update links.

ForceOverwrite   Required Boolean. Specifies whether to force a file overwrite when a file or folder is found with the same name. Set the argument to True to force a file overwrite.

Return Type

Void

Remarks

The Copy method only copies files or folders within the same web. You cannot copy across webs. However, you can use the SaveAs method for the PageWindow object to save a page that has its file currently located in one web to save the page to a file in another web. Or, you can use the Add method for the WebFile object to add a file that is currently located in one web to another web.