ESP32-S3 Arduino SD_MMC FAT long/short file names
Posted: Thu Dec 21, 2023 5:15 pm
I iterate thru the SD card which was formatted as FAT and written on a PC, and search for *.wav files
The problem is that filenames of the files that has long file names are displayed as empty strings, while 8.3 filenames are displayed correctly. Is there a way to work with various file names on an SD card prepared on a PC in Arduino IDE besides recompiling IDF components?
If they'd be shorten or modified in some way like, say, Windows did (SHORTE~1.TXT), that'd be fine.
Or maybe there's some way to open one particular file when we don't know it's name?
Code: Select all
File file = directory.openNextFile();
tmp = file.name();
Serial.printf("_Testing %s\r\n", tmp.c_str());
if (file.isDirectory() || !(tmp.endsWith(".wav") || tmp.endsWith(".WAV"))) {
// skip if it's a directory or not wav
}
If they'd be shorten or modified in some way like, say, Windows did (SHORTE~1.TXT), that'd be fine.
Or maybe there's some way to open one particular file when we don't know it's name?