Problem saving data from SD Card

Showing results for 
Search instead for 
Did you mean: 

Problem saving data from SD Card

Contributor I

Hi, I have the next code.

void file_directory (void)  {

  FINFO info;

    struct {char *name;} mensaje[255];

    int i = 0;

    char *aux;

  info.fileID = 0;                             /* info.fileID must be set to 0 */

  while (ffind ("M:*.bmp", &info) == 0) 

    {       /* find whatever is in drive "R0:" */

        printf ("\n%-32s %5d bytes, ID: %04d",, info.size, info.fileID);

        aux = (char*);

        mensaje[i].name = aux;



  if (info.fileID == 0)  {

    printf ("\nNo files...");



When I tried to save the all the files .BMP in the array mensaje[], I get the next:


All the positions of mensaje[] were filled with the last image reading. Who I can solve it.

Tags (3)
0 Kudos
0 Replies