Results 1 to 5 of 5

Thread: FTP, inet control question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Brugge, Belgium
    Posts
    208

    Lightbulb FTP, inet control question

    Hello

    Can you perform mulitple executes with the inet control one after another like this ?

    Do
    With Inet1
    .RemoteHost = "10.0.0.0"
    .RemotePort = "21"
    .UserName = "x"
    .Password = "xxx"

    .Execute , "CD lpvaadat" ' Returns the directory.
    .Execute , "GET *.xml c:\temp\ftp"
    .Execute , "CLOSE" ' Close the connection.
    End With
    Loop Until Inet1.StillExecuting = False

  2. #2
    Addicted Member chatty's Avatar
    Join Date
    Aug 2002
    Location
    in a house
    Posts
    202
    After each execute you have to check if the control is still busy if not then resume next execute

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Brugge, Belgium
    Posts
    208
    so something like this ?

    Do
    With Inet1
    .RemoteHost = "10.4.114.36"
    .RemotePort = "21"
    .UserName = "ergo/V239528"
    .Password = "ergo00"

    .Execute , "CD lpvaadat" ' Returns the directory.

    End With
    Loop Until Inet1.StillExecuting = False
    Do
    With Inet1
    .RemoteHost = "10.0.0.0"
    .RemotePort = "21"


    .Execute , "CD lpvaadat" ' Returns the directory.
    End With
    Loop Until Inet1.StillExecuting = False
    Do
    With Inet1

    .Execute , "GET *.xml c:\temp\ftp"
    End With
    Loop Until Inet1.StillExecuting = False
    Do
    With Inet1

    .Execute , "CLOSE" ' Close the connection.
    End With
    Loop Until Inet1.StillExecuting = False

    but I still get the error 'still executing ...

  4. #4
    Addicted Member chatty's Avatar
    Join Date
    Aug 2002
    Location
    in a house
    Posts
    202
    '******* Untested
    Create a Function call CheckifBusy

    Public Sub CheckIfBusy(inetCurrentConnection As Inet)
    Dim dblI As Double

    dblI = 1
    Do Until inetCurrentConnection.StillExecuting = False
    dblI = dblI + 0.0001
    DoEvents
    Loop

    End Sub

    Then do this


    With Inet1
    .RemoteHost = "10.4.114.36"
    .RemotePort = "21"
    .UserName = "ergo/V239528"
    .Password = "ergo00"
    End With
    Call CheckIfBusy(Inet1)

    Inet1.Execute , "CD lpvaadat" ' Returns the directory
    Call CheckIfBusy(Inet1)

    Inet1..Execute , "GET *.xml c:\temp\ftp"
    Call CheckIfBusy(Inet1)

    and so on....

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Brugge, Belgium
    Posts
    208

    RESOLVED

    Thanks for the quick resolution.

    It's still excuting when I'm writing this reply so I hope I'll get the files I want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width