Open timosachsenberg opened 7 years ago
And would be nice if it accepted folders with and without the file:// prefix
I opened PR #235 to address this issue. However, I only added a checkbox. I don't know if changing the node to behave like the Create Folder node of KNIME makes sense. That node explicitly has the task to create the folder, which is not the case here. If you want to create a folder using a variable, you could just use the KNIME Create Folder beforehand and pass the whole folder path to the Output Folder node using a variable.
@jpfeuffer The file:// prefix seems to work for me. Do you have an example were it does not? Then I can fix that in the PR as well.
I'll recheck the prefix thing.
I think I meant passing a URI from a Workflow variable to the Output Folder settings. If we would resolve the URI to a Path in the Node, you would not need to do nasty String Manipulations all the time. I think that would also allow to give knime: URLs to the Output nodes.
Unless I misunderstand you, this already works (on branch "develop"). In the screenshot below the path passed as a variable to the output folder is "knime://knime.workflow/data".
And does it go into the right directory? For me I think it goes somewhere under the KNIME Application folder.
It does go into the right directory.
I added a commit to the PR that adds an option to overwrite existing files (by default it is off). Additionally I moved the file checks before the loop that copies the files, so that when one file cannot be copied, none will be.
Ok true. Maybe I fixed it recently. But what I forgot is to change the Views of the Output nodes. They do not open the underlying folders correctly (right click - open folder) because they use the plain entry and do not use FileUtil.getFileFromURL(FileUtil.toURL(folder_name)). Can you fix that quickly in the PR?
@jpfeuffer I pushed another commit with the proposed change.
More changes packed into this PR:
The attached file is a workflow demonstrating all the changes made in this PR (except for the views).
I also find this very useful. I would like to see a Folder chooser dialog with Variable option for a base folder. And a folder name text box. Like the Create Folder node of KNIME.