Skip to main content
Question

Deleting File from Destination Directory

  • April 8, 2020
  • 1 reply
  • 150 views

I have a requirment to delete a file if the workspace has failed and I need to revert the output file which I have written. I used python caller to remove by passing a file path as parameter, but the file is not removed from the directory, however the translation is showing as successful with 0 features written.

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.

1 reply

Forum|alt.badge.img
  • April 8, 2020

Hi @rajkumarf3

A quick look at the python caller and your filepath variable does not refer to any attribute

file_path = feature.getAttribute('')

This needs to be 

file_path = feature.getAttribute('file_path')

Just checking that you are running this with a workbench runner as remember if a workspace fails then nothing else get run.

 

Cheers Dave