Question

Naming an output file based on parts of the Readers/Tabs folder name and file name

  • 31 December 2013
  • 1 reply
  • 2 views

Is it possible to automatically name the output writer based on parts of the folder name the reader/TAB came from AND the name of the reader itself?

 

 

For example, This is the folder where the reader/TAB came from:

 

"KNKA208 CMA 028A Indianapolis"

 

 

And the readers/TAB name is "Authorized CGSA"

 

 

and I want the output to be named:

 

"A-KNKA208-028-Indianapolis-Authorized CGSA"

 

 

 

Thanks!

 

Joseph

1 reply

Userlevel 2
Badge +17
Hi Joseph,

 

 

The FilenamePartExtractor transformer can be used to get folder name and file name of the source file from "fme_dataset" (a format attribute). You can then create the destination file name using the StringConcatenator, and use "fanout" option of the writer.

 

Takashi

Reply