meta data for this page
  •  

ibec_ftp_Rename

Description

ibec_ftp_Rename renames files/directories on the FTP server.

Syntax

 function ibec_ftp_Rename(FTPSession : variant; OldName : string; NewName : string) : boolean;

ibec_ftp_Rename renames the file or directory specified by the OldName variable. NewName specifies the the new file or directory name. The function returns TRUE in case of success. Otherwise it returns FALSE.

Example

FTPSession = ibec_ftp_OpenSession('HostName=myftpserver.com; UserName=me; Password=mysecret');
  try 
    if (ibec_ftp_Connect(FTPSession)) then
    begin
      if (ibec_ftp_ChangeDir(FTPSession, '\uploads')) then
        ibec_ftp_Rename(FTPSession, 'db.fdb', 'old_db.fdb');
      ...
    end;
  finally
    ibec_ftp_CloseSession(FTPSession); 
  end;