Moving and renaming (MOVE)

Use the MOVE method to move or rename files and directories within the Yandex Disk file structure.

Example: the lion.png file in the pictures folder is renamed to kitty.png.

MOVE /pictures/lion.png HTTP/1.1
Host: webdav.yandex.ru
Accept: */*
Authorization: OAuth 0c4181a7c2cf4521964a72ff57a34a07
Destination: /pictures/kitty.png
Overwrite: F

The Overwrite header can be set in order to prevent overwriting an existing file with the same name. The value "T" (by default) allows overwriting, and the value "F" forbids it. If the /pictures/ directory already has the kitty.png file, the request from the example will not be completed.

If the move or rename was completed successfully, the following response is returned:

HTTP/1.1 201 Created
Content-Length: 0