I would like to use a node Delete Files/Folders to clean a directory. This directory should be filled in the workflow with new files.
If the directory is not available, the delete node fails and stops the workflow.
Sure it is right, that it couldn’t delete something but that’s correct. The checkbox “Fail if delete fails” is unchecked and the workflow is still stopped.
What can I do, that if the folder exists it is deleted and if it doesn’t exists the workflow isn’t stopped?
As a workaround you can try following. Use Create Folder node with desired directory. How does it works (at least when I have tested it) is it will create this directory/folder if it’s missing and won’t do anything if it already exists. Then Delete Files/Folders shouldn’t fail.
Of course, there are other ways to tackle this but if works this seems like simplest and fastest. Give it a try and let me know how it works.
well I think it’s only related to successful deletion of files and not folder existence. For that new option should be added (checkbox) which would allow to handle node behavior in case folder does not exist. But this is question for someone on KNIME team.