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!

FTP a File from VB 6 1

Status
Not open for further replies.

meny21

IS-IT--Management
Oct 4, 2002
101
MX
Hi Guys,

I almost finish an application but I missing the last part, maybe you can give me some suggestions about how to do this thing:

My application creates a File on my Local Directory (For example... C:\Myfile.txt)

I need to send this file to another server by FTP Conection.

For example:

FTP Server: MY_FTPServer_Address
Login: Username
Passw: PAssw

I can do it manually or with a FTP Application and post the file over there, also I can do it outside my VB App with a scheduler task and a script or bat file.

But I would like to do it with my VB6 app. I'm in this part:

I created the file, I have the path and name in a variable (For example C:\MyFile.txt) and I just need with VB6 to open the FTP Server with my login and password and put the file over there, do you think is possible to do it inside VB6?

Thanks for any recomendation

Regards

MR
 
The INET control or WinInet API will do it. Do a keyword search on those topics and you should be able to find some examples.
 
My second post in thread222-1337638 illustrates two simple ways of uploading a file to a password-protected FTP site. Of the two, I'd go with the second one; it's more succinct (and we could even get it down to about a single line if we really wanted ...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top