Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max file name length in Android

Tags:

android

I am trying give a name for a file that I am creating. I just want to know that what is the max file name length in Android ?

Is there a specification for a file name? Can I use characters like - or > ?

like image 981
John Smith Avatar asked Nov 03 '12 00:11

John Smith


People also ask

Is there a limit to file name length?

The Windows API imposes a maximum filename length such that a filename, including the file path to get to the file, can't exceed 255-260 characters.

How much characters can a file name have?

The maximum filename length on a NTFS partition is 256 characters, and 11 characters on FAT (8 character name, . , 3 character extension). NTFS filenames keep their case, whereas FAT filenames have no concept of case (however the case is ignored when performing a search etc on NTFS).

What is the maximum length of filename in IOS?

The 255 characters are the system's limit.

What is the maximum file name length in Windows 7?

What is the maximum length of a file name? Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename. txt) is included in this character count.


1 Answers

It is apparently unsafe to use labels over 127 bytes on Android. AFAIK, the 255 limit is a goal, but is a WIP. I trashed my Galaxy Tab 10.1's sdcard file system last week when music sync software generated some filenames of around 160 characters. Limiting the filenames to 127 solved the issue. Be safe, unless you are sure of your particular release... stick to a limit of 127.

like image 108
Mel Avatar answered Sep 16 '22 11:09

Mel