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_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Original = "/f228f0e9-5f02-4b1b-a823-97d6f85d8630.png";
Path = "/" + String(New UUID) + ".png";

Result = OPI_YandexDisk.MoveObject(Token, Original, Path, True);
    oint yadisk MoveObject \
--token "***" \
--from "/924f728a-b69f-4aed-b6c1-6d882dc9474e.png" \
--to "/1c715195-7170-488b-a521-a3d2ecad055b.png" \
--rewrite true
Result
{
"path": "disk:/1c715195-7170-488b-a521-a3d2ecad055b.png",
"type": "file",
"name": "1c715195-7170-488b-a521-a3d2ecad055b.png",
"created": "2025-10-15T09:32:26+00:00",
"modified": "2025-10-15T09:32:48+00:00",
"size": 2114023,
"mime_type": "multipart",
"md5": "9e0176f87f6565a22f78e0f9b39a4d78",
"sha256": "89f8eb42a35208a17c85036e17237b0aa0657e1841efa6171dc5acbc0dea9e18",
"media_type": "image",
"resource_id": "1573541518:b3ed98aa0297d256bbcb3fc186b47836d3142c74d0320cf667fdef7c2fd9e84e",
"revision": 1760520768378155,
"comment_ids": {
"public_resource": "1573541518:b3ed98aa0297d256bbcb3fc186b47836d3142c74d0320cf667fdef7c2fd9e84e",
"private_resource": "1573541518:b3ed98aa0297d256bbcb3fc186b47836d3142c74d0320cf667fdef7c2fd9e84e"
},
"exif": {},
"antivirus_status": "clean",
"file": "https://downloader.disk.yandex.ru/disk/386242856f101dc09e42c3982f5133ee0e833f2438097a79b6ff7baa8187a3ac/68efa281/Kdpe3dFisZLPovVA4r-aBmpkby3AOQiLsayEHYapOMw2ylFGSbZZrsWtGPTvHxG_-QDrqSGFBOOsS3b3gKT1zA%3D%3D?uid=1573541518&filename=1c715195-7170-488b-a521-a3d2ecad055b.png&disposition=attachment&hash=&limit=0&content_type=multipart&owner_uid=1573541518&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v3&etag=9e0176f87f6565a22f78e0f9b39a4d78"
}