Page 1 of 1

fopen takes only 8 character name, how to make file with larger name?

Posted: Fri Oct 06, 2017 12:03 pm
by anitech_pro
I am writing code for ESP32 using esp-idf. I am using SD card attached to it for storing some data. when I make file with fopen, it can only make file with name equal or less than 8 character. I want to make file with longer names.

Re: fopen takes only 8 character name, how to make file with larger name?

Posted: Mon Oct 23, 2017 11:32 am
by Gfast2
Hi anitech_pro,

I have the same issue right now. But differently, I believe I got "/sdcard/test2.xml" (9 charactors from "test2.xml") works firstly. but if I did try to read "abc_config.xml", then I get the same issues (fopen return "NULL"). :o

So, what should we do?

Re: fopen takes only 8 character name, how to make file with larger name?

Posted: Mon Oct 23, 2017 12:29 pm
by WiFive

Re: fopen takes only 8 character name, how to make file with larger name?

Posted: Mon Oct 23, 2017 8:09 pm
by Gfast2
Hi WiFive,

Thanks a lot for you answering! Yeh, its pretty a shame firstly don't know much about the legacy 8 character name (SFN), and secondly don't have the ability to search out the get answered similar questions. :D