I want to make 2 folders in SD card, one inside the other and then write to a file whose name is the date we get from an RTC. I know I have to add the full path when using SD.open(). So far I can create/write to the file using sprintf() but I can’t put it inside the 2 folders because sprintf() is limited to a max of 8 characters so I can’t use it to make the full path and put it in SD.open(). The file creation is as follows:
m = rtc.getTime().mon; //month d = rtc.getTime().date; //day y = rtc.getTime().year; //year sprintf(filename,"%d%c%d.txt",m,'-',d);
I would prefer to keep the file name the same. So now i want to create a path like this: /‘logfiles’/y/filename and navigate to it with SD.open(). The ‘y’ is the year we get from RTC. Any ideas how i can achieve this?