Sub Service_Create
FTP.Initialize("file_transfers", "ftp://www.myserver.com", 21, "user", "password")
End Sub
sub download_file_click
FTP.DownloadFile("/tablet/database/wine_tablet.db", False, File.DirRootExternal, "wine_tablet.db")
end sub
Sub FTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
Dim s As String
s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success=True Then
File.Copy("File.DirRootExternal","wine_tablet.db","File.DirDefaultExternal","wine_tablet.db")
End If
End Sub