max size of filename to save on sd card
Posted: Sat Aug 05, 2017 7:53 pm
Does sdmmc has a max. size of chars for the filename to save on a sd card?
example
is there a limit? or can the filename as long as i want
Also i can only save .txt file, no other file extensions.
also have problem, that sometimes this is working, sometimes not. example
same problem here. no line will be printed
example
Code: Select all
#define random_string "foo"
char buf[100];
snprintf(buf, sizeof(buf), "/sdcard/%s.txt", random_string);
FILE *f = fopen(buf, "w");
Also i can only save .txt file, no other file extensions.
also have problem, that sometimes this is working, sometimes not. example
Code: Select all
#define random_string "foo"
char buf[100];
printfs("printf statement should come soon..."); //but it won't - only this message appears, thats it, nothing else
snprintf(buf, sizeof(buf), "/sdcard/%s.txt", random_string);
printf("%s", buf);
FILE *f = fopen(buf, "w");
Code: Select all
printf("/sdcard/file.txt", buf);
FILE *f = fopen("/sdcard/file.txt", "w");
if (f == NULL) {
ESP_LOGE(TAG, "Failed to open file for writing");
return;
}
ESP_LOGI(TAG, "opening success");
fclose(f);