--- sidebar_position: 8 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Copy object Copies a file or directory to the selected path `Function CopyObject(Val Token, Val From, Val Target) Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | Token | --token | String | ✔ | Token | | From | --from | String | ✔ | Path to the original object | | Target | --to | String | ✔ | Target path for the new object | Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
```bsl title="1C:Enterprise/OneScript code example" Original = "/New/pic.png"; Copy = "/New/pic_copy.png"; Token = "sl.u.AFl4exnJTfu3ktlAB5SL9c6m8KfDrkILdZu1-5pPnA-_58JlWcvj507ryybadExtpMlE1MsEb1PApmydF-aSTQ6CkBMGtumKCpUlIP9a0uJkHkIkaFyZKqeVj1SCGwJdpyihz_DqlOHPP_qpFaOj52r4RJeMVmESiHRLyG0lv1J_a4gk0hqu0ykbRDMYh1F9iOg7QzbHFlrj8b5HS5RJDMxAHSuuyNPBiR3Vnvd-MHtyHWTZs9k3krDn1Ytw6kMCMbnjEA2S4L0er3sryTh530nzCsFq4Z6IEObBeT1jIV6yoY9gdDM3WZkfbbVe2l0KUJ8xoS0v1Gv0_QU75Oa9bwQiGf2tnyzo6kGMO5r-x4nzHUEf0POg0s_715VXHU22mZNeNqbKJd6S5tcFxvv7SjNgqsuwXG7Lk7g0p25gecCJ_Epi34ZjaMVvTrR9WKSvNvZ8rtKyGpBXZrg3CLLdMsSjMUWxiW36RAFCBNBJRw73EnQ5BhzwhdeqUu3BF11KCawloX3I8nWOQm2c5f1OKgSAw0ZAPaHGySULVTf1NUe-z2c1Fq-ws_RedL0hnqbWV0v_VH07P3ioVrOOuAmt7QHHlS1h6HLWB1wmsw6IkJUWeCkWtNHgCKVzGNn-2JcnLrPOHhzWLeNi7oYWfzFQ-fyT3JMhEI8Ojjc3MiyGzvrkOFRkUy_0HPy30_MlnPhaPdnqlDuYH9agx8q2cdVuF4iA6pGYiGO..."; Result = OPI_Dropbox.CopyObject(Token, Original, Copy); ``` ```bash oint dropbox CopyObject \ --token "***" \ --from "/New/pic.png" \ --to "/New/pic_copy.png" ``` ```batch oint dropbox CopyObject ^ --token "***" ^ --from "/New/pic.png" ^ --to "/New/pic_copy.png" ``` ```json title="Result" { "metadata": { ".tag": "file", "name": "pic_copy.png", "path_lower": "/new/pic_copy.png", "path_display": "/New/pic_copy.png", "id": "id:kJU6-a-pT48AAAAAAAAclQ", "client_modified": "2024-10-09T06:15:59Z", "server_modified": "2024-10-09T06:16:45Z", "rev": "6240532c29927bd841553", "size": 2114023, "is_downloadable": true, "content_hash": "0f3b18c255b0f252bd326cacc04c15c3aa57bd6b8234adb65aa7bb2987a65492" } } ```