Skip to main content
Hi there,

 

 

I'd like to use the folder name of the location of my shapefiles as a attribute value.

 

I've exposed fme_dataset t provide me with:

 

C:\\Deployment\\FME Workspaces\\Stats\\April\\Network.shp

 

 

It's just a simple xls writer, with a "Source" attribute I created. All I want populated in the "Source" attribute is "April" or whatever else the base folder where the shapefiles are located is named.

 

 

 

Thanks in advance,
Hi,

 

 

a format attribute named "fme_dataset" contains the full path of the source file. Expose it in the reader feature type. You can then use the FilenamePartExtractor transformer to extract the folder name as an attribute.

 

 

Hope this helps,

 

Takashi
Works Fantasticall.

 

 

Don't know how I missed this one, but thank you!

Reply