Hi Jonathon,
here is the file renaming plus download sequence which I placed into
the action method of a push button:
Dim http As New HTTPSocket
Dim fi, fo As FolderItem
Dim result As Boolean
fo = GetFolderItem("").Child("MedDirectoryDB.old")
If fo.Exists Then
fo.Delete()
End If
fi = GetFolderItem("").Child("MedDirectoryDB.rdb")
If fi.Exists Then
fo = GetFolderItem("").Child("MedDirectoryDB.old")
fi.MoveFileTo(fo)
End If
result = http.Get ("http://www.onclicksoftware.com/updates/
MedDirectory2007_UPD.txt", fi, 60)
If result = True Then
MsgBox ("File " + fi.DisplayName + " has been downloaded
sucessfully")
Else
MsgBox ("Download failed, Error:" + str(http.LastErrorCode))
End If
Markus
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>