How to import file of the www

  • Thread starter Thread starter Mika M
  • Start date Start date
Mika M said:
How can I check that file exists in the internet, because for example the
following is NOT working ...

blnExist =
System.IO.File.Exists("http://www.suomenpankki.fi/ohi/fin/0_new/0.1_valuutta
k/fix-rec.txt")

No, and indeed it shouldn't. System.IO.File is about file system
objects, not web pages.
... and how do You recommend to import/update file of the net into DataSet
DataTable daily? Any examples available?

Download it using WebClient or WebRequest. If those give you a 404
(HttpStatusCode.NotFound) then that's the equivalent of the file not
existing.
 
Back
Top