Sub DownloadFile
Public TransferJob As HttpJob
TransferJob.Initialize("", Me)
TransferJob.Download(DownloadfileURL)
Log("Download started...")
End Sub
Private Sub JobDone (TransferJob As HttpJob)
If TransferJob.Success Then
Dim out As OutputStream = File.OpenOutput(DownloadFileDrive, SaveDownloadedFileAS, False)
File.Copy2(TransferJob.GetInputStream, out)
out.Close
Log("Download complete")
Else
Log("Error: " & TransferJob.ErrorMessage)
End If
TransferJob.Release
End Sub