Docly Developers
Function API only Updated 17 Oct 2026

deleteFolder(folderPath)

Deletes a specified folder.

Parameters

folderPathstringrequired

Absolute path to the folder you want to delete.

Returns

true when the folder is deleted. Throws an error if the path is empty, if the folder is not found, or if it only exists in the app the site is published from (error 110). The call runs as the site's publisher, not as the visitor.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
try {
    docly.deleteFolder("Folder1");
    write("Folder deleted successfully!");
} catch (e) {
    write("Could not delete the folder: " + e.message);
}