Automatically scrape the filename and generate a column?

Hi there,
as I am just new into Knime I am struggling maybe with simple things - but I do not find a solution:

I have around 200 files - all with the same structure:

customernumber-customername-yyyy-mm-dd

looks like:

1234567-customername-2022-10-10.csv

I would like to scrape the parts of the files (or the name in knime) and generate automatically
columns with this information.

I actually use the “constant value column” and write this information manually in the node
so I have three nodes to generate three columns with this information
which I like to avoid…

Is it possible to generate a workaround?

Hello @pachwi
Please check this post:

This is valid for an Excel Reader as well.

Later on, you can extract the ‘file name’ from the ‘Path’ with the following nodes:

  • Path to String
  • URL to File Path

BR

6 Likes

Hi @gonhaddock ,
thanks a lot!
I didnt had the idea to search for topics like this.

I will try this and move forward.
Thanks again for helping me.

3 Likes