Uploading to the web

Is there any way I can easily upload files to the Internet using VB6? I can download text and HTL with the Inet control, but I need to be able to upload things too.
mi5Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
samopalConnect With a Mentor Commented:
The same way...


Inet1.Execute "Ftp://ftp.myftp.com", _
   "PUT C:\MyDocuments\Send.txt SentDocs\Sent.txt"

HTH
0
 
mi5Author Commented:
If I have, say, a web account at geocities, is it possible to send a text file there (using ftp.geocities.com)? Geocities requires a user name and password for ftp as each user has their own folder.
0
 
samopalCommented:
Sure..

Inet1.Execute "ftp://UserName:password@ftp.geocities.com", _
   "PUT C:\MyDocuments\Send.txt SentDocs\Sent.txt"


HTH
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mi5Author Commented:
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 
samopalCommented:
C:\MyDocuments\Send.txt - this is the path to the file on your local computer
SentDocs\Sent.txt - this is the destination path on ftp
0
 
mi5Author Commented:
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 
mi5Author Commented:
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 
mi5Author Commented:
If I want it in the 'root' path of my folder, then do I just have Sent.txt without the slash?
0
 
samopalCommented:
Yes
0
 
mi5Author Commented:
Thanks for your help - this worked fine. Is there an easier way of downloading files (GET command?)?
0
 
samopalCommented:
Yes...

strFile = Inet1.OpenURL(URLlocation)

where URLlocation = "http://www....." or "ftp://....."
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.