Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.Rename Method

Change the name of a file on the FTP server file system.

Pascal
procedure Rename(
    const ASourceFile: string; 
    const ADestFile: string
);
Parameters 
Description 
ASourceFile 
Original file name.
 
ADestFile 
New file name. 

Rename is a procedure used to change the name of an existing file on the remote file system. 

ASourceFile specifies the existing file name. 

ADestFile is the new name to use for the remote file. 

Both ASourceFile and ADestFile allow use of absolute or relative path names in the argument values. If path information is not found in the argument values, the current directory on the remote file system is assumed. 

Rename calls SendCmd using the FTP commands RNFR and RNTO in succession to perform the rename file operation.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.