Solved

Copy File from www or ftp server

Posted on 2006-11-03
5
256 Views
Last Modified: 2012-05-05
I need help createing a function like the copyFile function but i need to be able to copy the file from a web location or a web location.
0
Comment
Question by:wqclatre
  • 3
5 Comments
 
LVL 11

Accepted Solution

by:
calinutz earned 500 total points
ID: 17866495
0
 
LVL 11

Expert Comment

by:calinutz
ID: 17866628
As for ftp transfers... why not consider Indy components... they are very easy to use for easy jobs like this:
Place a idFtp component on the form ... set the propertyes like hostname, user and password... and then
in an onButton Event place this code:
idFtp1.Connect(True,500);
IdFTP1.ChangeDir('lala');
IdFTP1.Get('pkg.txt','C:\pkg.txt',True);
0
 
LVL 2

Author Comment

by:wqclatre
ID: 17866848
Already did the www thing by using idHTTP from indy.

Pretty easy.

Stream:= TMemoryStream.Create;
IdHTTP1.Get(URL,Stream);
Stream.SaveToFile(DestFileName);
Stream.Free;
0
 
LVL 11

Expert Comment

by:calinutz
ID: 17884590
Isn't it the answer you wanted?
Didn't I answer to both your questions?
Then why the B grade?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question