Steps to get files as per the file name

Subhomoy Chakraborty 106 Reputation points
2022-04-27T12:55:41.06+00:00

Hi Team,

I have a source location where I have files as per the screenshot.
197023-image.png

Now I need to prepare SSIS package import export to fetch this file based on the file name.

The logic should be for package 1 it should check date(20220425) and file name (_Cof_Test) and proceed for import.
For package 2 it should check date(20220425) and file name (_Dop_Test) and proceed for import.

I have made 2 packages but unable to fetch the file name dynamically. As of now I hard coded it. Please suggest how to pick the files for each packages.

Please refer the screenshot of the packages.196940-image.png

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. Subhomoy Chakraborty 106 Reputation points
    2022-05-03T13:32:48.087+00:00

    In addition to this I also created a script task within the for each loop as below but it still did not pick up the right file.

    198459-image.png


  2. Subhomoy Chakraborty 106 Reputation points
    2022-05-03T18:37:05.86+00:00

    Hi

    When the file is different and stored in differnent tables having different column name than how to use MFCM? Please suggest.


  3. Subhomoy Chakraborty 106 Reputation points
    2022-05-03T19:48:16.41+00:00

    Hi,

    For point 4 inside for each loop collection I am doing this
    198605-image.png

    But inside variable mappings add variable please let me know what will be the value. Package Name : Cof_Package_SSIS.dtsx

    198622-image.png


  4. Subhomoy Chakraborty 106 Reputation points
    2022-05-03T19:48:57.34+00:00

    It would be great if we can have any screenshare session.

    0 comments No comments

  5. Subhomoy Chakraborty 106 Reputation points
    2022-05-03T21:23:02.19+00:00

    Hi,

    Thanks for your reply.

    Once I am setting the variable within for each loop it is giving error as "The variable might not exist in the correct scope."


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.