reading file by file from sd card

Hi all!

I am using the SD card library to read files from an SD card. So far so good, if I simply type in the name of the file, it reads it without problems..

Now, my program will make use of a indefinite number of files present on the sd card. could be 1, could be 50.. each file will keep the program busy for about an hour. when the file has been processed it should go to the next one. When all files have been processed, it should start again from the first..

File entry = dir.openNextFile();i can open the next file, but given that between one "openNextFile()" and the next there is an hour and I do tons of things inbetween, how can I be sure that it knows what file to open next? ist here a fileindex or something that can be set?

and once it reaches the end, how can I tell the program to start again from the beginning?

Thank you!

best regards


Since there's no code provided, I suspect that few people will offer solutions to keeping track of filenames. For your second problem, you could have a flag file as the last filename.


-jim lee

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.