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

vb6 subroutine to ftp a file?

Status
Not open for further replies.

dgr7

IS-IT--Management
Dec 29, 2006
43
US
hello,
I have a file
BLURG.txt
in a subdirectory
D:\B HC\NewB
that I'd like to, using a VB6 subroutine, pass as a variable to the subroutine
the name of the file & directory where it can be found (for this ex., D:\B HC\NewB\BLURG.txt),
then the subroutine will connect to a FTP site,
ftp://192.782.32.1
using a username of
bob
and a password of
smith
then go to the
/u/gnits/tfiles/
subdirectory on the ftp site and upload the above .txt file using ASCII mode.

I've tried googling how to FTP through VB6 but all the webpages I found were somewhat "over my head" for me, a relative VB newbie, and didn't have any to-the-point examples that I could modify and use, so I was hoping someone could share with me the subroutine code that could do the above?
thanks in advance!
david
 
I think what you might want to search for is an ActiveX control to perform ftp. I can't remember a name off the top of my head but I do know there are lots out there.

 
zasrkon4,
hello,
I did a search on FTP ActiveX VB6 controls, and am only seeing ones that aren't free and they look too complex for what I'm trying to do.
Isn't there a way, just in a relatively small and simple subroutine, to do the above FTP steps from my first posting, basically uploading one ASCII .txt file to a FTP site in code?
thanks,
david
 
A quick search turned up this thread.

thread708-970319

Swi
 
Yes, using the Internet Transfer Control that comes with VB. It has some limitations, but should suffice for your requirement (erm - except for the fact that it unfortunately doesn't support filenames with spaces in them)
 
SWI & strogm,
thank you both for the postings, I'll research that Thread, I see it's rather long.....
thanks,
david
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top