Solved

CONNECT FTP VIA VB6

Posted on 2003-11-05
6
2,811 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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 50 total points
ID: 9687594
Forget to mention. you nee to put the inet control on your form ( Microsoft INternet COntrols )
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 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

12 Experts available now in Live!

Get 1:1 Help Now