Matching Loop Output with File Name


I have created a work flow with which I make calculations on data from several input files. At the end of my loop I create a table that contains the results for every file in one row per file.
Now I want to add a column to the Loop output table which contains either the file name or the path, so that I know which results belongs to which input data.

I am quite new to knime so I cannot really find a solution to this problem even if it might be quite easy to do.
Can anyone help me with that?

Best wishes


Hello @SamLam,

and welcome to KNIME Community!

If you have file name and/or path as flow variable (which you probably do) then simply use Constant Value Column node to convert it to a table value in new column.

See this topic:


1 Like


Thanks for the quick and useful answer.
Unfortunatly that still does not seem to work for me. I am not able to access the path variable with the constant value column even though it does exist and is used to read the excel files.

Any ideas what I might be doing wrong?

It would be helpful if you shared your workflow.

If you want to use a variable in the Constant Value node, it must be a string. Assuming you’ve already created a path flow variable, you need to convert it to a string flow variable.

There are a couple ways to do this:

  • use the Path to String node BEFORE you convert to a variable
  • use the Path to String (variable) node AFTER you’ve converted to a variable

If you haven’t created a flow variable for the path information, you’ll set that up first.

1 Like

Thank you very much. I got it!

1 Like

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