Skip to main content

Move object

Moves the object to the specified path and path to the original

Function MoveObject(Val Token, Val Original, Val Path, Val Overwrite = False) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Original--fromStringPath to the original file or folder
Path--toStringDestination path for moving
Overwrite--rewriteBooleanOverwrite if a file with the same name already exists
Returns

Map Of KeyAndValue - serialized JSON response from Yandex

1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
Original = "/5bb78325-64e6-4133-a369-c3a275f745cb.png";
Path = "/" + String(New UUID) + ".png";

Result = OPI_YandexDisk.MoveObject(Token, Original, Path, True);
oint yadisk MoveObject \
--token "***" \
--from "/9a9d558d-b5c9-431e-83ad-071a9c4cc402.png" \
--to "/7931df70-98c4-4413-9577-00dffc5b1c1a.png" \
--rewrite true
Result
{
"path": "disk:/7931df70-98c4-4413-9577-00dffc5b1c1a.png",
"type": "file",
"name": "7931df70-98c4-4413-9577-00dffc5b1c1a.png",
"created": "2026-05-26T14:00:47+00:00",
"modified": "2026-05-26T14:01:07+00:00",
"size": 2114023,
"mime_type": "multipart",
"md5": "9e0176f87f6565a22f78e0f9b39a4d78",
"sha256": "89f8eb42a35208a17c85036e17237b0aa0657e1841efa6171dc5acbc0dea9e18",
"media_type": "image",
"resource_id": "1573541518:5348163e0ca90a623809150d40b8541b9ce5f02858b5c0e8c778a24e3d8b17dd",
"revision": 1779804068049416,
"comment_ids": {
"public_resource": "1573541518:5348163e0ca90a623809150d40b8541b9ce5f02858b5c0e8c778a24e3d8b17dd",
"private_resource": "1573541518:5348163e0ca90a623809150d40b8541b9ce5f02858b5c0e8c778a24e3d8b17dd"
},
"exif": {},
"antivirus_status": "clean",
"file": "https://downloader.disk.yandex.ru/disk/8492b5eb25c028e2742fc822504e2408045139478bb21a1514b9aa1bf0f34..."
}