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

FTP files with VFP

Status
Not open for further replies.

CFB

Programmer
Jan 11, 2001
74
US
Currently I'm using DOS FTP to FTP files to a remote FTP site. I create a ftp.txt file containing the following:

open <ip>
user <username>
pwd <password>
bin
put <filepath>
disconnect

I then issue a '! ftp -s:ftp.txt' command. The ip, username, and password information for each site are stored in a database table. Each time I need to put files to a different FTP site I create a new ftp.txt file. Can anyone think of a better way to manage this or know of other tools/methods other than DOS FTP that can be used? Thanks for the help.
 
Hi CFB,

1. You can use the Internet Transfer Control. There have been previous threads here that discuss the details. The help file is named Inet98.chm and is included with VS &amp; MSDN Library.

2. You can use WinInet.dll. Its what Internet Explorer uses to perform its FTP. Visit register as a user. Go into the Files section, classes subcategory. There is a VFP wrapper class for the FTP functions of WinInet.dll. I cant recall the name, but it's author is Robert Abrham. I would recommend you sift thru his code to get a better understanding of how to use it.
Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
DOH!...How could I forget that one!?! s-) Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Thanks for all the help. The wwIPStuff class library seems to be the way to go. I've been able to connect to FTP sites, display files and partially upload files. For some reason when I'm uploading my ZIP files to an FTP site the entire file isn't being transmitted. The files I've uploaded have lost between 4-122 bytes depending on their size (more byte loss for bigger files) during the transfer. Anyone else ran into this sort of problem?
 
Check if the TransferType is binary or ascii.

Sorry, but I dont have wwIPStuff on hand so I cant tell you the exact property, but I'm sure you'll find it. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top