Long filename
Encyclopedia
Long filenames are Microsoft
's way of implementing filenames longer than the 8.3 filename, or short-filename, naming scheme used in Microsoft DOS in their modern FAT
and NTFS
filesystems. Because these filenames can be longer than an 8.3 filename, they can be more descriptive. Another advantage of this scheme is that it allows for longer extensions
common on other operating systems (e.g. .jpeg, .tiff, .html, and .xhtml) rather than specialized shortened names (e.g. .jpg, .tif, .htm, .xht). The first Microsoft Windows
operating system to implement long filenames on FAT was Windows NT 3.5
in 1994.
The long filename system allows a maximum length of 255 UTF-16 characters, including spaces and non-alphanumeric characters (excluding the following characters, which have special meaning within the command interpreter
or the operating system kernel: \ / : * ? " < > |). This is achieved by chaining up to 20 directory entries of 13 2-byte unicode
characters each.
To maintain compatibility with older operating systems, Microsoft formulated a method of generating an 8.3 filename from the long filename (for example, "Microsoft.txt" to "MICROS~1.TXT") and associating it with the file.
For technical details of the implementation, please refer to the File Allocation Table
article.
filesystem by using hidden directory entries—of the "volume label" type—to store the longer names. This scheme was chosen for compatibility; volume labels are generally ignored by programs and operating system components. Programs running on older operating systems could still access the files' short names, while newer, LFN-aware operating systems and programs could use the longer ones.
When LFNs were first introduced into an MS-DOS
-based operating system with Windows 95
, they caused some problems for older programs. For example, a DOS program performing sector-level directory operations while Windows was in DOS mode could destroy long filename information so, by default, sector-level access to hard disks was disallowed in this mode.
Upon booting into plain DOS the long filenames would not be visible unless an LFN driver had been installed (see below). Microsoft did not add LFN support to many of its older programs, including File Manager, the Windows for Workgroups
file manager that was made obsolete by the new operating system shell, Explorer
). Windows NT
supported LFNs on NTFS file systems beginning with the release of NT 3.1, and all of its utilities, including File Manager, were updated to support LFNs. NT 3.5 added FAT LFN support in preparation for Windows 95. However, the Windows 95 version of File Manager came from Windows for Workgroups 3.11.
OS/2
stored LFNs for FAT filesystems in .LONGNAME extended attributes that were incompatible with Microsoft's implementation and only visible to tools supporting the new standard. Many APIs providing access to files by pathname could not see the new, longer names, although this shortcoming could be rectified by installing a driver.
The maximum length of file name will be reduced if it's in a folder or deep hierarchy of folders under the root folder of any drive. For example, file named "ABCDEFGHIJ" inside absolute folder location "C:\1234567890\1234567890" (Total of 21 characters excluding "C:\") can be renamed to a maximum of 234 characters.
and Windows NT
, one of the first file systems to support long names and spaces was the Macintosh File System
, written for the original version of Mac OS
on the Macintosh 128K
released in January 1984. Although the Macintosh File System supported file names up to 255 characters in length, at the time Finder
only allowed up to 63 characters. With the release of the Hierarchical File System
(HFS) in September 1985, the maximum file name length allowed by the file system was reduced to 31 characters. When the Finder was re-written for System 7
, the maximum file name length was dropped to 31, matching the maximum allowed by the file system. In January 1998, Apple released Mac OS 8.1 with HFS Plus
, which included support for 255 character file names; however, Finder continued to limit names to 31 characters until Mac OS X.
AmigaOS
in 1985 allowed up to 30 characters in a filename.
Novell NetWare
versions 3.x and 4.x volumes
can also support Microsoft-compatible long filenames, by loading an additional NetWare Loadable Module (NLM).
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's way of implementing filenames longer than the 8.3 filename, or short-filename, naming scheme used in Microsoft DOS in their modern FAT
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...
and NTFS
NTFS
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....
filesystems. Because these filenames can be longer than an 8.3 filename, they can be more descriptive. Another advantage of this scheme is that it allows for longer extensions
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....
common on other operating systems (e.g. .jpeg, .tiff, .html, and .xhtml) rather than specialized shortened names (e.g. .jpg, .tif, .htm, .xht). The first Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
operating system to implement long filenames on FAT was Windows NT 3.5
Windows NT 3.5
Windows NT 3.5 is the second release of the Microsoft Windows NT operating system. It was released on 21 September 1994.One of the primary goals during Windows NT 3.5's development was to increase the speed of the operating system; as a result, the project was given the codename "Daytona" in...
in 1994.
The long filename system allows a maximum length of 255 UTF-16 characters, including spaces and non-alphanumeric characters (excluding the following characters, which have special meaning within the command interpreter
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...
or the operating system kernel: \ / : * ? " < > |). This is achieved by chaining up to 20 directory entries of 13 2-byte unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...
characters each.
To maintain compatibility with older operating systems, Microsoft formulated a method of generating an 8.3 filename from the long filename (for example, "Microsoft.txt" to "MICROS~1.TXT") and associating it with the file.
For technical details of the implementation, please refer to the File Allocation Table
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...
article.
Compatibility issues
Microsoft implemented support for LFNs in the FATFile Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...
filesystem by using hidden directory entries—of the "volume label" type—to store the longer names. This scheme was chosen for compatibility; volume labels are generally ignored by programs and operating system components. Programs running on older operating systems could still access the files' short names, while newer, LFN-aware operating systems and programs could use the longer ones.
When LFNs were first introduced into an MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...
-based operating system with Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...
, they caused some problems for older programs. For example, a DOS program performing sector-level directory operations while Windows was in DOS mode could destroy long filename information so, by default, sector-level access to hard disks was disallowed in this mode.
Upon booting into plain DOS the long filenames would not be visible unless an LFN driver had been installed (see below). Microsoft did not add LFN support to many of its older programs, including File Manager, the Windows for Workgroups
Windows 3.1x
Windows 3.1x is a series of 16-bit operating systems produced by Microsoft for use on personal computers. The series began with Windows 3.1, which was first sold during March 1992 as a successor to Windows 3.0...
file manager that was made obsolete by the new operating system shell, Explorer
Windows Explorer
This article is about the Windows file system browser. For the similarly named web browser, see Internet ExplorerWindows Explorer is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface...
). Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
supported LFNs on NTFS file systems beginning with the release of NT 3.1, and all of its utilities, including File Manager, were updated to support LFNs. NT 3.5 added FAT LFN support in preparation for Windows 95. However, the Windows 95 version of File Manager came from Windows for Workgroups 3.11.
OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...
stored LFNs for FAT filesystems in .LONGNAME extended attributes that were incompatible with Microsoft's implementation and only visible to tools supporting the new standard. Many APIs providing access to files by pathname could not see the new, longer names, although this shortcoming could be rectified by installing a driver.
Limitations
Because FAT LFN implementation is layered on top of an older more limited naming system, there are inevitable complications, such as if an attempt is made to create too many files with the same first six letters. In addition, one is more likely to encounter issues creating files or folders in the root directory, since FAT16 only allocates space for 512 root directory entries. Since long filenames can use more than one directory entry, this problem may occur with fewer than 512 files or folders in the root directory. In fact there is space only for 25 long filenames of maximum length (512/20).The maximum length of file name will be reduced if it's in a folder or deep hierarchy of folders under the root folder of any drive. For example, file named "ABCDEFGHIJ" inside absolute folder location "C:\1234567890\1234567890" (Total of 21 characters excluding "C:\") can be renamed to a maximum of 234 characters.
LFN drivers
The following is a list of drivers that can be used to provide support for long file names used in Windows 95:OS | Driver Name | Provider |
---|---|---|
OS/2 OS/2 OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal... |
VFAT OS2 | 3rd party |
DOS DOS DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related... |
DOSLFN | 3rd party |
DR-DOS DR-DOS DR-DOS is an MS-DOS-compatible operating system for IBM PC-compatible personal computers, originally developed by Gary Kildall's Digital Research and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86... |
LFNDOS | Provided |
Similar implementations
Prior to the release of OS/2OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...
and Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
, one of the first file systems to support long names and spaces was the Macintosh File System
Macintosh File System
Macintosh File System is a volume format created by Apple Computer for storing files on 400K floppy disks. MFS was introduced with the Macintosh 128K in January 1984....
, written for the original version of Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...
on the Macintosh 128K
Macintosh 128K
The Macintosh 128K machine, released as the "Apple Macintosh", was the original Apple Macintosh personal computer. Its beige case contained a monitor and came with a keyboard and mouse. An indentation in the top of the case made it easier for the computer to be lifted and carried. It had a selling...
released in January 1984. Although the Macintosh File System supported file names up to 255 characters in length, at the time Finder
Macintosh Finder
The Finder is the default file manager used on Mac OS and Mac OS X operating systems; it is responsible for the overall user-management of files, disks, network volumes and the launching of other applications...
only allowed up to 63 characters. With the release of the Hierarchical File System
Hierarchical File System
Hierarchical File System is a file system developed by Apple Inc. for use in computer systems running Mac OS. Originally designed for use on floppy and hard disks, it can also be found on read-only media such as CD-ROMs...
(HFS) in September 1985, the maximum file name length allowed by the file system was reduced to 31 characters. When the Finder was re-written for System 7
System 7 (Macintosh)
System 7 is a single-user graphical user interface-based operating system for Macintosh computers. It was introduced on May 13, 1991 by Apple Computer. It succeeded System 6, and was the main Macintosh operating system until it was succeeded by Mac OS 8 in 1997...
, the maximum file name length was dropped to 31, matching the maximum allowed by the file system. In January 1998, Apple released Mac OS 8.1 with HFS Plus
HFS Plus
HFS Plus or HFS+ is a file system developed by Apple Inc. to replace their Hierarchical File System as the primary file system used in Macintosh computers . It is also one of the formats used by the iPod digital music player...
, which included support for 255 character file names; however, Finder continued to limit names to 31 characters until Mac OS X.
AmigaOS
AmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...
in 1985 allowed up to 30 characters in a filename.
Novell NetWare
Novell NetWare
NetWare is a network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, with network protocols based on the archetypal Xerox Network Systems stack....
versions 3.x and 4.x volumes
NetWare File System
In computing, a NetWare File System is a file system based on a heavily-modified version of FAT. It was used in the Novell NetWare operating system. It is the default and only file system for all volumes in versions 2.x through 4.x, and the default and only file system for the SYS volume...
can also support Microsoft-compatible long filenames, by loading an additional NetWare Loadable Module (NLM).