FTP.Put, accept timeoout error.

Giganews Newsgroups
Subject: FTP.Put, accept timeoout error.
Posted by:  Al Reag (tharol…@gmail.com)
Date: Mon, 7 May 2007

Hi, Delphi 7- Indy10 newbie

I'm trying to FTP a text file, but I keep getting 'Accept Timeout' error on
PUT call. Using
external FTP client, the file upload fine.

I'm not sure what I could be doing wrong below!

vFileName:= 'c:\testsms.txt';
IdFTP2.Connect('bulksms.2way.co.za',7022);
if (IdFTP2.Connected) then
begin
    try
        Button1.Enabled := false;
        IdFTP2.Put(vFileName,ExtractFileName(vFileName),False);
        IdFTP2.Rename(ExtractFileName(vFileName),ExtractFileName(vFileName)+'.ready');
                Button1.Enabled := true;
    except
      on E: Exception do
      begin
      ShowMessage(E.Message);
      IdFTP2.Disconnect;
      Button1.Enabled := true;
      end;
    end;

BR
Alfred

Replies