Skip to main content

Delete selected files

Deletes a file or multiple files from Neocities

Function DeleteSelectedFiles(Val Token, Val Paths) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
Paths--pathsString, Array of StringPath or multiple paths of the files to be deleted

Returns: Map Of KeyAndValue - serialized JSON response from Neocities


tip

Neocities API docs: neocities.org/api


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);
    oint neocities DeleteSelectedFiles \
--token "***" \
--paths "['/test/pic1.png','/test/gif.gif','/pic2.png']"
Result
{
"result": "success",
"message": "file(s) have been deleted"
}