There are 8 characters which filename can obtain
A filename in windows XP can have up to 255 characters.
The question "How many characters does this question contain" contains 44 characters, including spaces and punctuation.
Filename
26
12
To display the filename of the current workbook in Excel, you can use the formula =CELL("filename"). This function returns the full path of the workbook, including the filename. If you only want the filename without the path, you can combine it with the MID and FIND functions to extract just the name. For example, =MID(CELL("filename"), FIND("[", CELL("filename")) + 1, FIND("]", CELL("filename")) - FIND("[", CELL("filename")) - 1) will give you just the filename.
25
In an MS-DOS filename, you may have up to 8 characters followed by a filename extension (eg. .txt, .doc, .bmp) with up to 3 characters separated by a period. In the filename, you may not use the following characters: < > . , : ; / | \ * ? + = " [ ] You may not use spaces either, and the only exception to using a period is separating the name with the extension. Foreign chararacters should be avoided due to codepage differences. Examples of valid filenames: snowcone.bmp report.txt stats.xls Examples of invalid filenames: snow cone.bmp one<two.txt statistics.xls
Enclose the filename in double quotes
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
This page website contains list of characters not allowed in a filename on windows, mac, Linux/unix http://www.comentum.com/File-Systems-HFS-FAT-UFS.HTML
in linux wc -l filename will count the lines and wc will count the letters