What code would i need to use in order to download a file from a webserver and then save it to a predefined folder?
Then if a newer version of the file is available, Rename the old file and download the new one.
my.computer.network.download(ur ftp address+filename,username,password,destination folder+filename)
'as i just typed it here so may be the sequence of parameters may be different. so please advance sorry for this.
There are a couple ways of downloading. One is to use the method above. Or, you can use the WebClient component.
' Rename a file
' check if file exist
If System.IO.File.Exists("MyFileName") Then
' move the file (rename)
' there is no "Rename" in .NET
' move actually renames he file.
' Now that we have the file renamed. Download the new file.
Dim WebClient As New System.Net.WebClient