Index: /soft/giet_vm/giet_fat32/fat32.c
===================================================================
--- /soft/giet_vm/giet_fat32/fat32.c	(revision 595)
+++ /soft/giet_vm/giet_fat32/fat32.c	(revision 596)
@@ -701,4 +701,12 @@
 
 //////////////////////////////////////////////////////
+static inline unsigned char _to_lower(unsigned char c)
+{
+   if (c >= 'A' && c <= 'Z') return (c | 0x20);
+   else                      return c;
+}
+
+
+//////////////////////////////////////////////////////
 static inline unsigned char _to_upper(unsigned char c)
 {
@@ -758,13 +766,29 @@
                                   char*          name )   // output: name
 {
-    unsigned int i   = 0;
-    unsigned int length = get_length(DIR_NAME);
-
-    while ( i < length )
-    {
-        name[i] = buffer[i];
-        i++;
-    }
-    name[i] = 0;
+    unsigned int i;
+    unsigned int j = 0;
+
+    // get name
+    for ( i = 0; i < 8 && buffer[i] != ' '; i++ )
+    {
+        name[j] = _to_lower( buffer[i] );
+        j++;
+    }
+
+    // get extension
+    for ( i = 8; i < 8 + 3 && buffer[i] != ' '; i++ )
+    {
+        // we entered the loop so there is an extension. add the dot
+        if ( i == 8 )
+        {
+            name[j] = '.';
+            j++;
+        }
+
+        name[j] = _to_lower( buffer[i] );
+        j++;
+    }
+
+    name[j] = '\0';
 }
 
