Filestream new line in txt file

Hi,

I can write data to my txt file, thats good.
But I can not figure out how to send new data in the next line.
It is alway replacing the data in the first line.
I tried with \r at the end like this:

dataset.txt=t2.txt //5 Chars
dataset.txt+=";"
dataset.txt+=t3.txt //3Chars
dataset.txt+=";"
dataset.txt+=t5.txt //3Chars
dataset.txt+=";"
dataset.txt+=t6.txt //1Char
dataset.txt+=";"
dataset.txt+=t7.txt //4 Chars
dataset.txt+="\r" //2 Chars I guess
t1.txt=dataset.txt
fs0.open(fname.txt)
fs0.write(dataset.txt,0,22)
fs0.close()

What is wrong with that?

fs0.write() will overwrite the file. so it is correct. Perhaps you can copy first the content and then append the rest.

You can have a look here:

Sending a springf in multilines to nextion

I can reproduce 5 different variables over 5 different lines at the same time in a springf format,with a single txt module in nextion :slight_smile:

p.s: there’s a problem with the char " when i copy the code in my arduino IDE,
it’s not recognized,i have to rewrite the char " at every place.

Thanks!
This will not work for me, I’ve too much data I want to store and update.
I’ll use an other option on Arduino site.