Solved

Download and upload a file with msinet.ocx

Posted on 2002-03-20
4
427 Views
Last Modified: 2008-02-01
Hi!

I have seen a long time ago a "one line" command with the msinet how i can get and "put" files on a server (FTP). Does anybody know the commands?

Falke
0
Comment
Question by:Falke
4 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
Is it "Execute" ?

Roshmon
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 50 total points
Comment Utility
Hi!

Here's a file for you over the net:

Download...
http://www.vb-helper.com/HowTo/ftp.zip
Description: Upload and download files using FTP (4K)

That's it!

glass cookie : )
0
 
LVL 6

Expert Comment

by:ebosscher
Comment Utility
well, your 'one liner' is really a question of how you set up the inet control

if your ip, userid, and password are all static you can set that up in the control itself (along with the port and the type of communication) at design time, otherwise you're looking at lines of code to set that up

as to doing an upload in one line:

INet.Execute "PUT localfile remotefile"
while INet.StillExecuting
   DoEvents
wend

BE SURE TO INCLUDE THE DOEVENTS, if you don't the next command you issue may overlap the current commands execution and you will get an error

as to downloading..

you will have to issue the command with .Execute but after that you have to retrieve using the .GetChunk to retrieve the file piece by piece

i recommend doing a searh on MSDN for the INET Control, specifically GetChunk

Evan
0
 

Author Comment

by:Falke
Comment Utility
it works perfectly

thanks a lot :)

Falke
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now