using WebClient.DownloadFile

motins

New member
Joined
Aug 3, 2006
Messages
1
Programming Experience
Beginner
If there is a cached copy of sUrlToDownload in my PC then my function do not retrive the desired file from the internet, but only copy from the cache. How can I avoid this problem?

Function
bDownload(ByVal sUrlToDownload As String) As Boolean
Dim sOd As String
Dim myWebClient As New WebClient
sOd = "c:\filetostore.txt"
If File.Exists(sOd) Then File.Delete(sOd)
'*********************************************

myWebClient.DownloadFile(sUrlToDownload, sOd)

'*********************************************
bDownload = File.Exists(sOd)
End Function
 
Back
Top