|
-
Aug 19th, 2002, 07:48 AM
#1
Thread Starter
Addicted Member
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
-
Aug 19th, 2002, 08:05 AM
#2
Addicted Member
After each execute you have to check if the control is still busy if not then resume next execute
-
Aug 19th, 2002, 08:13 AM
#3
Thread Starter
Addicted Member
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 ...
-
Aug 19th, 2002, 08:20 AM
#4
Addicted Member
'******* 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....
-
Aug 19th, 2002, 08:38 AM
#5
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|