However in this case each directory contains two xml files, one always called metadata.xml and the other is different for every directory. I only want to read the xml file that changes, not metadata.xml.
Ideas?
However in this case each directory contains two xml files, one always called metadata.xml and the other is different for every directory. I only want to read the xml file that changes, not metadata.xml.
Ideas?
Would that work for your issue?
This is adding a not insginificant amount of time by reading in the unecessary files and I was hoping there is an alternate solution
I'm not aware of a way to restrict or create a name exception other than writing a batch file to first copy all the files you want to a new folder structure (without the metadata.xml files), then call FME on the next command line and then delete the copied data as the last step.
Anyway, in this case you could use the Directory and File Path Reader to read your top level folder and all containing xml file locations not the actual files. So still rootdir\\**\\*.xml. Then each feature will have an attribute windows_path = c:\\folder\\folder\\1.xml and c:\\folder\\folder\\metadata.xml. Use the FilenamePartExtractor to get the filename into an attribute and then test for metadata.xml and throw away those features, then send the path to the XML you are interested in to the workspace that processes it using the WorkspaceRunner. This would assume a batch process dealing with 1 xml file at a time. You could alternatively concatenate all the files you want to read into one long string and pass that across to the slave workspace as its input list of files to read in one go in the required structure, so:
C:\\folder\\folde\\1.xml,C:\\folder\\folde\\2.xml,C:\\folder\\folde\\3.xml
Hope that helps