LInetFtp::DeleteFile

#include "ltwrappr.h"

L_INT LInetFtp::DeleteFile(pszRemote)

L_TCHAR L_FAR *pszRemote;

/* name of the file to delete */

Deletes a file stored on the FTP server.

Parameter

Description

pszRemote

Character string that contains the name of the file to delete on the FTP server.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTFIL
LTWEB

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LInetFtp::SendFile, LInetFtp::GetFile, LInetFtp::RenameFile, Class Members

Topics:

FTP Functions: Remote File Operations

 

How to Program with the LInetFtp Class

Example

// This example deletes a remote file on an FTP server

L_VOID TestFunction(HWND hWndParent, L_TCHAR L_FAR *pszRename)
{
   LInetFtp InetFtp(TEXT("www.leadtools.com"));

   // Checking if the connection failed
   if(InetFtp.GetErrorFromList () != SUCCESS)
   {
      InetFtp.DisplayError (hWndParent, TEXT("Can't connect to the FTP server"));
      return;
   }

   if(InetFtp.DeleteFile (pszRename) != SUCCESS)
   {
      InetFtp.DisplayError(hWndParent, TEXT("Can't delete a remote file, an error within the server"));
      return;
   }
}