none
Download Multiple CSV files from different url using script component RRS feed

  • Question

  • Hi 

    Can you please guide me how to download multiple files hosted on different url's. I need to assign different names of files in Destination folder. 

    I am not much into Scripting, so any help would be high appreciated.

    Thanks

    Raj

    Tuesday, August 9, 2016 8:02 PM

Answers

  • Hey Raj,

    you are welcome,

    OK, so the process starts with creating a HTTP connection which is quite easy.

    I think you can just create 15 of them by copy paste and replace the URL. It is also possible to loop through the URLs in a ForEach Loop, but in my view this is too advanced for now for you.

    So, to make the story short, this blog post has the rest including the code for the Script Task.

    Do let us know if you stumbled onto something odd you cannot overcome yourself.


    Arthur

    MyBlog


    Twitter

    Tuesday, August 9, 2016 10:55 PM
    Moderator

All replies

  • Hi Raj,

    Please see related posts as https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1391351c-7cec-4afb-b69f-48fc5725ffeb/how-to-automate-http-download-using-ssis?forum=sqlintegrationservices

    This question is too generalized, there is a difference depends on whether it is http or https or else, also not sure if you are asking about scripting and posted into the SSIS forum.


    Arthur

    MyBlog


    Twitter

    Tuesday, August 9, 2016 8:26 PM
    Moderator
  • Hi Arthur 

    Thanks for getting back. 

    I have 15 different url's for which i have to download 15 CSV files. How can this be done in a script component

    Thanks

    Raj

    Tuesday, August 9, 2016 8:33 PM
  • Hey Raj,

    you are welcome,

    OK, so the process starts with creating a HTTP connection which is quite easy.

    I think you can just create 15 of them by copy paste and replace the URL. It is also possible to loop through the URLs in a ForEach Loop, but in my view this is too advanced for now for you.

    So, to make the story short, this blog post has the rest including the code for the Script Task.

    Do let us know if you stumbled onto something odd you cannot overcome yourself.


    Arthur

    MyBlog


    Twitter

    Tuesday, August 9, 2016 10:55 PM
    Moderator
  • Thanks Arthur 

    This worked for me 

    Regards

    Raj

    Wednesday, August 10, 2016 2:36 PM