Reputation: 999
I want to load a .csv file that is dropped in a specific directory but the filename is suffixed with YYYYMMDD, eg. MyFile_YYYYMMDD.csv.
The directory is cleared out everyday and a new file is dropped, ie. there is only ever 1 file in the directory.
Is there a (simple?) way to code a wildcard filename, eg. MyFile_*.csv, that can be used by the Connection Manager without having to use a Foreach Loop Container or a Script?
Upvotes: 2
Views: 22274
Reputation: 1836
Yes, with the Foreach Loop Container
you can use the Foreach File Enumerator
to loop through a certain directory. In the Files
property of that enumerator you can use wildcards, e.g., MyFile_*.csv.
Map a variable to the fully qualified file name and push that variable to your connection manager with an expression.
Upvotes: 5