docs/src/copy.md

Thu, 07 Sep 2017 18:42:51 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 07 Sep 2017 18:42:51 +0200
changeset 300
4e3769d4e782
parent 285
02d3e4b1245f
child 407
9505224d2fd2
permissions
-rw-r--r--

bug fix: file size > 2gb not loaded correctly from database

this bug results in large files always pushed, even if they are unmodified

---
title: 'dav copy'
---

**`dav copy [-pcO] [-L <lock>] <url1> <url2>`**

Creates a duplicate of the resource identified by *url1* at the location *url2*. All resource properties are copied. Currently *url1* and *url2* must be the same host. 

If *url1* is a collection, all children are copied.

If *url2* already exists, the command aborts, unless the `-O` option is specified.

The command uses a single WebDAV COPY request to duplicate the resources.
You may use file name and path decryption to copy and encrypted resource.
Please note that the copy will always be located at *url2*, so the top most collection name will not be disguised.
See [encryption][2] for more details on how encryption works.

**`-p`** disable file name and path decryption for *url1*

**`-c`** enable file name and path decryption for *url1*

**`-O`** overwrite the destination resource

**`-L <lock>`** use a lock token. See [dav lock][1]

[1]: ./lock.html
[2]: ./encryption.html

**Command alias:** cp

mercurial