Copies an existing file to a new file.
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.
function ibec_CopyFile(ExistingFileName, NewFileName : string; FailIfExists : Boolean) : Boolean;
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