Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 Can Foreach Loop Container use wildcards for files

Author  Topic 

mgreen84
Yak Posting Veteran

94 Posts

Posted - 2014-12-03 : 13:27:01
Can I have a Foreach Loop Container only loop on files names that contain certain words?

I tried the following :
*Fileaaaa*.csv, *Filebbb*.csv, *testtestFilexx*.csv

But that doesn't work for me. I have a file system task inside of the Foreach Loop, because I want it to move these files to a new location but it isn't working for me.

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-12-03 : 13:40:43
check out this article: http://www.codeproject.com/Tips/803195/Foreach-File-Enumerator-in-SSIS

SSIS is pretty good at iterating with wildcard patterns. I use it all the time.
Go to Top of Page

mgreen84
Yak Posting Veteran

94 Posts

Posted - 2014-12-05 : 09:50:23
quote:
Originally posted by gbritton

check out this article: http://www.codeproject.com/Tips/803195/Foreach-File-Enumerator-in-SSIS

SSIS is pretty good at iterating with wildcard patterns. I use it all the time.



Thanks, I was able to use a sequence container in a for each loop to achieve this.
Go to Top of Page
   

- Advertisement -