The length of a file name is generally limited by the
combination of OS and filesystem.
Most common configurations:
Windows XP/7 on NTFS has a max path+filename+ext (yes, full path
and filename combined) length of 260. Path and folder take a
minimum of 3 characters ("C:"), so you are left with effectively
257.
Windows 98/95/3.x/DOS on FAT32 had max filename+ext length of
8+3.
Most Linux/Unix filesystems have max filename+ext length of
255