5

I have to match the contents of a directory with the attributes of a FeatureClass. The FeatureClass field contains the names (without file endings) of documents which are either .pdf or .jpg files.

I have two directories - one for PDFs and the other for JPGs. I need to match the PDF file names with the FeatureClass Attribute and if they match rename them with the PDF file ending. The ones that are not matched are then obviously JPG.

How can I create the list of files using FME2014?

5
  • Is FME your only option here? I can see this being done with python script.
    – artwork21
    Commented Aug 7, 2014 at 11:47
  • Python is also an option if you have a solution - I was thinking more along the lines of the "Matcher" transformer though Commented Aug 7, 2014 at 12:05
  • What desktop GIS applications do you have (QGIS, ArcGIS, none...etc)?
    – artwork21
    Commented Aug 7, 2014 at 15:38
  • 1
    Already done it with the "directory / path" reader...easy when you know how Commented Aug 8, 2014 at 5:04
  • 5
    Good to hear, please answer your question.
    – artwork21
    Commented Aug 8, 2014 at 10:31

2 Answers 2

1

As you indicated in your comment, this can be done with a Directory and File Pathnames Reader. In the reader parameters, you can set your Path Filter to only search PDF and JPG Files as so:

enter image description here

From there, you can join the results to your features using a FeatureMerger or Matcher transformer, depending on your workflow. You may need to do some string manipulation first, however.

0

FilenamePartExtractor Extracts specified parts of a filename path and returns the results as string attributes.

http://cdn.safe.com/resources/fme/FME-Transformer-Reference-Guide.pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.