Skip to main content
Question

Deleting File from Destination Directory

  • April 8, 2020
  • 1 reply
  • 125 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.

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings