Solved

Uploading to the web

Posted on 2000-04-10
11
166 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:mi5
  • 6
  • 5
11 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 70 total points
ID: 2700097
The same way...


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

HTH
0
 

Author Comment

by:mi5
ID: 2700496
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
 
LVL 9

Expert Comment

by:samopal
ID: 2700588
Sure..

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


HTH
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:mi5
ID: 2700615
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 
LVL 9

Expert Comment

by:samopal
ID: 2700650
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
 

Author Comment

by:mi5
ID: 2700660
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 

Author Comment

by:mi5
ID: 2700666
Just one more thing... whats the SentDocs\Sent.txt bit. Is that where it is to be sent to?
0
 

Author Comment

by:mi5
ID: 2700676
If I want it in the 'root' path of my folder, then do I just have Sent.txt without the slash?
0
 
LVL 9

Expert Comment

by:samopal
ID: 2700753
Yes
0
 

Author Comment

by:mi5
ID: 2704031
Thanks for your help - this worked fine. Is there an easier way of downloading files (GET command?)?
0
 
LVL 9

Expert Comment

by:samopal
ID: 2704271
Yes...

strFile = Inet1.OpenURL(URLlocation)

where URLlocation = "http://www....." or "ftp://....."
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question