I have 15 .csv files with different names but the same fields and a total of 1406 records. They are in the same directory. I want to merge all 15 files together and append the source file name to each record. I've tried FilenamePartExtractor, FilePathExtractor, and FeatureReader but haven't been able to to get the desired result. I usually get back more records than I put in. Is there a straight forward method to append file name to each record?
Page 1 / 1
I'm not sure what the FilePathExtractor does, but based on the description on FME Hub I'm doubting it's what you want.
The easiest is probably to expose the feature attribute "fme_basename" on the reader and then rename it as required before writing. This attribute will contain the source CSV filename minus the file extension.
Wow! That was simple. I wasn't familiar with the term "basename". I was looking for filename or windows parameters