download image from URL and save it in my PC

how can download image from URL as http://www.abc.com/avvv.jpg

and save this image in my PC
LVL 1
flashaoyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BBK_Connect With a Mentor Commented:
using System.net


WebClient Client = new WebClient ();
Client.DownloadFile(" http://www.abc.com/avvv.jpg", "avvv.jpg ");
0
 
flashaoyAuthor Commented:
how can make it to save in folder name images/  ?
0
 
BBK_Commented:
Client.DownloadFile(" http://www.abc.com/avvv.jpg", "avvv.jpg ");
In this the second parameter you can specify the Foldername and the file name that you want.

EG: IF you wan to save the avvv.jpg into your "MYpicture" as "GreatPic.jpg" folder then give like this

Client.DownloadFile(" http://www.abc.com/avvv.jpg", "C:\Documents and Settings\User\My Documents\My Pictures\GreatPic.jpg ");

0
All Courses

From novice to tech pro — start learning today.