Results 1 to 6 of 6

Thread: [RESOLVED] how to download multiple text files from website

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2014
    Location
    Providence, RI
    Posts
    14

    Resolved [RESOLVED] how to download multiple text files from website

    I am looking for some suggestions at this point and I was wondering what type of routine I would have to create to download each of these text files individually from a website. I currently can download each new file at this point and name the text file and time stamp it but I was wondering how I could retroactively do this. I was thinking I would have to try to loop through each day, month, and year combination from 20120901 to the present day or is there a way that I can harvest the names off of the website? I put my code on here for downloading the textfile and was planning on setting up a timer to automatically perform this routine. If you see anything that could be optimized in this code let me know I'm pretty new at this and at this point am still trying to figure things out. Thanks!!

    Code:
    Dim FileEndDate As Integer = DateTime.Now.ToString("yyyyMMdd")
    
    
    
            My.Computer.Network.DownloadFile(New Uri("http://www.website.com/bounces/Non%20BounceMessages_" & FileTodayDate & ".txt"), "C:\work\Read\Unwritten\" & " Bounces__" & FileDate & ".txt")
            MsgBox("file downloaded")
            Me.Close(
    Name:  bouncespic.jpg
Views: 683
Size:  116.5 KB
    Last edited by ktolso03; Mar 25th, 2014 at 02:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width