2024-09-24 11:38:18 +03:00
|
|
|
---
|
|
|
|
sidebar_position: 3
|
|
|
|
---
|
|
|
|
|
|
|
|
# Delete selected files
|
|
|
|
Deletes a file or multiple files from Neocities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function DeleteSelectedFiles(Val Token, Val Paths) Export`
|
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Auth token |
|
|
|
|
| Paths | --paths | String, Array of String | Path or multiple paths of the files to be deleted |
|
|
|
|
|
|
|
|
|
2024-10-09 09:42:00 +03:00
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Neocities
|
2024-09-24 11:38:18 +03:00
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
Neocities API docs: [neocities.org/api](https://neocities.org/api)
|
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
```bsl title="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);
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
2024-09-24 14:17:36 +03:00
|
|
|
oint neocities DeleteSelectedFiles --token "7419cd51de4037f7..." --paths %paths%
|
2024-09-24 11:38:18 +03:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-09-24 15:43:51 +03:00
|
|
|
{
|
|
|
|
"result": "success",
|
|
|
|
"message": "file(s) have been deleted"
|
|
|
|
}
|
2024-09-24 11:38:18 +03:00
|
|
|
```
|