This documentation is archived and is not being maintained.

MOVE Method

EWS Managed API

Topic Last Modified: 2006-06-13

The WebDAV MOVE Method is used to move a resource to the location specified by a request Uniform Resource Identifier (URI).

Only a Depth Header value of "infinity" may be included in a MOVE Method on a collection resource. A MOVE with a Depth Header value of "infinity" will result in the collection at the request URI, and all of its internal resources, being moved to the destination URI specified by the Destination Header. If no Depth Header is included in the MOVE Method, the Depth Header defaults to a of value of "infinity".

If a resource exists at the location specified by the request URI and the Overwrite Header has a value of "T", then the server performs a DELETE Method with a depth value of "infinity" on the destination resource. If the Overwrite Header has a value of "F", then the MOVE Method will fail.

Aa563490.note(en-us,EXCHG.80).gifNote:
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 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.

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)

Either the Overwrite header is "F" and the state of the destination resource is not null, or the method was used in a Depth: 0 transaction.

423 (Locked)

The destination resource is locked.

502 (Bad Gateway)

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

The following example illustrates a WebDAV MOVE Method successfully moving a collection to a destination.

MOVE /pub2/folder1/ HTTP/1.1
Destination: http://www.contoso.com/pub2/folder2/
Host: www.contoso.com

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