1
The ftp folder 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?
On which line does the error point?
– MarceloBoni
"Changedir('/RAMONRUAN/')"; only there, and as I said above, there is this directory.
– Ramon Ruan
Exactly, from this error "Failed to change directoy", there is possibility to be Indy?
– Ramon Ruan
@Qmechanic73, I do not use this function, at what point I could use it, or it is made from the moment I use the
ChangeDir
?– Ramon Ruan
@Qmechanic73, returns from
/var/ftp/MEU_FTP
– Ramon Ruan
Exactly. This way. That would be the problem?
– Ramon Ruan
@Ramonruan I don’t think so. Do you have access permissions to it? See if this directory appears when listing:
IdFTP1.List(ListBox1.Items,'',false);
– stderr
Got here friend, the problem was on which server I was connecting, then came up server folders that I didn’t want, it was just a second server that I had connected before
– Ramon Ruan