Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to download files

Status
Not open for further replies.

ug505

Programmer
Jan 2, 2010
52
0
0
US
Is there a way for Delphi 7 to download files off a webserver (i.e. create a program to download files)? If so, how?
 
hi
i think that what you are trying to do, is an ftp application.
you sould check the indy components in delphi 7!

there is an example of how to upload a file:

procedure TForm1.Button2Click(Sender: TObject);
var
f : string;
begin
with IdFTP1 do
begin
Disconnect;
Username := 'myusername';
Password := 'mypassword';
Host := 'ftp.mydomain.gr';
f := 'C:\mycfg.xml';
Connect();
if Connected then
begin
application.ProcessMessages;
self.IdFTP1.ChangeDir('/httpdocs');
IdFTP1.Put(f, ExtractFileName(f));
application.ProcessMessages;
end;
end;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top