Solved

Copy File from www or ftp server

Posted on 2006-11-03
5
250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

937 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now