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

retrieve a picture from a website and save to disk

P: n/a
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.
how would i do this? thanks!
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Brian Henry" <br**********@newsgroups.nospam> schrieb:
I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.


Take a look at 'WebClient.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2

P: n/a
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this link
above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.
how would i do this? thanks!

Nov 21 '05 #3

P: n/a
"Brian Henry" <br**********@newsgroups.nospam> schrieb:
I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.


Take a look at 'WebClient.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

P: n/a
that actually is amazingly simple thanks!

"Cor Ligthert" <no************@planet.nl> wrote in message
news:e%******************@TK2MSFTNGP12.phx.gbl...
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this
link above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local
file. how would i do this? thanks!


Nov 21 '05 #5

P: n/a
that actually is amazingly simple thanks!

"Cor Ligthert" <no************@planet.nl> wrote in message
news:e%******************@TK2MSFTNGP12.phx.gbl...
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this
link above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local
file. how would i do this? thanks!


Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.