Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TidFTP put not working?

23 views
Skip to first unread message

Aimee Lunn

unread,
Aug 9, 2001, 1:21:48 PM8/9/01
to
I am upgrading my Delphi 5 FTP app from Winshoes to Indy 8, but I am having
problems with the Put Method of the TidFTP component. Running the
application, the file is FTP'ed successfully (from windows 2000 to a unix
drive), but control never returns to the thread from the FTP to finish
running the rest of the code (It looks like it's hung). When I step through
the code, I step into the "Put" action, and never get past it. Is there
something I might be missing (see code below)?

I would appreciate any advice on what I might be missing or doing wrong.

Thanks in advance,
Aimee Lunn
Aim...@RetailSolutions.com


SAMPLE CODE:
begin
FTP:=TidFTP.Create(nil);
with FTP do
begin
host:=gvo_parms.Values['hostname'];
user:=gvo_parms.Values['username'];
password:=gvo_parms.Values['password'];
TransferType := ftAscii;
try
connect;
begin
try
ChangeDir(StringReplace(gvo_parms.Values['remotedir'], '\', '/',
[rfReplaceall]));
except
gvw_result:=FTPDir;
end;
try
Put(gvo_parms.Values['localdir']+gvo_parms.Values['localfile'],
gvo_parms.Values['remotefile'],False);
gvw_result:=FTPGood;
except
gvw_result:=FTPBad;
end;
end;
finally
disconnect;
end;
end;
end;


Doychin Bondzhev

unread,
Aug 9, 2001, 2:06:47 PM8/9/01
to
Can you tell use the Indy version you are using?

--
Doychin Bondzhev - Team Indy
doy...@dsoft-bg.com
DdSoft-Bulgaria
http://www.dsoft-bg.com

"Aimee Lunn" <aim...@retailsolutions.com> wrote in message
news:3b72c6b5$1_1@dnews...

Martin James

unread,
Aug 9, 2001, 8:57:03 PM8/9/01
to

Aimee Lunn <aim...@retailsolutions.com> wrote in message news:3b72c6b5$1_1@dnews...
> I am upgrading my Delphi 5 FTP app from Winshoes to Indy 8, but I am having
> problems with the Put Method of the TidFTP component. Running the
> application, the file is FTP'ed successfully (from windows 2000 to a unix
> drive), but control never returns to the thread from the FTP to finish
> running the rest of the code (It looks like it's hung). When I step through
> the code, I step into the "Put" action, and never get past it. Is there
> something I might be missing (see code below)?
>
> I would appreciate any advice on what I might be missing or doing wrong.

Nothing, as far as I can see. There couldn't be much, really. The fact that the file
appears on the UNIX box demonstrated that the filenames are OK. The put call
should return or cause an exception, which you have covered.

My network test loader app. uses this component & the code looks almost identical
to yours. The big differences are that I have a repeat loop that reruns the put continually,
my put calls return and I am using the 9.1 beta components. I have been running repeated
puts for four days now, without problems, (unlike ping - I have big problem with ICMP).

Your code is fine. I think it's upgrade time.

Rgds,
Martin


0 new messages