Question

How to change file extension

  • 9 June 2022
  • 1 reply
  • 17 views

I have been trying to change a file extension from .bil into .flt based off this link https://community.safe.com/s/question/0D54Q000080hEslSAE/how-to-change-filename-extension-via-fme

But I cant get the FeatureMerged to merge what am doing wrong?

There will be other files and different file types in the same Folder so not sure yet, if this process/workflow will change the other files as this would not be desired.

But for now I'm just trying to get the FeatureMerger to work.


1 reply

Userlevel 3
Badge +16

If you run it with full inspection up to the FeatureWriter, you'll see that the _dataset attribute your FeatureMerger will be using has the value "D:\\AN\\FLT\\Out", which is the name of the folder, not the name of the file.

The role of the feature merger in this workspace is to wait until the filecopy has completed before progressing to deleting the original file with the system caller.

On the FeatureWriter, I would add path_windows as an Additional Summary Port Attribute, and use that attribute in the FeatureMerger instead.

imageMake sure you test the file copy has worked correctly before running the workspace with the system caller enabled.

 

You will also need to add a Tester to filter out unwanted file names or file types which the path reader is reading in. As you have it, it will read all filenames in that folder, and create a copy with the .flt extension.

 

 

Reply