MoveFile(filePath, toPath) Last updated: 28. May 2024

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

Returns same as "docly.getFile" function for the updated file after moving.

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
let result = docly.moveFile("Folder/File1.json", "Folder2");

write(result);