This function deletes an existing file from the FTP server.

[C++Builder/Visual C++]     BOOL IKFTPDeleteFileEx(HINTERNET hConnect, LPCTSTR DeleteFile);
[Delphi]         function IKFTPDeleteFileEx(hConnect: HINTERNET; DeleteFile: LPCTSTR): LongBool;
[Visual Basic]   Function IKFTPDeleteFileEx(ByVal hConnect As Long, ByVal DeleteFile As String) As Long

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/Visual C++
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);

(3) Visual Basic
Dim hOpen As Long
Dim hConnect As Long
If IKFTPConnect("www.newtone.co.jp", "User", "Password", hOpen, hConnect) = False Then Exit Sub
Call IKFTPDeleteFileEx(hConnect, "images/001.jpg")
Call IKFTPDisconnect(hOpen, hConnect)

 

The ImageKit10 ActiveX is a product created by Newtone Corporation