The folder of the ftp is existing, I checked manually and even then this error occurs.
Folder on ftp:
Then follow the code:
with IdFtp2 do
begin
Host := edtServFTP2.Text;
Port := StrToInt(edtPorta2.Text);
ReadTimeout := 0;
Username := edtUser2.Text;
Password := Lb3DES1.DecryptString(edtSenha2.Text);
Passive := true;
if Connected = false then
Connect;
ChangeDir('/RAMONRUAN/'); // a pasta onde vc
//quer largar os arquivos
if( ListBox1.Items.Count > 0 ) then//and (erro2 = '')then
begin
i := 0;
while not (i = ListBox1.Items.Count) do
begin
try
Put(ListBox1.Items[i]);
except
on e: Exception do ShowMessage('Não colocou o arquvio: '
+ListBox1.Items[i]+' erro:'+e.Message);
end;
inc(i);
end;
end;
IdFTP2.Disconnect;
end;
What am I doing wrong?