I am processing a large number of zip files which each consist of individual shapefiles named polygon, polyline and point. The zip filename is the feature class name. So for example, heritage.zip and Environment.zip both contains shapes named polygon.shp, polyline.shp and point.shp. This is the same for every zip file I need to process. I have created a workbench and used FilenamePartExtractor to try to retrieve the zip file name but none of the information is passed to attributes as I would have expected. Here below is the polygon 'processor' workbench which, if i can get to work, I will be called from a 'caller' workbench. Workbench processing a single zipped polygon shapefile:

As you can see below, there are no path attributes retained in the output feature class.

Attribute table of output

My question is, how do I get the zip file name as an attribute?

2 Answers 2


It's hard to tell what is happening because we can't really see the whole picture. For example, what is the FilenamePartExtractor working on? Is it the fme_dataset attribute? Is the fme_dataset attribute exposed on the source feature type?

Can you run the workspace with feature caching turned on and inspect the results at each step of the translation? So you can ensure that:

  • fme_dataset is exposed on the source data
  • the FilenamePartExtractor is working on that attribute to provide the right info
  • the other transformers don't remove that information for any reason
  • that information is being written (or at least sent to) the output

But - quick guess - either fme_dataset isn't coming through or the attributes aren't connected properly to the output feature type.


Multiple ways to do this, but I would use FeatureReaders, which you can daisy chain, something not possible with classic Readers.

  • Creator to initiate first FeatureReader.
  • FeatureReader reading file or folder (Directory and File Pathnames).
  • FeatureReader reading zip. (Esri Shapefile). Dataset based on path_windows attribute from the first FeatureReader. Set attribute handling to Merge Initiator and Result to merge the attributes from the first FeatureReader to the features of the second FeatureReader.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.