This question already has an answer here:

I want to import a data file named "A(var1)B(var2)C(var3).dat" where the values of the variables var1, var2, var3 are being provided by a function. How can I do that?


marked as duplicate by Kuba Dec 1 '18 at 13:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Take a look at StringJoin, ToString or at StringTemplate. $\endgroup$ – Kuba Dec 1 '18 at 12:42
a = 2;
b = 4;
c = 5;
StringJoin[ToString[a], ToString[b], ToString[c], ".dat"]    


or you can add more strings

StringJoin["A",ToString[a],"_B",ToString[b],"_C",ToString[c], ".dat"]   



Not the answer you're looking for? Browse other questions tagged or ask your own question.