This method renames a file that exists on the FTP server. (It includes connecting to and disconnecting from the server.)
[C++Builder] [ bool =
]imagekitcontrolname->FileIO->FTPRenameFile(const
UnicodeString ServerName, const UnicodeString ProxyName, short
PortNo, bool PassiveMode, const UnicodeString RemoteOldFilePath,
const UnicodeString RemoteNewFile, const UnicodeString UserName,
const UnicodeString Password)
[Delphi] [ Boolean =
]imagekitcontrolname.FileIO.FTPRenameFile(const
ServerName: string; const ProxyName: string; PortNo: Smallint;
PassiveMode: Boolean; const RemoteOldFilePath: string; const
RemoteNewFile: string; const UserName: string; const Password:
string)
Parameters
Name | Explanation |
---|---|
ServerName | The name of the FTP server or IPAddress |
ProxyName | The Proxy Server IP Address |
PortNo | Port Number (default is 21) |
PassiveMode | Enables passive mode connectivity: False(0) = Active Mode Connection; True = Passive Mode Connection |
RemoteOldFilePath | The old name of the file (The name and path of the file prior to renaming) |
RemoteNewFile | The new name of the file (DOES NOT INCLUDE PATH) |
UserName | The username needed to access the FTP server |
Password | The password needed to access the FTP server |
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The FTPRenameFile method renames a file that exists on the FTP server. (It includes connecting to and disconnecting from the server.) This method can only be executed from the client computer. It does not operate on the server.
When not using a proxy server set the ProxyName to an empty string.