Skip to main content

Hello,

I am a FME beginner and I really love that whole folders can be added to a writer. However, I do have folders which contain many files of the same format each and I would like to add a folder to a reader and let FME guess the format of the files in that folder.

It seems that this is not possible but only one of the two (add folder OR guess format from dataset)?

thanks and best regards,

Ludwig

Hi @ludhil, it seems that FME guesses the source format based on the file extension of a file when you set it to the Dataset field. FME cannot guess format from a folder path, but I think you can once set a file path containing the extension for your desired format to the Dataset field in order to let FME guess the format. You can then remove the file path and re-set the target folder.

Just be aware that FME doesn't always guess the source format correctly, since there are formats using the same extension.


Hi,

1. Use Format as Directory and File Pathnames

2. Use Attribute Filter based on path_extension attribute

3. Map the appropriate format to FeatureReader transformer and read the data as required

4. Disable the feature readers before running and check whether all the files are passed to feature readers and only unwanted features are in unfiltered port. If any valid features are present in Unfiltered port (like dgn file in the above example) then add the additional filter and feature reader. Once you are confirmed that you have left with unwanted (like shx,prj,dbf files of shape file are unwanted) in Unfiltered port then enable the feature readers and proceed.

Hope this help


Reply