So far it works almost 100%, it downloads the files on the update list but it does not download anything inside a folder. I can't seem to figure that one out.
Here is my code so far:
Dim verNum As Double = My.Computer.FileSystem.ReadAllText("config.ini")
Dim wc As New System.Net.WebClient()
Dim ad As String = "http://127.0.0.1/updates/config.ini"
Dim upVers As Double
Dim fileToDL As String
Dim reader As System.IO.StreamReader
Dim strArray() As String
Dim fileLocation As String
upVers = wc.DownloadString(ad)
If verNum < upVers Then
'Disable start button
My.Computer.Network.DownloadFile("http://127.0.0.1/updates/updatelist.txt", "updatelist.txt")
reader = System.IO.File.OpenText("updatelist.txt")
fileToDL = reader.ReadLine()
Do Until fileToDL Is Nothing
strArray = fileToDL.Split(":")
Dim fragment As String = Nothing
For count = 0 To strArray.Length - 1
fragment = fragment + strArray(count)
Next
fileLocation = "http://127.0.0.1/updates/" + fragment
If System.IO.File.Exists(strArray(strArray.Length - 1)) Then
My.Computer.FileSystem.DeleteFile(strArray(strArray.Length - 1))
End If
My.Computer.Network.DownloadFile(fileLocation, strArray(strArray.Length - 1))
fileToDL = reader.ReadLine()
Loop
'My.Computer.FileSystem.DeleteFile("updatelist.txt")
End If
Here is my updatelist.txt
:LOLIMCOOLDOWNLOADME.txt :superdltst.txt :test.html :Foldertest\:loltestfolder.txt :another cool update.txt :config.ini
Everything downloads except the "loltestfolder.txt" within "Foldertest"


Sign In
Create Account


Back to top









