1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-02 22:05:37 +02:00

77 lines
2.4 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
---
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-02-04 08:52:56 +03:00
Token = "sl.u.AFhUuZAoxOEoR-BNgFz3WgvpaBdp-LvUNWtSXUd1EjLhr5JC8MP8WWil6AH7LZ0YqSWZlOU_ANs5msR8X1qYMG51W9ovk7iDfZeu87zgS_6TXXHSiG5VIzwSEuZq58vMCIgI-vNJzh34W3xfvZXoslzpVKI1Su-YvLI0EGoXEIRvGGQ_Y0GhEU3FtOkJZ60pT-ApsHPRiWLH1kXen_tbBE8J8cxGseOxaovjwAP35RgzRAMYYBFCVFi0ZvoIth8IgDKPTljBwrRq3MtB2D0m9adjWyqPWMFfyJT4Emt7YMX3slfS6jczuIerjUDFAMHhmMsaoQtsABPE9FQ_rA4rUDEy4u_aXxkpgPma443t1AzPLgRZLdhI_dLWSEpYifltZ405YAKo4wHLUWdb6ptTZ8b-lZsLiffbpFHy2LUGixOHV2VXLbdZq37kddpKytrNyKERo01u7VisDpCX-5T63DWKg29LSlrIpRRiViuHRqvgF1KyYZ9OynPHQXeMr5t7P0eoiOO2XgVkJF0ccNm_cc28a4ExwSEiv6dniosf5BR0E2H83i97EwIzileWHy5ErcaV7eiINcrJYQGZje1i-i_kalRX9sr4hjsoZt0PpWrFYkfhI9EsR0Fd3LlW19ZldFjUdHyen80nj721tOTqP2oHRMznEZC1HRzCyk_pidlME2VUJ9VVcRRzvrbHxpCHQDMwA7s4rpnskCPa91mznWFI_PW1j3H...";
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",
"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"
}
}
```