Dears,
in a CR1000X logger I have a 16 Mg microSD card and the logger writes small files to it every 5 minutes.
It happens that when a large number of files is reached and/or when there are about 6..7 gigabytes left to fill, therefore about 9 gigabytes of files written, the writing and ftp sending stops.
Formatting the card everything restarts regularly.
To solve this problem but also to limit the number of files that increase too much and unnecessarily, I want to create a ring procedure to always keep the last 3 days, therefore 864 files and, as the logger does, when I reach this limit, it starts deleting the oldest ones. In the hope of being clear, do you have any suggestions?
thank you
Regards
Smile
The instructions you need to use are FileList(), FileTime(), and FileManage().
A problem with that many files is that the array needed for FIleList() will use up quite a bit of RAM. Keeping files names short will let you keep the string length shorter.
Note that the FileTime() instruction uses the Nsec time format. Public.Timestamp can output in the same format. You will need to calculate how many nanoseconds 3 days is.
many thanks