AnsweredAssumed Answered

Read SD card with fatfs and win7 files names

Question asked by francescato.diego on Feb 14, 2014
Latest reply on Apr 23, 2014 by asik.mehmet
I was trying to read a file stored on a SD card with the fatfs library
but the f_open return always FR_NO_FILE.

The file is present and it was loaded on the SD using a PC with Win7.
I tried to figure out what  is the problem and I found that inside the procedure dir_find, called from f_open,  the mem_cmp between two strings return an error.

the first string is the name of the file that I pass as a parameter in f_open
the second string is the name of the file in the directory entry.

Name of my file "f1.pdf"

f_open string parameter = "f1    pdf" (insert 6 spaces between f1 and pdf (modified 8 +3) )
directory entry name = "f1pdf ~ 1 pdf"

Obviously the two strings are the different, mem_cmp fails and the file is not found.
How can I configure fatfs for read the filename format used by Win7 for storing files?

Thanks

Outcomes