Solved

Copy File from www or ftp server

Posted on 2006-11-03
5
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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