copy pic from web pt 2

jnash

Well-known member
Joined
Oct 20, 2006
Messages
111
Programming Experience
Beginner
i thought that this line would work but it doesnt whats wrong with it it keeps on erroring


tempfile is a string "http://ec2.images-amazon.com/images/P/B0002DXN6I.02._SCLZZZZZZZ_.jpg"

movelocation1 is a string
""C:\Documents and Settings\halo9\My Documents\Visual Studio 2005\Projects\SuperVids\SuperVids\bin\CustomerPics\Spooks: Season 2 [2002].jpg""

and this error - {"The given path's format is not supported."}


VB.NET:
Dim web As New Net.WebClient
            web.DownloadFile(tempFile, Movelocation1)
            MsgBox("File Saved To System")

any ideas thanks Jon
 
":" is an illegal character in filenames. Path class has the list of chars that you can't use. Example to make a clean filename:
VB.NET:
Dim wrong As String = ":file.jpg"
Dim right As String = String.Concat(wrong.Split(IO.Path.GetInvalidFileNameChars))
 

Similar threads

Back
Top