I am processing a directory of XML files. I have set the source dataset to just .../*.xml
However, I would like to save the results according to the source Filename. How do I set the output filename to be the same as the input filename?
I am processing a directory of XML files. I have set the source dataset to just .../*.xml
However, I would like to save the results according to the source Filename. How do I set the output filename to be the same as the input filename?
@robertdbuckley Click on the settings icon on your reader and select the Format Attributes tab. Check the fme_feature_type. Now, go to the writer properties and in the Name option, click on the downward triangle button and from Attribute value, select fme_feature_type. Now, from the Navigator pane, drop down the writer and open the Fanout Expression and select fme_feature_type from there.
The output will be in the defined folders.
I think for xml files you will need to expose the fme_basename, this can then be used to set the name in the writer
In addition to what the others said, here's the documentation (what you're looking for is called a "fanout" in FME):
@robertdbuckley Click on the settings icon on your reader and select the Format Attributes tab. Check the fme_feature_type. Now, go to the writer properties and in the Name option, click on the downward triangle button and from Attribute value, select fme_feature_type. Now, from the Navigator pane, drop down the writer and open the Fanout Expression and select fme_feature_type from there.
The output will be in the defined folders.
Thanks for the replies. I was trying to find the way to expose the basename and your method worked. I just used basename instead of featureclass.