Share on Facebook Share on Twitter Email
Answers.com

Long filename

 
Wikipedia: Long filename

Long filenames (LFN), spelled "long file names" by Microsoft Corporation[1], are Microsoft's way of implementing filenames longer than the 8.3, or short-filename, naming scheme used in Microsoft DOS in their modern FAT and NTFS filesystems. Because these filenames can be longer than the 8.3 filename, they can be more descriptive. Another advantage of this scheme is that it allows for use of *nix files ending in (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[2][3], 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.[3]

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.

Contents

Compatibility issues

The way Microsoft added support for LFNs to the FAT filesystem was by adding hidden directory entries, of "volume label" type, to the filesystem to store the longer names. The reason they chose to do this was compatibility: volume labels are generally ignored by programs and operating systems. Programs running on older operating systems could still access the files while newer operating systems and programs can access long file names.

When LFNs were first introduced into a MS-DOS based operating system with Windows 95 the implementation caused some problems when people used older programs. 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 locked out in this mode.

Also if booting into plain DOS the long filenames would not be visible, unless an LFN driver is installed (see below). At the same time Microsoft decided not to update many of the older programs to support LFNs. Of those, one that particularly stands out is the program File Manager, the Windows for Workgroups 3.11 file manager (which has been made obsolete by the new operating system shell, the Explorer). Windows NT supported LFNs on NTFS file systems since the release of NT 3.1, and all of its utilities, including the File Manager, was updated to support LFNs, and 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 had its own method of supporting LFNs on FAT drives, incompatible with Microsoft's. They were stored as a .LONGNAME extended attribute, were mostly just "labels", only visible in tools designed to display them, and most annoyingly not available for accessing files by pathname at the API level. However this can be rectified with 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.[4] 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.[5] In fact there is space only for 25 long filenames of maximum length (512/20).

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 VFAT OS2 3rd party
DOS DOSLFN 3rd party
DR-DOS LFNDOS Provided

Similar implementations

Prior to the release of OS/2 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.[6] 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.[6] 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.[7]

AmigaOS in 1985 allowed up to 30 characters in a filename.

Novell NetWare versions 3.x and 4.x can also support Microsoft-compatible long filenames, by loading an additional NetWare Loadable Module (NLM).[8]

See also

References

External links


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Long filename" Read more