FileMove

<< Click to Display Table of Contents >>

Navigation:  Handling Events via Scripting > Objects and Functions > File management functions >

FileMove

function FileMove(Src, Dst: string; Overwrite: boolean): boolean;

 

This function moves (or renames) a file to some other place in the file system. Both file names must be fully qualified.

 

Parameters

Src

The original file name, including its path. This file must exist, Ex: 'C:\Documents\MyDoc.txt'

Dst

The destination file name, including its path. Ex: 'C:\Backup\MyDoc.txt'

Overwrite

When true, if Dst exists it will be overwritten. When false the destination will not be overwritten

 

Return value

True

The file was successfully moved

False

The function failed and did not move the file to the supposed destination (most probably destination file or directory was not writable)