?
Solved

CONNECT FTP VIA VB6

Posted on 2003-11-05
6
Medium Priority
?
2,821 Views
Last Modified: 2013-11-13
I wanna know how i can connect automaticly on my ftp and download multiple files with VB6 ..... and what reference i need !!!

thanks sorry i dont have a lot of points anymore !!!
0
Comment
Question by:dany651
6 Comments
 

Author Comment

by:dany651
ID: 9687404
i have find something like that....


    frmMain.ftp.RequestTimeout = "60"
    frmMain.ftp.URL = "ftp://216.113.107.19"
    frmMain.ftp.Protocol = "2"
    frmMain.ftp.RemotePort = "21"
    frmMain.ftp.UserName = "yyy"
    frmMain.ftp.Password = "xxx"
    frmMain.ftp.Execute "cd.."
 frmMain.ftp.Execute , "GET /webroot/cdr.zip C:\temp\cdr.zip"
0
 

Author Comment

by:dany651
ID: 9687405
i have find something like that....


    frmMain.ftp.RequestTimeout = "60"
    frmMain.ftp.URL = "ftp://216.113.107.19"
    frmMain.ftp.Protocol = "2"
    frmMain.ftp.RemotePort = "21"
    frmMain.ftp.UserName = "yyy"
    frmMain.ftp.Password = "xxx"
    frmMain.ftp.Execute "cd.."
 frmMain.ftp.Execute , "GET /webroot/cdr.zip C:\temp\cdr.zip"
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9687486
ftp is the name of an Internet transfer control that you need to add to your toolbox.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:Dang123
ID: 9687569
These will help you with what you can add in the .Execute method.

http://www.nsftools.com/tips/RawFTP.htm

http://www.vbip.com/winsock/winsock_ftp_ref_01.asp

0
 
LVL 14

Expert Comment

by:aelatik
ID: 9687571
This will download all the files with extension .EXE from the server. You can change that ofcourse.
It is important to use the .stillexecuting event because is has to wait till the command finishes :

    Dim BUFFER() As String: Dim ITEM As Variant
    With Inet1
        .URL = "ftp://www.aclassreizen.nl"
        .UserName = "edited"
        .Password = "edited"
        .Execute , "DIR"
        While .StillExecuting: DoEvents: Wend
        BUFFER = Split(.GetChunk(1024, icString), vbCrLf)
        For Each ITEM In BUFFER
            If UCase(Right(ITEM, 4)) = ".EXE" Then
                .Execute , "GET ITEM C:\temp\" & ITEM
                While .StillExecuting: DoEvents: Wend
            End If
        Next
    End With
0
 
LVL 14

Accepted Solution

by:
aelatik earned 200 total points
ID: 9687594
Forget to mention. you nee to put the inet control on your form ( Microsoft INternet COntrols )
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

809 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