Internet Direct (Indy)
Home
PreviousUpNext
TIdFSP.Rename Method

Renames an existing file on the remote FSP host.

Pascal
procedure Rename(
    const ASourceFile: string; 
    const ADestFile: string
);
Parameters 
Description 
ASourceFile 
The existing file name on the remote FSP host.
 
ADestFile 
The new file name on the remote FSP host. 

Rename is a procedure used to rename an existing file on the remote FSP host. 

ASourceFile contains the existing file name on the remote FSP host. 

ADestFile indicates the new file name to use on the remote FSP host. 

Rename calls the SendCmd method using the FSP CC_RENAME command and the file name arguments specified in ASourceFile and ADestFile. 

Calling Rename can result in an EIdFSPProtException exception being raised if the rename operation using the specified file names would result in an error; either ASourceFile does not exist on the remote FSP host, or ADestFile already exists. The exception may also be raised if the user does not have permissions to renames files in the remote directory. 

Use Delete to remove a file on the remote FSP host. 

Use Put or Get to send or receive files between the local file system and the remote FSP host.

Exceptions 
Description 
Raised when the file names are invcalid for the operation, or the user not have permissions to renames files in the remote directory. 
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.