Skip to main content

I have almost 100 subdirectories, each with shapefiles of the same names, eg:

/dir1/FileA.shp

/dir1/FileB.shp

/dir2/FileA.shp

/dir2/FileB.shp

/dir99/FileA.shp

/dir99/FileB.shp

 

Not only are there almost 100 directories, there are also about 30 shapefiles in each.

Is there a smart way to get an FME workbench to read all these subdirectories (they are all stored under a common "mother directory") and files, so that I can merge them into one Shapefile each?

 

What I want is to merge all FileA.shp into one file, all FileB.shp, into another, and so on.

You can use a featurereader to read all shape files within a certain parent directory if you set the dataset path to something like

C:\ParentFolder\**\*.shp

You can then use the schema to dynamically write out to shape files, one per featuretype (filename)


You can use a featurereader to read all shape files within a certain parent directory if you set the dataset path to something like

C:\ParentFolder\**\*.shp

You can then use the schema to dynamically write out to shape files, one per featuretype (filename)

Thanks @ebygomm​ , that made my day a LOT easier - just like FME should. 😃 

(Not sure that I did it by the book, but it works):

Skärmklipp_FME


Thanks @ebygomm​ , that made my day a LOT easier - just like FME should. 😃

(Not sure that I did it by the book, but it works):

Skärmklipp_FME

nice! A good solution to this problem would to build a dynamic workflow. That way, if new (named) shapefiles are added, then you don't need to import new feature classes on your reader or create new ones on your writer

 

https://community.safe.com/s/article/dynamic-workflow-tutorial-introduction


Reply