Solved

Copy File from www or ftp server

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

19 Experts available now in Live!

Get 1:1 Help Now