Need Help about data conversion read from one file and and writing to another.

I am working on data conversion where in the main data file is on the sd card.

I am able to read the file convert it but and save to another created file on the same card but only one line.

Either i can read or i can write but never both properly.

To simplify:
I am reading one whole line from a text file eg:010101110001001000001011 (400bit in one line)
close the file

Convert data eg:01010111,00010010,00001011 later to bytes

write to the other file eg:01010111,00010010,00001011
close the file

I am able to read and write the first line not the next line.

Is it the issue between file open and file close. Or any other way.

Will post the code after cleaning as its messed up.

Thanking you

You can seek; so after opening the input file again, seek N bytes. Next time seek N2 bytes, next time N3 bytes etc. N is the number of bytes of a record.

The SdFat library seems to allow you to open multiple files at the same time (source: using two files at once - Storage - Arduino Forum) and that way you should be able to circumvent the probem.