Configuring an SSIS ForEach Loop for Multiple File Types


The Problem

The SSIS Foreach Loop component has a limitation when it comes to selecting different sets of files from a folder, for example, it can be easily configured to loop through TXT files or PDF files or even all types of files by setting the Files parameter equal to « *.TXT », « *.PDF », « *.* » respectively, but what if we want to look for TXT files and PDF files at the same time and skip all other types of files?  There is no option available to set the Files parameter to « *.TXT », »*.PDF », however that can be achieved by creating a small script