Long filename

From Wikipedia, the free encyclopedia

Long filename is the name given to the longer and therefore more descriptive file names on the FAT filesystem, which was previously restricted to eight characters and a three-character extension (referred to as 8.3 file naming). The first Microsoft Windows OS to implement long filenames on FAT was Windows NT 3.5 in 1994.

The long filename system can support up to 255-character names, including spaces and non-alphanumeric characters (excluding the following characters, which have special meaning within the command interpreter or the operating system kernel: \ / : * ? " < > |).

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.

Contents

[edit] Compatibility issues

The way Microsoft added support for LFNs to the FAT filesystem was by adding bogus directory entries, of "volume label" type, to the filesystem to store the longer names. The reason they choose to do this is compatibility: volume labels are generally ignored by programs and operating systems apart in the root directory, notably they do not prevent the deletion of an otherwise empty directory. Programs running on older operating systems could still access the files while newer operating systems could offer a longname API to programs.

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. 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 WinFile, the Windows for Workgroups 3.11 File Manager (which has been made obsolete by the new operating system shell, the Explorer). Under Windows NT 3.51 and Windows NT 4.0 WinFile supports LFNs, however the Windows 95 version of WinFile came from Windows for Workgroup 3.11.

OS/2 had its own method of supporting LFNs on FAT drivers, 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.

[edit] 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

[edit] Similar implementations

Prior to the release of Windows NT, one of the first file systems to support long name and spaces was the Macintosh File System for the original version of Mac OS on the Macintosh 128K. It was an innovation ahead of its time. The Hierarchical File System was introduced for Mac systems a few years after.

[edit] External links

In other languages