(SSIS) For Each Loop Container can not find file

0

Hello. I need to mount a task in SSIS that finds a CSV file in a folder on the network and imports that file into a table. It looks very simple, but the detail is that the directory changes name every day, with the mask Z: \ Folder \ Year \ Month \ Day. I created a Foreach Loop Container where I parameterized the variable @DirectoryVenuation, in which I put the path Z: \ Folder, and created an expression to concatenate this path with the current year, month and day, forming the complete path. In the Files field, I put '* .csv', since I want it to import any file with the CSV extension that is inside the folder. I put a DataFlow inside the ForEach Loop Container to transfer from the Flat File to the target table. When running the package, Foreach Loop Container does not find any files, and consequently does not matter at all. I could not figure out which step I did wrong. In the Flat File Connection Manager I put the same variable, @DirectoryVenuation. Would anyone have any ideas for trying to help me? Here are the prints of how the package is configured:

EDIT: It is not that the directory changes its name, but every day I need to look in a different subfolder referring to the Day, when I see the month, I need to look in another folder for the month, etc.

    
asked by anonymous 23.10.2018 / 17:15

0 answers