ibec_CopyFile

Copies an existing file to a new file.

Syntax

 function ibec_CopyFile(ExistingFileName, NewFileName : string;
                        FailIfExists : Boolean) : Boolean;

Description

The ibec_CopyFile function copies an existing file to a new file. If the FailIfExists parameter is@True and the new file already exists, the function fails. If this parameter is False and the new file already exists, the function overwrites the existing file.

This function supports Unicode (UTF8) file names. You can still use ANSI names, necessary checks and conversion are performed automatically.

Example

  execute IBEBlock
  returns (cout varchar(100))
  as
  begin
     if (ibec_CopyFile('d:\txt.csv', 'd:\txtcopy.csv', false)) then
        cout = 'Operation completed!';
      else
        cout = 'Operation NOT completed!';
    suspend;
  end

See also:
ibec_MoveFile

<< ibec_SaveToFile | IBEBlock | ibec_MoveFile >>