Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Download and upload a file with msinet.ocx

Posted on 2002-03-20
4
438 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
ID: 6882171
Is it "Execute" ?

Roshmon
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 50 total points
ID: 6882209
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
ID: 6882692
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
ID: 6883924
it works perfectly

thanks a lot :)

Falke
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

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…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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