By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

How to import file of the www

P: n/a
Hi!

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")

.... and how do You recommend to import/update file of the net into DataSet
DataTable daily? Any examples available?

--
Thanks in advance!

Mika
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mika M <mika.mahonen@nospam_kolumbus.fi> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.