Download and upload a file with msinet.ocx

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
FalkeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
glass_cookieConnect With a Mentor Commented:
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
 
Roshan DavisCommented:
Is it "Execute" ?

Roshmon
0
 
ebosscherCommented:
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
 
FalkeAuthor Commented:
it works perfectly

thanks a lot :)

Falke
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.