Solved

Download and upload a file with msinet.ocx

Posted on 2002-03-20
4
445 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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

713 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