title: How to overwrite downloaded file vb.net
body: <p>I'm making a automatic file downloader and I need it to redownload and overwrite the file, when i press the button.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    My.Computer.Network.DownloadFile _
      ("http://www.randomurl.com/randomfile.txt", _
      Path.Combine(Environment.GetFolderPath( _
      Environment.SpecialFolder.ApplicationData), _
      "test/randomfile.txt"))
  End Sub
  </code></pre>