Okay, so far so good! I'm able to create a temp and to make the directory more unique I'm able to randomize a directory in the temp directory. I ran into a couple of problems because some files already exist in the direcotry.
I have the code within the Do_Download function
My.Computer.Network.DownloadFile(main_form.WebBrowser1.document.Domdocument.images(i).href, random_dir & "\" & splitted_file(i)) check_file = My.Computer.FileSystem.FileExists(splitted_file(i)) If check_file = True Then Kill(splitted_file(i)) Else Return End If
I did a run on it it gave me some exception error.
Inside the Do_Download function I have:
Dim check_file As String
Which I may have to change to boolean, right?
Well, thanks for the help guys!
P.S. How would I be able to append a number the file? So for example: image1.jpg
this is only if the file exists of course!
then if it tries downloading it again it will put it into image1-1.jpg and so on.

New Topic/Question
Reply



MultiQuote



|