0
I need to know if a folder exists in ftp
I’m using the function below, but 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
What you are passing in the aFileName parameter?
– Matheus Ribeiro
I’m sorry, I’ll close this question, I ate ball at the time of passing the directory, crude error, function works, I’m able to create directories
– Marcelo
I figured it was the wrong way, really, because I use a practically equal function...
– Matheus Ribeiro
Yeah, you know when you waste your time with something gross, you go out to air and when you come back you see the mistake...
– Marcelo