MoveFile(filePath, toPath) Last updated: 16. May 2023
API only function
Moves a file from one folder to another, and renames it if the name part of the path is changed.
Parameters
Name | Type | Description |
---|---|---|
filePath | string | Entire absolute path for file to move. |
toPath | string | Absolute path to folder to place the file into. |
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.// Moves file and keeps the name, specify folder path
docly.moveFile("Folder/File1.json", "Folder2");