write

HTTP MOVE

WebDAV extension (RFC 4918) that moves a resource from the Request-URI to the Destination URI, equivalent to a COPY followed by a DELETE of the source. Preserves the resource across the rename or relocation.

MOVE /source HTTP/1.1  Destination: /target

Properties

Property Value / Meaning
Safe No - it relocates or renames the source resource.
Idempotent Yes - after a successful MOVE, repeating it produces the same layout (subsequent attempts typically 404 on the source).
Cacheable No - MOVE responses are not cached; caches should invalidate both URIs.
Has body Optional - propertybehavior XML is allowed but rarely sent.
Body in response Optional - usually 201 Created or 204 No Content; 207 Multi-Status when moving collections partially fails.

Examples

curl -X MOVE -H 'Destination: https://dav.example.com/final/name.txt' https://dav.example.com/draft/name.txt

Rename or relocate a single file.

curl -X MOVE -H 'Destination: /2026/' -H 'Depth: infinity' https://dav.example.com/2025/

Move an entire folder tree in one call.

curl -X MOVE -H 'Destination: /b.txt' -H 'Overwrite: F' https://dav.example.com/a.txt

Refuse the move if b.txt already exists.

MOVE /old HTTP/1.1\nHost: dav.example.com\nDestination: /new\nOverwrite: T

Raw WebDAV request replacing any existing destination.

Gotcha

For collections the Depth header must be infinity - the spec disallows Depth: 0 on MOVE with a collection. Locks on the source or destination cause 423 Locked, not 403 - handle both statuses when scripting.

Related methods

← All HTTP methods · HTTP status codes · HTTP headers