Using the input filename to derive output filename and location

Hello, I want to do something like this, but I couldn’t find how I can accomplish something like this.

  1. Read in a CSV File
  2. Perform some operations on the data
  3. Export an Excel file, to the same location as the input CSV file and use the filename as a base and add on current date to the out excel filename

This is so I don’t have to manually edit the output filename every time I run the workflow. Can someone please guide me on how to do this. Reading the documentation on the individual nodes did not help me understand the full picture.

Hi @data_learner , welcome!

Sure… First, You will read the file from a local or remote location? The name will be dinamically or static one?

Well, later, if you can bring a draw or flow example, can bem more clear, BUT i create something for you.

I’ll list files from a specific folder as default and searching by CSV files only.

It’ll create a list for me as references. After that, I’ll create a process to create a real path from each row to be used at the file creation and export process.


KNIME_project_CSV2Excel.knwf (26.1 KB)

I hope that it help you to understand the process.

BR, Denis

1 Like

Hi @denisfi , thank you for your response. I was trying this out after I posted this question and this how far I got:

file-name-tests.knwf (42.3 KB)

Is this a good/right approach? I have not looked at your workflow yet.

@denisfi , I was able to take your workflow and use the learning from that to update my workflow and I now have it working to do what I wanted.

file-name-tests-solved.knwf (36.8 KB)

I am not sure if this is the most efficient method, but it works.

There are many ways to solve a problem, if you could solve using part of the workflow or just make your own process, great!!!

I’m happy that it helped you! Great job!

Tks, Denis

1 Like

Thank you for all the help.

1 Like

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