MOVE and COPY Sample Code

In this sample, we will introduce two more settings in the request header, Destination and Overwrite. We need the destination and source to be able to copy or move resources.

We also need to define what should be done if we have a resource with the same name. The default action will be overwrite, and we can change the default by indicating “F” for the overwrite value.

Listing 16.9 shows the sample code for copying the SPSLOCK.doc document from the /documents/marketing/ folder to /portal Content/resources/:

Listing 16.9. The Sample VBScript Code for the COPY Method of WebDAV Protocol
 Dim strServer Dim strWorkspace Dim strFolder Dim strURL Dim strUser Dim strPassword Dim DAVRequest strServer = "dianatr" strWorkspace = ...

Get Special Edition Using Microsoft® SharePoint Portal Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.