Skip to main content
Question

Multiple files to read as a parameter


fikusas
Contributor
Forum|alt.badge.img+5

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

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • March 6, 2020

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"" 

fikusas
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • March 6, 2020

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


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