Output file name - variable - missing output file name

Hi!

I have the following problem:

I want to control the file name of my output csv-file by a variable. I did this already in another workflow, where I assigned the URL of my input file a variable "fname".

Via the Java Edit Variable (simple) node, I changed the variable and linked this to the csv writer node. There I used the variable button to set the variable as output name.

The variable is a String and I cut off the "File:" at the beginning of "fname", so that in the end, the variable looks like this:

/Users/user/folder/file.csv

When I tried to do this now again in another workflow, it does not work. I almost took the identical code in the java node and I checked the variable, which is also a string looking like this:

/Users/user/folder/file.csv

However, there is always this error message appearing: "Missing output file name"

This makes me crazy! I tried it also with the "File:" and without... I have no idea, what the problem is.

Thank you for your help!!!!

It looks like that the CSV Writer does not have a valid configuration. Before you assign the variable, make sure you have a valid file path specified, such as /tmp/foo.txt and then assign the variable.

Hello,

Could it be related to using the url (forward slash) rather than the file name (backward slash)?

HTH,

Fred

Hi thank you for your posts!

I finally solved the issue: apparently you need to type in a random file name before you can control the name by a variable - the random name will then be replaced by the variable.

:)