Problem with Loop
Posted on 2007-11-19
I am using WebCopy from TMS to download a list of images which is populated in a listbox.
So, I've done a loop but it's not downloading all of them. The loop is skiping items.
What's wrong with my code please?
Here it is:
var i: integer;
for i:=0 to listbox1.Count-1 do
WebCopy1.Items.Add.Protocol := wpHTTP;
WebCopy1.Items.Add.FileDate := EncodeDate(2002,3,18);
WebCopy1.Items.Add.CopyNewerOnly := false;
WebCopy1.Items.Add.TargetDir := 'c:\1temp';
WebCopy1.Items.Add.URL := (listbox1.Items.Strings[i]);
Hope you can help!