---
metadata:
  - name: generator
    content: Diplodoc Platform v5.44.0
alternate:
  - https://yandex.com/dev/disk/doc/en/reference/copy.md
  - https://yandex.com/dev/disk/doc/ru/reference/copy.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/disk/doc/en/llms.txt

# Copying (COPY)

Use the [COPY](http://www.webdav.org/specs/rfc4918.html#METHOD_COPY) method to copy files and directories within the Yandex Disk file structure.

> Example: the ##lion.png## file is copied from the ##pictures## folder to the ##animals## folder.
>
> ```yaml
> COPY /pictures/lion.png HTTP/1.1
> Host: webdav.yandex.ru
> Accept: */*
> Authorization: OAuth 0c4181a7c2cf4521964a72ff57a34a07
> Destination: /animals/lion.png
> ```
>
> 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 ##lion.png## file, the request from the example will not be completed.
>
> If copying was completed successfully, the following response is returned:
>
> ```yaml
> HTTP/1.1 201 Created
> Content-Length: 0
> ```
