Time for action – reading all your files at a time using a single text file input step and regular expressions
You can do the same thing that you did previously by using a different notation. Follow these instructions:
Open the transformation that reads several files and double-click on the Input step.
Delete the lines with the names of the files.
In the first row of the grid, under the
File/Directory
column, type the full path of the input folder, for exampleC:\pdi_files\input
.Under the
Wildcard (RegExp)
column type(usa|europe)_[0-9]{6}\.txt
.Click on the Show filename(s)... button. You will see the list of files that match the expression:
Close the tiny window and click on Preview rows to confirm that the rows shown belong to the files that match the expression you typed.
What just happened?
In this case, all the filenames follow a pattern: usa_201209.txt
, usa_201210.txt
, and so on. So, in order to specify the names of the files you used a regular expression. In the column File/Directory
...