combining a param value with widcards in a foreach loop files property

  • Hi, it isnt clear from the web if something like this should work as i try to limit the files i pick up in a for each loop to ones having my current rundate param of format yyyy-mm-dd (string) in the name.   My test doesnt pick up such files even though i know they are there.  can the community comment?   i'm trying to avoid adding other ways of filtering thru extra components.    inside the for each loop container, i save the current file name to a table and then have 6 choices of dft's that execute depending on another part (eg Sales) of the name in the file.  It (the for each loop level) and everything else all work fine with a hardcoded "files" mask that looks like this  *.txt and even *2025-09-25*.txt.   I have the RunDate's value currently as string 2025-09-25 with sensitive=false and required = true.

    wildcard99

  • Thanks for posting your issue and hopefully someone will answer soon.

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

  • i believe i got it with the help of AI searching for a response to "ssis for each file enumerator i want a wild card concatenated to a variable value to filter my files" .

    I have a pkg param called RunDate which is string and its current value is 2025-09-25.   In the filespec attribute (edit for each loop container->collection->expressions under enumerator->filespec) i entered this expression "*"+ @[$Package::RunDate] +"*"+".txt" and it worked.

    i was thrown off a bit after seeing its resolved value show up in the "Files: " box under "Folder " under "Enumerator configuration" in the foreach editor.  But apparently those 2 things (Files: box and filespec) are linked.   But i dont think you can enter an expression like that right into the Files: box.   You can however enter a simple wildcard like *2025-09-25*.txt into the Files: box.

    • This reply was modified 2 weeks, 5 days ago by stan.

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

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