# character string in file name inside module [duplicate]

I have a module in which at the end a table is exported. That works well. Now I want to use that module such that I can transfer a part of a file name as an argument, such as

sig[costmin_, costmax_, name_] :=
Module[{},
now table sigma1 is calculated, then exported
Export["file.name.txt", sigma1, "Table"]


The filename of the export file should have the name file.name.txt where 'name' is one of the input arguments to the module so that different results for different input parameters costmin and costmax can be written to different files. How do I do this. As written above it does not work.

• I have found an easier solution: 'Export[ StringJoin[{"neutrino.EprimeCostplaneXS.", ToString[name], ".txt"}], sigma1, "Table" ]' – user3584513 Dec 1 '17 at 9:04
• StringJoin + ToString is exactly the solution in linked topic. What do you mean by 'easier'? – Kuba Dec 1 '17 at 9:08
• StringJoin makes it easier – user3584513 Dec 1 '17 at 9:09
• StringJoin makes it easier than StringJoin? – Kuba Dec 1 '17 at 9:11