paulnamroud
Member
- Joined
- Nov 1, 2006
- Messages
- 5
- Programming Experience
- 5-10
Hi everyone,
I need your help.
I'm writing a Vb.Net application which should copy many images (images001.jpg, images002.jpg...) from an URL address (i.e http://mysite.com/images/images001.jpg).
I don't know how to copy each image from the URL address (i.e http://mysite.com/images/) to a network path (i.e \\MyNetwork\Images\).
I had already found on internet a code which allow me to check the existence of any image giving a URL address.
Can anyone tell me how to copy an image from a URL to a specific path ?
Thank you.
Paul
I need your help.
I'm writing a Vb.Net application which should copy many images (images001.jpg, images002.jpg...) from an URL address (i.e http://mysite.com/images/images001.jpg).
I don't know how to copy each image from the URL address (i.e http://mysite.com/images/) to a network path (i.e \\MyNetwork\Images\).
I had already found on internet a code which allow me to check the existence of any image giving a URL address.
Can anyone tell me how to copy an image from a URL to a specific path ?
Thank you.
Paul
VB.NET:
Function ImageExiste(ByVal p_url As String) As Boolean
Dim xmlHttp
xmlHttp = CreateObject("Microsoft.xmlHttp")
xmlHttp.Open("GET", p_url, False)
xmlHttp.Send()
Select Case xmlHttp.status
Case 200 'found
ImageExiste = True
Case 404 'Not found
ImageExiste = False
Case Else 'Some other problem
ImageExiste = False
End Select
'ImageExiste = xmlHttp.Status
xmlHttp = Nothing
End Function
Last edited by a moderator: