Folder name and filename character limits

After transferring some of my MP3 folders to my Sansa Fuze, I noticed some strange names for folders and filenames when viewed on the Sansa Fuze. I suspected that there were some character limitations but I couldn’t find out where they were documented, so I decided to do some testing myself.  

My testing indicates that the maximum character limits are:

  • Folder names: 28
  • File names: 96

To me, these seem to be strange limits and I have no idea what the limiting factors were (I would have expected limits like 31 and 127, which correspond to 6 and 7 binary bit limits).  

Guideline : Keep your folder names short! I don’t think you need to worry about your filenames.

If they’re fully implementing FAT32 then it’s supposed to be up to 255 unicode characters for filenames.

There’s not supposed to be a pathname limit but, also from Wiki, we get this note:

The on-disk structures have no inherent limit. Particular Installable File System drivers and operating systems may impose limits of their own, however. MS-DOS does not support full pathnames longer than 260 bytes for FAT12 and FAT16. Windows NT does not support full pathnames longer than 32,767 bytes for NTFS. Linux has a pathname limit of 4,096.

at this link.

So it sounds like they did a half-assed FAT32 implementation.