How to specify Folder Location when creating multiple files with dynamic file naming using group loop

Hi I am trying to use a group loop to create multiple Excel files into one folder.

However I want to specify to a local folder that I use instead to the default. (Relative to) Current workflow data area

What is the easiest way to do this as I have tried to create my own file / folder variable but do not know how to link it and add it to the existing dynamic file name variable



Hi @Lorraine123 and welcome to the Knime Community.

You should pass only the variable FileName in the String to Path Node like this:

After that, you should end up with a variable with these values:
image

In your Excel Writer, you just need to plug that variable:
Click on this:

Which will pop up the Variable Settings:
image

And configure as follows:
image

Click OK to save and close the Variable Settings, and click OK to save and close the Excel Writer.

It will now save to the data folder of the workflow with dynamic file names that you are generating via the String Manipulator

2 Likes

Thanks bruno29a my wf runs fine, however do you know how I mind alter it to specify my own folder location?

Hi @Lorraine123 , please use the @ sign to tag a user, otherwise we won’t get notified, just like I did not get notified for your message. I just happened to check the thread.

Can you give me an example of the path of your own folder? Is it going to be an absolute path, or a relative path, or a mounted path?

Thanks @bruno29a for checking. Much appreciated.
I would like it mounted path.

I created a KNIME WF Group where I have created my own “Output” Folder.

For instance like this:

out_fullFileName = “KNIME://knime.workflow/…/output/” + v_MaxVISITDATE + "_File Name " + “.csv”;

Hi @Lorraine123 , thank you for the additional information.

I think when you use a mount point, it means using one of the mounted point that you have in your Knime explorer or a temp mount point:
image

The URL that you showed in your example “KNIME://knime.workflow/…/output/” + v_MaxVISITDATE + "_File Name " + “.csv” seems to be more of a “Relative to the workflow”, which would point to the workflow’s data folder.

Nevertheless, in both cases, and in most cases if not all cases for that matter, you can’t point to the “path/…/”. That would mean going one level up. As far as the path is concern, you are already at the root folder.

1 Like

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