This function deletes an existing file from the FTP server.

[C++Builder]   BOOL IKFTPDeleteFileEx(HINTERNET hConnect, LPCTSTR DeleteFile);
[Delphi]   function IKFTPDeleteFileEx(hConnect: HINTERNET; DeleteFile: LPCTSTR): LongBool;

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);

 

The ImageKit10 VCL is a product created by Newtone Corporation