﻿---
sidebar_position: 2
description: Create folder and other functions to work with Yandex Disk in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Yandex Disk]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Create folder
 Creates a directory on the disk



`Function CreateFolder(Val Token, Val Path) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Path | --path | String | &#x2714; | Path to the created folder |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
    Path  = "/" + String(New UUID);

    Result = OPI_YandexDisk.CreateFolder(Token, Path);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint yadisk CreateFolder \
             --token "***" \
             --path "/0c3d01a0-11fb-449b-842f-977d38d65f19"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint yadisk CreateFolder ^
             --token "***" ^
             --path "/0c3d01a0-11fb-449b-842f-977d38d65f19"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "_embedded": {
  "sort": "",
  "items": [],
  "limit": 20,
  "offset": 0,
  "path": "disk:/81da8ff8-4975-43d1-aebc-dbffba560d71",
  "total": 0
 },
 "name": "81da8ff8-4975-43d1-aebc-dbffba560d71",
 "exif": {},
 "resource_id": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880",
 "created": "2024-10-09T09:07:49+03:00",
 "modified": "2024-10-09T09:07:49+03:00",
 "path": "disk:/81da8ff8-4975-43d1-aebc-dbffba560d71",
 "comment_ids": {
  "private_resource": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880",
  "public_resource": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880"
 },
 "type": "dir",
 "revision": 1728454069973169
}
```
