MOVE Method

MOVE Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. The WebDAVMOVE 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.

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.
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.

Example

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

Request

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

Response

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

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

This topic last updated: December 2002

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.