# Construct file names using a number and a string prefix [duplicate]

I'm trying to append filenames with Mathematica, and cannot do it. The output of my calculation are two lists : X and Y, calculated for a varying parameter G.

So I want to have X0, Y0 for G = 0, X0.5, Y0.5 for G = 0.5, etc. In python, I would just automate this by defining X"$G", Y"$G", and do a loop on G.

Is there an equivalent in Mathematica?

-

## marked as duplicate by Szabolcs, Oleksandr R., Artes, The Toad♦Mar 16 '13 at 3:26

Take a look at StringJoin and ToString. –  Szabolcs Mar 15 '13 at 17:18
Also see this. –  Jens Mar 15 '13 at 17:41
The title talks about file names, but the question itself never mentions any I/O operation. I'm confused. –  m_goldberg Mar 15 '13 at 18:25

 fileNames=Table[StringJoin[x, y, ToString[i]], {i, 1, 10}]