Skip to main content
Solved

Write file in the same directory where source file is

  • March 3, 2020
  • 4 replies
  • 83 views

lukas108
Contributor
Forum|alt.badge.img+7

Hello, I need to write the resulting file to the same directory where my source file is, no matter where is the workspace. However, variables cannot be inserted into the writer's destination directory. Can anyone help?

Best answer by takashi

Hi @lukas108, a possible way is to use the FetureWriter to write the destination dataset. You can set an attribute (or a string expression) to the Dataset parameter (i.e. the destination deirectory) in the FeatureWriter.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • Best Answer
  • March 3, 2020

Hi @lukas108, a possible way is to use the FetureWriter to write the destination dataset. You can set an attribute (or a string expression) to the Dataset parameter (i.e. the destination deirectory) in the FeatureWriter.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • March 3, 2020

Another way to do this is to use a python scripted parameter to set the writer location


redgeographics
Celebrity
Forum|alt.badge.img+62

As a general note: make sure you don't try and overwrite your source file (been there myself...), be very careful about filenames because FME will happily overwrite existing files without warning and if that's the source file while it's also reading it at the same time it ends up corrupting the file.


lukas108
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 4, 2020

Hi @lukas108, a possible way is to use the FetureWriter to write the destination dataset. You can set an attribute (or a string expression) to the Dataset parameter (i.e. the destination deirectory) in the FeatureWriter.

That´s it. Thank you.