File Reader and variable

Hi everyone,

When I use the reader nodes (text, csv, SDF, etc...) More and more I have to use the path or the name of the input file. But for the moment the ouput port of the reader nodes do not permit to obtain the URL or Location variable. So I use the List Files node to obtain the Location of the File.

Is it possible, for all the reader nodes, to have in the ouput variable port, at least one variable with the Location of the selected File to read?





Hi Lionel,

There is a way to expose the input file name as flow variable. Actually to expose any settings value. In the node's dialog, after you entered the file location and other settings, change to the "Flow Variables" tab. It shows you a representation of the node's settings. After you identified the name for the file location (with the File Reader it is "DataURL", SDF Reader it is under "urls" -> "0", "1", Table Reader it is "filename", etc.) you will notice the dropbox next to the settings name and a textfield (empty by default). If you now enter a variable name in the text field (NOT in the drop down selection), the file location selected will be made available as flow variable with the name you entered.

After you close the dialog, open the port view on the node (last item in the context menu), switch to the "Flow Variables" tab. The variable you entered in the dialog should show up.

Is that close to what you were looking for?

Best regards,

 - Peter.

Hi Peter,

Oh, OKI, It is great!

Many thanks for this Tips! It will save many time for me!

Best regards,