fileout and $N

I have problems using fileout and its N count to generate new filenames.
If i use for example in the File out dat its Filename parameter somthing like testdata/data$N.dat
and set N to 5 and then press the write button, TD writes out the data to testdata/data.dat.
My expectation was a filename like data5.dat.
What am I doing wrong ? Thnx for your help

You’re using (old-fashioned) T-script code.
In that case make sure that the language of File Out DAT is also set to T-Script, instead of (default) Python.
language.jpg

Thnx. .i had no idea that this is related to the usage of t-script.
i will find a different way via Python

if you want to use Python and use that “n” parameter, write this:

'datout.'+str(me.par.n)+'.dat'

Don’t forget to set the parameter in ‘expression’ mode, by clicking the second (blue) square in front of it.

fileout-python.jpg

thnx a lot for your help. Works.