CFtpClient::ChangeDirectory Method  
 
INT ChangeDirectory(
  LPCTSTR lpszDirectory  
);

The ChangeDirectory method changes the current working directory for the client session.

Parameters

lpszDirectory
Points to a string that specifies the name of the directory. The file pathing and name conventions must be that of the server.

Return Value

If the method succeeds, the return value is the server result code. If the method fails, the return value is FTP_ERROR. To get extended error information, call GetLastError.

Remarks

This method uses the CWD command to change the current working directory. The user must have the appropriate permission to access the specified directory.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csftpv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

ChangeDirectoryUp, CloseDirectory, Command, GetDirectory, GetFirstFile, GetNextFile, GetResultCode, GetResultString, OpenDirectory