Create File/Folder Variables node prompts to add connector inport for local file path var

Hi. I would like to create a simple Component that prompts the user to specify a local folder, then the component saves a .table file to that folder.

I first use the Local File Browser Configuration node to prompt for the folder. Next I use the Create File/Folder Variables node to create a variable that can specify the path of the file to save (i.e. the folder the user specified plus the name of the file and extension). In doing so I use a flow variable from the Configuration node to specify the base folder in the “Create File/Folder Variables” node.
image
This is where the node produces an error, interpreting the path variable as a connected file system.:


How can I parameterize the node properly? Or am I completely overlooking something? Is there a preferred alternative way to do this?
Thanks
Here’s my (unfinished) sample component to illustrate the problem.
save table to user path.knwf (14.1 KB)

Hello @dnaki,

I’ll explain the problem and a workaround in a second but I’d like to point out that the Table Writer node does not (yet) use the new path flow variables and can be parameterized with a String flow variable.

Now regarding the bug you ran into: The problem is that the path created by the Local File System Browser Configuration is based on the Custom/KNIME URL file system which isn’t supported by the Create File/Folder Variables node.
That’s an inconvenience we are going to fix with one of the upcoming releases.
However, there is a workaround you can use right now: Insert a String to Path (Variable) node between the Local File System Configuration and the Create File/Folder Variables node that converts the file-input string flow variable into a path variable with the Local File System. This variable can then be used in the Create File/Folder Variables node.
If you are only looking to create a single path flow variable, you can also use a string manipulation node to modify file-input before you turn it into a path variable.

Sorry for your troubles :frowning:

Best regards,
Adrian

4 Likes

Maybe using the Create File Name (legacy) node also solves the problem as for now

1 Like

Hello @dnaki,

why also not ask user for file name?

Check here:

Br,
Ivan

1 Like

Thank you for the clear explanation and the workaround. I tried it and it worked. I’m looking forward to the full implementation of the new file handling framework; it should make I/O easier in the long run.

Kind regards,
Don

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.