See if this helps to download all web files from a ListBox.
Dim myFolder As String = "C:\" '// folder to save files to.
Dim sFileExtension As String = Nothing '// string to get the file extension from web file.
Dim iFileNameNumber As Integer = 0 '// used to save file names as #'s.
For Each itm As String In ListBox1.Items '// loop thru all items.
sFileExtension = itm.Substring(itm.LastIndexOf("."c)) '// get file .Extension from web file path of ListBox item.
iFileNameNumber += 1 '// increment for FileName.
My.Computer.Network.DownloadFile(itm, myFolder & iFileNameNumber & sFileExtension) '// Download file.
Next
MsgBox("Files Download Successful.")
codeorder
Postaholic
2,124 posts since Aug 2010
Reputation Points: 256
Solved Threads: 387
Skill Endorsements: 8
Can you post the entire For/Next loop code and specify which line is giving you the finger, I mean "error".:D
codeorder
Postaholic
2,124 posts since Aug 2010
Reputation Points: 256
Solved Threads: 387
Skill Endorsements: 8
Question Answered as of 2 Years Ago by
codeorder