?
Solved

CONNECT FTP VIA VB6

Posted on 2003-11-05
6
Medium Priority
?
2,819 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
[X]
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
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
Independent Software Vendors: 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

801 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