Board index » delphi » How do i get multiple files from the web?? **Hoe Krijg ik meerdere bestanden direct van het web??**

How do i get multiple files from the web?? **Hoe Krijg ik meerdere bestanden direct van het web??**

**Nederlands zie onderaan**

I know how to open webpages but i want to dowload only a cople of .zip files
in e.g. c:\download

for opening webpage i uses the following line
ShellExecute(GetDesktopWindow,'open','http://www.something.com',nil,nil,SW_S
HOWNORMAL);  { I've got this sample from somebody else so i donn't know
exectly how this works}
all the files i want to download look like this lessonXX.zip where the XX
are the numbers from 01 to 25
I donn't think that i can use the following

var x1,x2:integer;
begin
  x1:=0;
  for i:=1 to 25 do
   begin
    if i=>9 then x1:=; // i donn't know if this work because i never used it
that way

ShellExecute(GetDesktopWindow,'open','http://www.something.com/'+inttostr(x1
)+inttostr(x2),nil,nil,SW_SHOWNORMAL); {I think that window is going to open
a lot of IE's here and that is something i donn't want}
  end;
end;

can somebody tell me if this is wrong of right and if it's wrong what I
should change.

**Nederlands**
(DELPHI)

Ik weet al hoe ik webpagina's kan open maar nu wil ik een stel zip bestanden
opslaan in BV c:\download
om webpagina's te openen gebruik ik de volgende code
ShellExecute(GetDesktopWindow,'open','http://www.something.com',nil,nil,SW_S
HOWNORMAL);  {deze code heb ik van iemand anders ik weet bijna helemaal
niets van de shellexecute af}
Alle bestanden die ik wil downloaden hebben de volgende structuur lessonXX
waar de XX staan voor getallen van 01 tot 25
om dit op te lossen heb ik het volgende bedacht

var x1,x2:integer;
begin
  x1:=0;
  for i:=1 to 25 do
   begin
    if i=>9 then x1:=; // ik weet niet of dit werkt

ShellExecute(GetDesktopWindow,'open','http://www.iets.nl/'+inttostr(x1)+intt
ostr(x2),nil,nil,SW_SHOWNORMAL); {ik denk dat hier een heleboel IE's geopend
gaan worden en dat wil ik niet}
  end;
end;

ik hoop dat jullie mij hier mee kunnen helpen

 

Re:How do i get multiple files from the web?? **Hoe Krijg ik meerdere bestanden direct van het web??**


ShellExecute opens a the current browser (IE, Netscape, etc.) for the
specified HTML page. Since you only want to download files you are much
better off with a HTTP client (you won't need an installed browser).
You can use the TNMHTTP component that comes with Delphi, but I suggest
downloading ICS (http://users.swing.be/francois.piette/indexuk.htm) or Indy
(http://www.nevrona.com/Indy/) instead, because there are a lot of bugs in
the NetMasters components.

"Bush sucks" <6...@hotmail.com> schreef in bericht
news:951p8m$2l2$1@news.hccnet.nl...

Quote
> **Nederlands zie onderaan**

> I know how to open webpages but i want to dowload only a cople of .zip
files
> in e.g. c:\download

> for opening webpage i uses the following line

ShellExecute(GetDesktopWindow,'open','http://www.something.com',nil,nil,SW_S
Quote
> HOWNORMAL);  { I've got this sample from somebody else so i donn't know
> exectly how this works}
> all the files i want to download look like this lessonXX.zip where the XX
> are the numbers from 01 to 25
> I donn't think that i can use the following

> var x1,x2:integer;
> begin
>   x1:=0;
>   for i:=1 to 25 do
>    begin
>     if i=>9 then x1:=; // i donn't know if this work because i never used
it
> that way

ShellExecute(GetDesktopWindow,'open','http://www.something.com/'+inttostr(x1

- Show quoted text -

Quote
> )+inttostr(x2),nil,nil,SW_SHOWNORMAL); {I think that window is going to
open
> a lot of IE's here and that is something i donn't want}
>   end;
> end;

> can somebody tell me if this is wrong of right and if it's wrong what I
> should change.

> **Nederlands**
> (DELPHI)

> Ik weet al hoe ik webpagina's kan open maar nu wil ik een stel zip
bestanden
> opslaan in BV c:\download
> om webpagina's te openen gebruik ik de volgende code

ShellExecute(GetDesktopWindow,'open','http://www.something.com',nil,nil,SW_S
Quote
> HOWNORMAL);  {deze code heb ik van iemand anders ik weet bijna helemaal
> niets van de shellexecute af}
> Alle bestanden die ik wil downloaden hebben de volgende structuur lessonXX
> waar de XX staan voor getallen van 01 tot 25
> om dit op te lossen heb ik het volgende bedacht

> var x1,x2:integer;
> begin
>   x1:=0;
>   for i:=1 to 25 do
>    begin
>     if i=>9 then x1:=; // ik weet niet of dit werkt

ShellExecute(GetDesktopWindow,'open','http://www.iets.nl/'+inttostr(x1)+intt

- Show quoted text -

Quote
> ostr(x2),nil,nil,SW_SHOWNORMAL); {ik denk dat hier een heleboel IE's
geopend
> gaan worden en dat wil ik niet}
>   end;
> end;

> ik hoop dat jullie mij hier mee kunnen helpen

Other Threads