I have a folder that automatically receives different .txt files on a daily basis. There are many different .txt files with different names, but the files I'm interested in loading are the same format, extension, and named the same, with the exception that the date is added to the end of the file name. For example, each file is named TextFile_20230829.txt, TextFile_20230830.txt, TextFile_20230831.txt... etc.
I'm looking to load the .txt file to a table in SQL Server on a weekly basis and would like to load the files for each day that week.
For example: I would run the SSIS package on Friday, 9/1, and it would loop through the folder and load each file (TextFile_20230828.txt, TextFile_20230829.txt...TexFile_20230901.txt), but would not load the other files, such as OtherTextFile_20230829.txt.
I've looked at similar questions on here and know I'll need a Foreach Loop Container, but I can't find anything that specifically handles dynamic file names.