This function deletes an existing file from the FTP server.
Parameters
Name | Explanation |
---|---|
hConnect | The session handle retrieved from the IKFTPConnect function |
DeleteFile | The name and path of the file to be deleted |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKFTPDeleteFileEx function deletes an existing file from the FTP server. It can be used only after the IKFTPConnect function has successfully connected to the FTP server. This function can only be executed from the client computer. It does not operate on the server.
Example Code:
(1) C++Builder
HINTERNET hOpen, hConnect;
if (IKFTPConnect("www.newtone.co.jp", "User", "Password",
&hOpen, &hConnect) == FALSE) return;
IKFTPDeleteFileEx(hConnect, "images/001.jpg");
IKFTPDisconnect(hOpen, hConnect);
(2) Delphi
hOpen, hConnect: HINTERNET;
if (IKFTPConnect('www.newtone.co.jp', 'User', 'Password', @hOpen,
@hConnect) = False) then Exit;
IKFTPDeleteFileEx(hConnect, 'images/001.jpg');
IKFTPDisconnect(hOpen, hConnect);