Comparison of Filename Limitations
System | Case sensitive |
Case preserving |
Allowed character set | Reserved characters | Reserved words | Maximum length | Comments |
---|---|---|---|---|---|---|---|
MS-DOS FAT | No | No | any 8-bit set | x00-x1F SPACE DEL " * / : < > ? \ | | Device names including: AUX COM1 … COM9 CON LPT1 … LPT9 NUL PRN | 11 | Maximum 8 character base name limit and 3 character extension; see 8.3 filename |
Windows VFAT | No | Yes | Unicode, using UTF-16 encoding | |\?*<":>+/ control characters | 255 | ||
NTFS | Optional | Yes | Unicode, using UTF-16 encoding | / null (i.e., 0x00) | Only in root directory: $AttrDef $BadClus $Bitmap $Boot $LogFile $MFT $MFTMirr pagefile.sys $Secure $UpCase $Volume $Extend $Extend\$ObjId $Extend\$Quota $Extend\$Reparse ($Extend is a directory) | 255 | forbids the use of characters in range 1-31 (0x01-0x1F) and characters " * : < > ? \ / | unless the name is flagged as being in the Posix namespace. NTFS allows each path component (directory or filename) to be 255 characters long.
Windows forbids the use of the MS-DOS device names AUX, CLOCK$, COM1, …, COM9, CON, LPT1, …, LPT9, NUL and PRN, as well as these names with any extension (for example, AUX.txt), except when using Long UNC paths (ex. \\.\C:\nul.txt or \\?\D:\aux\con). (CLOCK$ may be used if an extension is provided.) The Win32 API strips trailing space and period (full-stop) characters from filenames, except when UNC paths are used. These restrictions only apply to Windows; in Linux distributions that support NTFS, filenames are written using NTFS's Posix namespace, which allows any Unicode character except / and NUL. |
OS/2 HPFS | No | Yes | any 8-bit set | |\?*<":>/ | 254 | ||
Mac OS HFS | No | Yes | any 8-bit set | : | 255 | old versions of Finder are limited to 31 characters | |
Mac OS HFS+ | Optional | Yes | Unicode, using UTF-16 encoding | : on disk, in classic Mac OS, and at the Carbon layer in Mac OS X; / at the Unix layer in Mac OS X | 255 | Mac OS 8.1 - Mac OS X | |
most UNIX file systems | Yes | Yes | any 8-bit set | / null | 255 | a leading . indicates that ls and file managers will not show the file by default |
|
zOS | ? | ? | dab per Talk:AT&T#Incoming links to AT&T | other than $ # @ - x'C0' | 44 | first character must be alphabetic or national ($, #, @)
"Qualified" contains |
|
early UNIX (AT&T Corporation) | Yes | Yes | any 8-bit set | / | 14 | a leading . indicates a "hidden" file | |
POSIX "Fully portable filenames" | Yes | Yes | A–Z a–z 0–9 . _ - | / null | Filenames to avoid include: a.out, core, .profile, .history, .cshrc | 14 | hyphen must not be first character |
ISO 9660 | No | ? | A–Z 0–9 _ . | "close to 180"(Level 2) or 200(Level 3) | Used on CDs; 8 directory levels max (for Level 1, not level 2,3) | ||
AmigaOS | No | Yes | any 8-bit set | : / " | 107 | dos.library | |
Amiga OFS | No | Yes | any 8-bit set | : / " | 30 | Original File System 1985 | |
Amiga FFS | No | Yes | any 8-bit set | : / " | 30 | Fast File System 1988 | |
Amiga PFS | No | Yes | any 8-bit set | : / " | 255 | Professional File System 1993 | |
Amiga SFS | No | Yes | any 8-bit set | : / " | 32,000 | Smart File System 1998 | |
Amiga FFS2 | No | Yes | any 8-bit set | : / " | 107 | Fast File System 2 2002 | |
BeOS BFS | Yes | Yes | Unicode, using UTF-8 encoding | / | 255 | ||
DEC PDP-11 RT-11 | No | No | RADIX-50 | 6 + 3 | Flat filesystem with no subdirs. A full "file specification" includes device, filename and extension (file type) in the format: dev:filnam.ext. | ||
DEC VAX VMS | No | From v7.2 |
A–Z 0–9 $ - _ | 32 per component; earlier 9 per component; latterly, 255 for a filename and 32 for an extension. | a full "file specification" includes nodename, diskname, directory/ies, filename, extension and version in the format: OURNODE::MYDISK:FILENAME.EXTENSION;2 Directories can only go 8 levels deep. | ||
Commodore DOS | Yes | Yes | any 8-bit set | :, = | $ | 16 | length depends on the drive, usually 16 |
Read more about this topic: Filename
Famous quotes containing the words comparison and/or limitations:
“When we reflect on our past sentiments and affections, our thought is a faithful mirror, and copies its objects truly; but the colours which it employs are faint and dull, in comparison of those in which our original perceptions were clothed.”
—David Hume (17111776)
“The limitations of pleasure cannot be overcome by more pleasure.”
—Mason Cooley (b. 1927)