Skip to content

MoveFile (move/rename a file)

ts
function MoveFile(what, toWhere: string): boolean;

This function moves or renames the what file to the toWhere destination path in the local file system, and returns true if the operation is successful, or false if it fails.

This function accepts the following parameters:

ParameterTypeRequirementExplanation
whatstringrequiredmust be a valid and existing file in a local file system
toWherestringrequireda valid and non-existing fully qualified destination path, including directory and file name

Possible return values:

ValueExplanation
truethe function succeeded: the file was moved/renamed
falsethe function failed: the file was not moved/renamed