MoveFile (move/rename a file)

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:

Parameter Type Requirement Explanation
what string required must be a valid and existing file in a local file system
toWhere string required a valid and non-existing fully qualified destination path, including directory and file name

Possible return values:

Value Explanation
true the function succeeded: the file was moved/renamed
false the function failed: the file was not moved/renamed