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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading Files from FTP

Status
Not open for further replies.

vj

Programmer
Nov 18, 2000
58
MU
hi guys,

iam using the MS Internet Transfer Control 6.0(SP4) and these are the lines i'v written to download a specified file. can anyone tell me how to specify the destination path along with destination file name and if the below lines are ok !

WITH THISFORM
.Ftp.UserName=ALLTRIM(THISFORM.TxtUsername.Value)
.Ftp.Password=ALLTRIM(THISFORM.TxtPassword.Value)
.Ftp.URL="FTP://" + .Ftp.UserName + ":" + .Ftp.Password + '@' + ALLTRIM(THISFORM.TxtFTPAddress.Value)
.Ftp.Execute(.Ftp.URL , 'GET ' + ALLTRIM(.TxtRemoteFile.Value))
ENDWITH

thankx alot
 
Good news, Vijay. I'll remember Dave's method for future reference.

I wish I knew why you had so much trouble with the Internet Transfer Control. I've used it myself many times, and never had much difficulty. If you ever get to the bottom of it, please let us know.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
In my eyes the problem is identified.

A URL including user:password@ftpurl\filename is not what you can put into the URL property of the Internet Transfer control. The user and password properties of it are not just there to optionally put this info there, it must be there. Also you don't connect to a file, so you rather put only the ftp server name as URL (ftp.server.com) not even prepende with fpt:// and you then use FTP commands after being connected, first CD into a directory then GET some file.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top