This function renames an existing file on the FTP server.
Parameters
Name | Explanation |
---|---|
hConnect | The session handle retrieved from the IKFTPConnect function |
OldFile | The old name of the file (The name and path of the file prior to renaming) |
NewFile | The new name of the file (DOES NOT INCLUDE PATH) |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKFTPRenameFile function renames an existing file on the FTP server. It can be used only after the IKFTPConnect function has successfully connected to the FTP server. This method can only be
Example Code:
(1)C++Builder
HINTERNET hOpen, hConnect;
if (IKFTPConnect("www.newtone.co.jp", "User", "Password",
&hOpen, &hConnect) == FALSE) return;
IKFTPRenameFileEx(hConnect, "images/001.jpg", "002.jpg");
IKFTPDisconnect(hOpen, hConnect);
(2)Delphi
hOpen, hConnect: HINTERNET;
if (IKFTPConnect('www.newtone.co.jp', 'User', 'Password', @hOpen,
@hConnect) = False) then Exit;
IKFTPRenameFileEx(hConnect, 'images/001.jpg', '002.jpg');
IKFTPDisconnect(hOpen, hConnect);