Forum Discussion
Normally it should work in the fashion you describe, i have never used the ForEach. But try to create a child pipeline which will be executed by a pipeline execute snap and get the source file path from the Directory browser or a file poller snap.
First pipeline would be a Directory browser -> Pipeline execute
Second pipeline would be File reader -> CSV Parser (if this is what you need) -> Mapping -> CSV formatter -> File writer
Easiest way is that you construct and send the target filename as a pipeline parameter to the second pipeline, this way you can access it from the file writer snap easily via expression _target_filename for example
Make sure to set the batch size to 1 for the pipeline execute snap, it will execute the pipeline once for each file.
Suggestion on how to construct the target filename:
$Path.match(/\/([^\/]*?)\.[^\/]*$/)[1] + "_" + Date.now().toLocaleDateTimeString({"format":"yyyyMMddHHmmss"}) + ".csv"