> for i := 0 to Pred(sl.Count) do
> if IsAWantedFile(sl[i]) then begin
> ICSFTP.HostFileName := sl[i];
> ICSFTP.LocalFileName :=
> Format('%s%s', [INBOUND_DIRECTORY, ICSFTP.HostFileName]);
> ICSFTP.Get;
> end;
The normal way of programming ICS is to use asyncronous programming model.
So you don't have any loop like the one above. Instead you use the GetAsync
method to start a download and when it is finisehd, from the OnRequestDone
event, you start the next download if any remains in your list. Forget about
sequentlial programming, think about event driven !
Studdy the FtpAsy sample program and see how ExecButtonClick start the
download chain and how FtpClient1RequestDone is starting the next request
when one is finished.
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
----- Original Message -----
From: "Clay Shannon" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" <[email protected]>
Sent: Monday, August 21, 2006 11:12 PM
Subject: Re: [twsocket] List() method?
> << The answer lies in your code :)
>
> ICSFTP.LocalFileName := 'C:\Misc\FilesInHostDir.txt'; <--- Whener you do a
> "Get()", this is the place to look for the downloaded files.>>
>
> So does this change look right:
>
> Old code:
> for i := 0 to Pred(sl.Count) do
> if IsAWantedFile(sl[i]) then begin
> ICSFTP.HostFileName := sl[i];
> ICSFTP.Get;
> end;
>
> New code:
> for i := 0 to Pred(sl.Count) do
> if IsAWantedFile(sl[i]) then begin
> ICSFTP.HostFileName := sl[i];
> ICSFTP.LocalFileName :=
> Format('%s%s', [INBOUND_DIRECTORY, ICSFTP.HostFileName]);
> ICSFTP.Get;
> end;
>
>
----------------------------------------------------------------------------
----
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. If the reader of this message is not the intended recipient,
> you are hereby notified that your access is unauthorized, and any review,
> dissemination, distribution or copying of this message including any
> attachments is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete the material from any
> computer.
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be