Skip to main content
Solved

Read specific files in directories via user parameter

  • February 13, 2025
  • 1 reply
  • 49 views

lennardrty
Participant
Forum|alt.badge.img+1

Hi all

I have an FME Workbench file which has to do the following things:

  1. Ask for multiple directories via a published user parameter
  2. read two files in each directory which end in _changes.shp and _to_remove.shp AND are always located in a subfolder v1 in each directory.

The transformers and writer after that are already doing what they should do, but I can’t seem to confgure my reader to do what I asked here. Is this even possible to do? And if so, how should I do this?

Thanks in advance for the help!

Best answer by bwn

Adding a PATH Reader to the workspace will automatically add a Multiple Folder User Parameter to the workspace as well.

The User then can select Multiple Paths when the workspace is Run 
 

 

The Writer needs a small tweak, to turn Subfolder Recursion to Yes, and can put in an initial filter at least to only return File Paths rather than Folder Paths.  The Path Filter could optionally also be set to *.shp but going to do that in the next Tester step anyway.
 


So then can flow all these File Paths into a Tester to find which meet the file filtering rules
 



and can then send these filtered file paths to a SHP FeatureReader
 




 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • Best Answer
  • February 14, 2025

Adding a PATH Reader to the workspace will automatically add a Multiple Folder User Parameter to the workspace as well.

The User then can select Multiple Paths when the workspace is Run 
 

 

The Writer needs a small tweak, to turn Subfolder Recursion to Yes, and can put in an initial filter at least to only return File Paths rather than Folder Paths.  The Path Filter could optionally also be set to *.shp but going to do that in the next Tester step anyway.
 


So then can flow all these File Paths into a Tester to find which meet the file filtering rules
 



and can then send these filtered file paths to a SHP FeatureReader
 




 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings