Sub Process_Globals
Dim ftp As FTP
Dim ftp2 As FTP
Dim root As String = "/GoFlex Home Public/"
End Sub
Sub AppStart (Args() As String)
ftp.Initialize("FTP","192.168.0.11","21","xxxxx","xxxxxxx")
ftp.TimeoutMs=30000
ftp.PassiveMode=True
ftp.List(root)
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log(ServerPath)
If Success = False Then
Log(LastException)
Else
For i = 0 To Folders.Length - 1
Log(Folders(i).Name)
ftp2.Initialize("FTP","192.168.0.11","21","xxxxxx","xxxxxx")
ftp2.TimeoutMs=30000
ftp2.PassiveMode=True
ftp2.List(root&Folders(i).Name)
Next
End If
End Sub
Sub ftp2_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
For Each f As FTPEntry In Files
Log(f.Name)
Next
End Sub