takinh excel file path and name dynamically RRS feed

  • Question

  • hi,

    i am getting two excel file ,so two excel source.

    nwo my file path can be anywhere and file name can be anything.

    hwo to make it dynamically so it pick up it automatically

    Wednesday, November 7, 2012 7:30 PM


  • Hi

    You need to set the file path in a configuration of the SSIS package as \\servername\remotepath. Avoid the share naming (as e:\dira\dirb), use UNC as I gave you and make sure the account executing the package can access the remote location.

    To make the package picking any file add a ForEachLoop Task and in its Files property set the mask to *.* this wildcard would accept any file. And the loop will accept any amount of such files.

    The Retrieve File Name property is typically set to Fully Qualified to get the entire path retrieved.

    And an example to support my design: http://www.sqlis.com/sqlis/post/Looping-over-files-with-the-Foreach-Loop.aspx

    Arthur My Blog

    • Marked as answer by Eileen Zhao Wednesday, November 14, 2012 7:18 AM
    Wednesday, November 7, 2012 7:37 PM