LInetFtp::ChangeDir

#include "ltwrappr.h"

L_INT LInetFtp::ChangeDir(pszDirectory)

L_TCHAR L_FAR *pszDirectory;

/* name of the directory */

Changes the working directory on the FTP server.

Parameter

Description

pszRemote

Character string that contains the name of the directory to change to on the remote system. This can be either a fully qualified path or a name relative to the current directory. This is a NULL-terminated string.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Changes to a different working directory on the FTP server.

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::CreateDir, LInetFtp::DeleteDir, LInetFtp::BrowseDir, LInetFtp::GetCurrentDir, Class Members

Topics:

FTP Functions: Remote Directory Operations

 

How to Program with the LInetFtp Class

Example

// This example changes the current remote directory on a FTP server

L_VOID TestFunction(HWND hWndParent)
{
   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.ChangeDir(TEXT("MyDir1")) != SUCCESS)
   {
      InetFtp.DisplayError(hWndParent, TEXT("Can't change a remote directory, an error within the server"));
   return;
   }
}