I need to know if a folder exists on ftp
I'm using the function below, but the error:
---------------------------
Debugger Exception Notification
---------------------------
Project perfil.exe raised exception class EIdReplyRFCError with message 'Directory not found.
'.
---------------------------
Break Continue Help
---------------------------
The function I'm using is this:
function FTPFileExists(aFileName: string): Boolean;
begin
try
fdm.IdFTP.List(nil, aFileName, False);
Result := (fdm.IdFTP.ListResult.Count > 0);
except
Result := False;
end;
end;
fdm is my datamodule and IdFTP the Indy component delphi is Xe6