﻿---
sidebar_position: 3
---

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

# Delete selected files
 Deletes a file or multiple files from Neocities



`Function DeleteSelectedFiles(Val Token, Val Paths) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | Paths | --paths | String, Array of String | &#x2714; | Path or multiple paths of the files to be deleted |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Neocities

<br/>

:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"
    Token = "7419cd51de4037f7...";

    Paths = New Array;
    Paths.Add("/test/pic1.png");
    Paths.Add("/test/gif.gif");
    Paths.Add("/pic2.png");

    Result = OPI_Neocities.DeleteSelectedFiles(Token, Paths);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint neocities DeleteSelectedFiles \
             --token "***" \
             --paths "['/test/pic1.png','/test/gif.gif','/pic2.png']"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint neocities DeleteSelectedFiles ^
             --token "***" ^
             --paths "['/test/pic1.png','/test/gif.gif','/pic2.png']"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "result": "success",
 "message": "file(s) have been deleted"
}
```
