user45393: In order to make an algorithm work, I'd like to delete the first line of a text file. I'm having a hard time finding an example for that though. I was thinking that there should be the possibility to delete up to a \n. Could you point me to a solution?
Oh, I'm using a standard Arduino Uno
Thank you

user31105: What you can do is:

opening a file (to read)
opening a new file (to write)
since a line can be long (more than arduino's memory), it's best to read it character by character, thus:
use a boolean to denote when to start removing a line (set to e.g. Remove = TRUE)
For every character you read:


If Remove is TRUE, don't write to the output file, otherwise write it
If the character is \n or \r (check how line ends are), set the boolean to False (e.g. continue writing)

Remove file to read
Rename written file


45393: <p>In order to make an algorithm work, I'd like to delete the first line of a text file. I'm having a hard time finding an example for that though. I was thinking that there should be the possibility to delete up to a \n. Could you point me to a solution?
Oh, I'm using a standard Arduino Uno</p>

<p>Thank you</p>
 31105: <p>What you can do is:</p>

<ul>
<li>opening a file (to read)</li>
<li>opening a new file (to write)</li>
<li>since a line can be long (more than arduino's memory), it's best to read it character by character, thus:</li>
<li>use a boolean to denote when to start removing a line (set to e.g. Remove = TRUE)</li>
<li>For every character you read:

<ul>
<li>If Remove is TRUE, don't write to the output file, otherwise write it</li>
<li>If the character is \n or \r (check how line ends are), set the boolean to False (e.g. continue writing)</li>
</ul></li>
<li>Remove file to read</li>
<li>Rename written file</li>
</ul>
