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

The RemoveDirectory method removes the specified directory on the server.

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 RMD command to create the directory. The user must have the appropriate permission to remove the specified directory. Most servers will not permit you to remove a directory if it contains one or more files.

Requirements

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

See Also

ChangeDirectory, CreateDirectory, DeleteFile, GetDirectory