Skip to main content

Create folder

Creates a directory on the disk

Function CreateFolder(Val Token, Val Path) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Path--pathStringPath to the created folder
Returns

Map Of KeyAndValue - serialized JSON response from Yandex

1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
Path = "/" + String(New UUID);

Result = OPI_YandexDisk.CreateFolder(Token, Path);
oint yadisk CreateFolder \
--token "***" \
--path "/9d9119e5-b131-45b3-8bfd-d4ef2dd8c47c"
Result
{
"path": "disk:/9d9119e5-b131-45b3-8bfd-d4ef2dd8c47c",
"type": "dir",
"name": "9d9119e5-b131-45b3-8bfd-d4ef2dd8c47c",
"created": "2026-05-26T13:58:34+00:00",
"modified": "2026-05-26T13:58:34+00:00",
"_embedded": {
"path": "disk:/9d9119e5-b131-45b3-8bfd-d4ef2dd8c47c",
"limit": 20,
"offset": 0,
"sort": "",
"total": 0,
"items": []
},
"resource_id": "1573541518:fa568632a008a64923acfb6e3b4b4ab3461b91b4d3fe7cdb8169d83e30500aea",
"revision": 1779803914875845,
"comment_ids": {
"public_resource": "1573541518:fa568632a008a64923acfb6e3b4b4ab3461b91b4d3fe7cdb8169d83e30500aea",
"private_resource": "1573541518:fa568632a008a64923acfb6e3b4b4ab3461b91b4d3fe7cdb8169d83e30500aea"
},
"exif": {}
}