'Now that we have the filenames for the latest frames, lets download them one by one.
For I = 0 To FileNames.Length-1
job1.Download("http://xxxxxxxxxxxxx/files/" & FileNames(I))
Wait For (job1) JobDone(job1 As HttpJob)
If job1.Success Then
Dim out As OutputStream = File.OpenOutput(File.DirApp, i & ".tif", False)
File.Copy2(job1.GetInputStream, out)
out.Close
Else
Log(job1.ErrorMessage)
Return 0
End If
job1.Release
Next