Hmm, I seem to have one last hurdle to pass before this is finally complete.
If the file is very large, roughly 720 “lines” with characters the same as the ones in the code I posted earlier, it takes a considerable amount of time using the two pointer method to delete characters.
The method is still great, but now I’m thinking what I could do is that every time a file gets to a particular size (I can check using File.size()) I create a new file, auto generate a name using a base name like “test#.txt” and do the two-pointer delete method normally.
However what I wanted to do in conjunction with creating these new files, is re-name the old text file to “test2.txt”, and the new file would be “test1.txt” that way when I do the two pointer delete method, it will check for files in order of “1 , 2 , 3 … 10 (for example)” where 10 is the oldest data.
I’ve looked online, and there seems to be some newer Arduino library that has SdFat.rename() and SdFile.rename(), but these don’t seem to be apart of the Spark SD library. Any ideas on how to rename a text file, @peekay123 @bko ? I was thinking SdFile.make83Name() might be of use, but it seems to be a private class and only usable for directory files.
As always any direction is very much appreciated