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

 

This function copies 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 copied

False

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