ApplesauceOS
Read Markdown ↗Download .md

moveFile

Move or rename a path.

js
moveFile(source, destination)

Arguments

ArgumentTypeMeaning
sourcestringExisting path.
destinationstringDestination path.

Returns

null on success; error string on failure.

Example

js
const error = moveFile(__dirname + "/input.txt", __dirname + "/output.txt");
if (error !== null) throw new Error(error);

All JavaScript APIs · Automation playbook