1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Dropbox/File-and-directory-management/Copy-object.mdx

79 lines
2.7 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 8
2025-05-05 11:15:20 +03:00
description: Copy object and other functions to work with Dropbox in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Dropbox]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Copy object
Copies a file or directory to the selected path
`Function CopyObject(Val Token, Val From, Val Target) Export`
2024-10-15 15:15:47 +03:00
| 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 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:16:04 +03:00
Original = "/New/pic.png";
Copy = "/New/pic_copy.png";
2025-09-01 14:51:24 +03:00
Token = "sl.u.AF_9qAQddOYvngYnVBSAXzIvKBvNsEuJhTNNgfIpZhZJCHvm4CNIkqUw6NakHi-jLUL2OhCRoqadyPYiGvNZrLFPQiVfLBNIhkWShlpu0Fi66Nz62RfOQhZLkAplG_-FrjnFL2aTwnWLVHppYX3IOBQhFMcguaO9giMAQ-jpszgrQQUzKs9Knbc2lGyC1yDFy-73ueGCGYqDmgq07qBFGLNl0LrCbyh2psNpKMedQEgYwdlvOXa8zXj9s114NPr0RtL_eBjm8Xn3Lv8kj9uRoPqxJg387BrEi3feoBt-JIb-xNU7JADm7GRHM_zn9qK9KQScPbOdh-sWTNnyfVFnq1pOcgjgqhSzb11GdoYgRQzeWOHLN-HED0rVBMx58eMUk4Yoq3nsZVE5U3PqdoPoH-AWti6d8dhW9hXpZzJA7UFSgq3x2GN1F6_sUvH1epTZ0GWYLdQI3nMveE9sKqIfp-U_XlCNPEhO_OswC2h3xCuMo1kIiaFj8bqCDyBfTI4hPhLhjsQv0rAHPoGuCOyAMKWNuUBl2HTUfXd7SE0u_LoY8YdarGacEjgahRdamWmFxK9SJd2vQQFVyB12TdLuqIv4TPyUPS9GccqnYGDNuTLh7ShI8t954ZC8FG6dVC4r2q0fwx7tqZVBWY4ttOn4sVD9dKAmqVOgJASMFE6FtSTz74OXgPIpd5jlHr1sg0z7Pkbf2qOdvSj1-k7v-fV0S0P5p7jbFWr...";
2024-10-15 10:16:04 +03:00
Result = OPI_Dropbox.CopyObject(Token, Original, Copy);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint dropbox CopyObject \
2024-10-22 08:59:24 +03:00
--token "***" \
--from "/New/pic.png" \
--to "/New/pic_copy.png"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint dropbox CopyObject ^
2024-10-22 08:59:24 +03:00
--token "***" ^
--from "/New/pic.png" ^
--to "/New/pic_copy.png"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"metadata": {
".tag": "file",
"name": "pic_copy.png",
"path_lower": "/new/pic_copy.png",
"path_display": "/New/pic_copy.png",
2025-09-14 15:36:38 +03:00
"id": "id:kJU6-a-pT48AAAAAAABVrA",
"client_modified": "2025-09-14T11:24:14Z",
"server_modified": "2025-09-14T11:25:08Z",
"rev": "63ec123afd737bd841553",
2024-10-15 10:16:04 +03:00
"size": 2114023,
"is_downloadable": true,
"content_hash": "0f3b18c255b0f252bd326cacc04c15c3aa57bd6b8234adb65aa7bb2987a65492"
}
}
```