deleteFile(filePath) Last updated: 29. Apr 2026

API only function

Deletes a specified file.

See also: deleteFolder fileExists

Parameters

Name Type Description
filePath string Absolute path to the file you want to delete.

Returns

Boolean, true if deleted otherwise false.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
if (docly.deleteFile("Folder1/File1"))
{
    write("File deleted successful!");
}