FtpRemoveDirectory Function  
 
INT WINAPI FtpRemoveDirectory(
  HCLIENT hClient,  
  LPCTSTR lpszDirectory  
);

The FtpRemoveDirectory function removes the specified directory on the server.

Parameters

hClient
Handle to the client session.
lpszDirectory
Points to a null-terminated string that specifies the name of the directory. The file pathing and name conventions must be that of the server.

Return Value

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

Remarks

This function 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

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csftpav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

FtpChangeDirectory, FtpCreateDirectory, FtpDeleteFile, FtpGetDirectory