Skip to main content
Archived

Parameter to control overwriting destination files

  • Jan 13, 2016 12:00 AM UTC
  • 6 replies
  • 68 views

redgeographics
VIP
Forum|alt.badge.img+63

By default FME will happily overwrite existing destination files but sometimes that's not what you want. In that case either terminating the process or halting and prompting for a new filename could save a lot of trouble.

It could be a workspace parameter with 3 settings:

  • always overwrite (the current behaviour)
  • prompt
  • terminate

I guess it'd be similar to a FileExistenceChecker with some additional processing, but wrapped up nicely.

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.

6 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • Jan 13, 2016 3:58 PM UTC

On some formats (GDB, XLS, TXT) this already exists.

Would be nice to have this on all file and folder formats!


jdh
Contributor
Forum|alt.badge.img+41
  • Contributor
  • Jan 13, 2016 6:26 PM UTC

For the xls and text, the parameter switches behaviour silently from overwrite to append, what redgeographics is asking for is a sanity check (this file already exists, are you sure you want to overwrite it?)

The problem is on folder based formats that have feature type fanouts, the filename isn't known until the feature get's written.

 

 

However on file based formats this would be nice functionality.

redgeographics
VIP
Forum|alt.badge.img+63

Yes, as @jdh points out it's a sanity check and indeed fanouts may make this more complex.


Forum|alt.badge.img+5
  • Jan 15, 2016 10:19 AM UTC

I would also like a versioning system option where a new folder is created with a unique number or date. That way you can view all the outputs of a series of tests without having to change a workspace parameter each time.


jdh
Contributor
Forum|alt.badge.img+41
  • Contributor
  • Jan 15, 2016 2:48 PM UTC

You can do that currently with scripted parameters.

One published parameter for the root directory [Folder (Output)], one private scripted parameter that appends a timestamp or increments against existing folders. The writer is set to the private parameter.


  • Jul 21, 2016 2:50 PM UTC

Maybe another option would be nice.. Skip outputs that already exist