Failed to Change Directory - Indy 10 - IdFTP

1

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?

    
asked by anonymous 11.02.2015 / 13:52

1 answer

2

I know it's old and solved, but in my example here I did not need to use the / bars. Only the directory name within ChangeDir.

    
09.11.2016 / 14:25