﻿---
sidebar_position: 4
---

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

# Delete object
 Deletes an object at the specified path



`Function DeleteObject(Val Token, Val Path, Val ToCart = True) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Path | --path | String | &#x2714; | Path to the folder or file to be deleted |
  | ToCart | --can | Boolean | &#x2716; | To cart |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
    Path  = "/d2723635-7dc5-4f24-8f6b-c695d4054e1c.png";

    Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint yadisk DeleteObject \
             --token "***" \
             --path "/92908d00-b3bf-49d2-92c7-2b73513ef920.png" \
             --can false
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint yadisk DeleteObject ^
             --token "***" ^
             --path "/92908d00-b3bf-49d2-92c7-2b73513ef920.png" ^
             --can false
        ```
    </TabItem>
</Tabs>


```json title="Result"
null
```
