Share via


BMOVE Method

Topic Last Modified: 2006-06-13

The WebDAV BMOVE Method is similar to the MOVE Method but it is used to move one or more target resources to a destination.

Unlike the MOVE Method, the BMOVE Method contains a request XML body which must contain at least one target XML Element, and may optionally contain a propertybehavior XML Element.

A BMOVE Method request includes a Destination Header that specifies the Uniform Resource Identifier (URI) of a collection. By default, each target is moved into the collection specified by the Destination Header. Alternatively, the request may explicitly specify a destination for a specific target. To specify a destination for a given target, a target XML Element must contain exactly one href XML Element and one dest XML Element.

The responses for the BMOVE Method are similar to the responses for the MOVE Method, but each response node may contain a location element to specify the location of each resource after the move. Successful responses that did not require the server to change the name of the resulting resource are omitted from the response.

The BMOVE Method is not supported in transactions.

Note

See Authentication and Security Using WebDAV for more information.

The list of WebDAV Protocol Status Codes in the following table is not comprehensive. For information about 500-level status codes, see WebDAV Status Codes: 500s.

Status Codes

Status Code Meaning

201 (Created)

The resource was moved successfully and a new resource was created at the specified destination URI.

204 (No Content)

The resource was moved successfully to a pre-existing destination URI.

207 (Multi-Status)

Multiple response codes to be found in XML body.

403 (Forbidden)

The source URI and the destination URI are the same.

409 (Conflict)

A resource cannot be created at the destination URI until one or more intermediate collections are created.

412 (Precondition Failed)

The Overwrite header is "F" and the state of the destination resource is not null.

423 (Locked)

The destination resource is locked.

424 (Method Failure)

The method cannot be supported in a transaction.

502 (Bad Gateway)

The destination URI is located on a different server, which refuses to accept the resource.

Example

The following example illustrates a WebDAV BMOVE Method successfully moving file1, file2, and file3 to the destination URI.

Request

BMOVE /pub2/folder1/ HTTP/1.1
Destination: https://www.contoso.com/pub2/folder2/
Host: www.contoso.com

<?xml version="1.0" ?>
<D:move xmlns:D="DAV:">
   <D:target>
          <D:href>file1</D:href>
          <D:href>file2</D:href>
          <D:href>file3</D:href>
   </D:target>
</D:move>

Response

HTTP/1.1 201 Created
Location: https://www.contoso.com/pub2/folder2/

See Also

Other Resources

MOVE Method
Allow-Rename Header