As far as I know, Indy doesn’t have a "ready" method for what he wants. You will need to create a recursive method to delete all files and subdirectories before removing the root directory. See this example below adapted from a code obtained on the site progtown.com :
procedure FTPRemoveDir(Dir: string);
var
I: Integer;
List: TStringList;
begin
List := TStringList.Create;
try
FTP.ChangeDir(Dir);
FTP.List(List, '', false);
for i := 0 to List.Count - 1 do
begin
if FTP.Size(List[I]) = -1 then
DelFTPDir(List[I])
else
FTP.Delete(List[I]);
end;
FTP.ChangeDirUp;
FTP.RemoveDir(Dir);
finally
List.Free;
end;
end;
I hope I helped! Hug!