Question

Multiple files to read as a parameter


Badge

Is it possible to read in multiple files from a parameter with FeatureReader? For example:

C:/some_path/fileA.shp

C:/some_path/fileB.shp

SourceDataset parameter value would be: C:/some_path/fileA.shp,C:/some_path/fileB.shp

But this approach doesn't work, it gives an error.


2 replies

Badge +10

To pass a list of files as a parameter each filepath would be wrapped in quotes then the list is wrapped in quotes separated by a space

e.g.

""C:\Temp\File1.tab" "C:\Temp\File2.tab"" 
Badge

Is it possible to get combined paths via private attribute using Python script? I use this code, but it doesn't work:

import os
shapefile = FME_MacroValues['SourceDataset'].split("\" \"", 1)[0].replace("\"\"", "")
return os.path.dirname(shapefile)

Reply