In my FTP Client application in MFC VC++, I am listing a server's directory files and deleting them successfully. LIST
and NLIST
commands work fine in listing the directory files/content.
As well as the files, two folders (which contain files which are not listed) appear on the list which is correct. However, when I pass DELE
command to these folders, an error is returned and the folders remain. I feel that this is because they are folders.
Below is the Delete()
function I have implemented:
int CFTPClient::Delete(const tstring& strFile) const
{
ASSERT( !strFile.empty() );
CReply Reply;
if( !SendCommand(CCommand::DELE(), strFile, Reply) )
return FTP_ERROR;
return SimpleErrorCheck(Reply);
}
My question is this: Are there any commands in FTP which remove/delete folders? I am referring to the RFC 959 FTP protocol. DELE
and RMD
commands do not work for folders.