How to download from a dynamic link using SSIS?

  • Hi everyone,

    So I have a ssis package in which I download a excel file and import the contents of the file to SQL tables.

    Issue I am facing is that the download link changes of the file frequently.

    Today the download link is:

    But tomorrow the "FileID=" will change as new file will be uploaded here:



    Below is the code for downloading the file:

    How can I get the latest download link? Can anyone help me?


      public void Main()

    ServicePointManager.Expect100Continue = true;
    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;


    //below code is for downloading UAE_LTL xls data
    string myURI5 = "";
    string forSDN5 = "LS 230222.xls";
    string myWebString5 = null, myLocalPath5 = null;
    //forSDN4 = forSDN4.Replace(forSDN4, "");
    myWebString5 = myURI5;// + forSDN5;
    myLocalPath5 = "D:\\6_downloaded_files\\" + forSDN5;
    WebClient myWebClient4 = new WebClient();
    myWebClient4.DownloadFile(myWebString5, myLocalPath5);


    catch (Exception ex)
    Dts.Events.FireError(18, "The process failed", ex.ToString(), "", 0);
    Dts.TaskResult = (int)ScriptResults.Failure;

    #region ScriptResults declaration
    /// <summary>
    /// This enum provides a convenient shorthand within the scope of this class for setting the
    /// result of the script.
    /// This code was generated automatically.
    /// </summary>
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure



    • This topic was modified 2 months, 2 weeks ago by  Jobs90312.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply