ibec_MoveFile

The ibec_MoveFile function renames an existing file or a directory (including all its children).

Syntax

 function ibec_MoveFile(ExistingFileName, NewFileName : string) : Boolean;

Description

The ibec_MoveFile function will move (rename) either a file or a directory (including all its children) either in the same directory or across directories. The one caveat is that the ibec_MoveFile function will fail on directory moves when the destination is on a different volume.

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.

This function now 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_MoveFile('d:\txt.csv', 'd:\txtcopy.csv')) then
        cout = 'Operation completed!';
      else
        cout = 'Operation NOT completed!';
    suspend;
  end

See also:
ibec_CopyFile

<< ibec_CopyFile | IBEBlock | ibec_FileDateTime >>