RenameFile(filePath, newName) Last updated: 16. May 2023
API only function
Renames a file.
Parameters
Name | Type | Description |
---|---|---|
filePath | string | Entire absolute path for file to rename. |
newName | string | New name without path. |
Returns
Boolean, true if successful otherwise false.
Validation error if file or folder does not exist.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.// Renames file in specified folder, file stays in the same folder
docly.renameFile("Folder/File1.json", "file2.json");