Long filename
   HOME

TheInfoList



OR:

Long filename (LFN) support is
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
's backward-compatible extension of the
8.3 filename An 8.3 filename (also called a short filename or SFN) is a filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.5. It is also used in modern Microsoft operating systems as an altern ...
(short filename) naming scheme used in DOS. Long filenames can be more descriptive, including longer
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically ...
s such as
.jpeg JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and imag ...
,
.tiff Tag Image File Format, abbreviated TIFF or TIF, is an image file format for storing raster graphics images, popular among graphic artists, the publishing industry, and photographers. TIFF is widely supported by scanning, faxing, word processi ...
, .html, and
.xhtml Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, prior ...
that are common on other operating systems, rather than specialized shortened names such as .jpg, .tif, .htm, or .xht. The standard has been common with
File Allocation Table File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
(FAT) filesystems since its first implementation in
Windows NT 3.5 Windows NT 3.5 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was released on September 21, 1994, as the successor to Windows NT 3.1 and the predecessor to Windows NT 3.51. One ...
of 1994. 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.


Compatibility issues

Microsoft implemented support for LFNs in the FAT filesystem by using hidden directory entries, of the ''volume label'' type, to store the longer names; this scheme is known as VFAT, and was chosen for compatibility, as volume labels are generally ignored by programs and
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
(OS) components. Programs running on older OSs could still access the files' short names, while newer, LFN-aware OSs and programs could use the longer ones. When LFN support was first introduced into a DOS-based operating system in the form of Windows 95, it 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 are not visible unless a VFAT LFN driver is installed. Microsoft did not add LFN support to many of its older programs, including File Manager, the
Windows 3.1x Windows 3.1 is a major release of Microsoft Windows. It was released to manufacturing on April 6, 1992, as a successor to Windows 3.0. Like its predecessors, the Windows 3.1 series ran as a shell on top of MS-DOS. Codenamed Janus, Windows 3. ...
(Windows for Workgroups) file manager that was made obsolete by the new operating system shell, Windows Explorer.
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...
supported LFNs on NTFS file systems starting 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 stores LFNs for FAT filesystems in .LONGNAME
extended attribute Extended file attributes are file system features that enable users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem (such as permissions or ...
s that are incompatible with Microsoft's implementation and only visible to tools supporting OS/2's standard. Many APIs providing access to files by pathname cannot see the new, longer names without a supporting driver.


Limits

Because the FAT LFN implementation is layered atop 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. Also, one is more likely to encounter issues creating files or folders in the root directory, since FAT12 and FAT16 only allocate space for 512 root directory entries on hard disks. Since long filenames use more than one directory entry, this problem may occur with fewer than 512 files or folders in the root directory. There is space only for 24 long filenames of maximum length (512/(1+20)). This problem does not exist for
FAT32 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons b ...
volumes. The long filename system allows a maximum length of 255 UCS-2 characters including spaces and non-alphanumeric characters (excluding the following characters, which have special meaning within the
COMMAND.COM COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
command interpreter or the operating system kernel: \ / : * ? " < > , ). This is achieved by chaining up to 20 directory entries of 13 2-byte
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
characters each. The maximum length of a pathname is 256 characters, which includes all parent directories and the filename. 255-character mixed-case long filename is possible only for files, or folders with no sub-folders, at the root folder of any drive. While long filename support allows for longer file and directory names, under DOS-based systems, the ''absolute'' file path constructed from the associated short file and directory name equivalents is still represented in an internal data structure called the
Current Directory Structure In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with each process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just ...
(CDS), which imposes a limit of 66 characters on the (short) path name and thereby indirectly limits also the path ''depth'' to a maximum of 33 levels (counting in the root directory and assuming only single-letter names). (This design limitation was not present in older versions of DR DOS (prior to DR DOS 6.0 November 1991 updates) which still utilized a ''relative'' path representation internally, however, due to their internal differences these versions are not compatible with existing LFN add-on drivers.) Non-DOS-based operating systems without a CDS are not restricted to this path depth limitation.


VFAT LFN drivers

The following is a list of drivers that can be used to provide support for VFAT long file names as used in Windows 95. Although drivers such as DOSLFN can be loaded in almost any versions of DOS, it works best on DOS versions that have support for LFN themselves, such as MS-DOS 7.10 or
DR-DOS 7.02 DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
, so that DOS commands such as DIR would show long file names as well.


Other implementations

Before LFN support was implemented into the FAT family of file systems, various file managers provided their own methods to attach and maintain longer file descriptions. Among the first to do so are the alternative command line processors 4DOS and NDOS with their internal DESCRIBE command and corresponding
DESCRIPT.ION 4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in Microsoft DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, ...
files. The latter are optional hidden files located in each directory storing a line-based list of file names located in the directory together with their textual description and optional metadata entries—for example, extended attributes and configuration data for other programs. The descriptions can be up to 511 characters long and are displayed along the file names in much the same way as long file names are listed alongside their short filename aliases in DIR listings. If an entry exists for a file, it will be copied and moved with the file for as long as these command line processors are used to perform the operation. This scheme is still maintained by successors such as 4OS2, 4NT / Take Command. It was adopted also by various other programs like
Volkov Commander Volkov Commander (VC) is a file manager for DOS inspired by the Norton Commander. Volkov Commander is purely written in assembly language, and is thus very small (less than 100 KB) and fast. Volkov Commander was written by Vsevolod V. Volkov, a ...
(VC),
DOS Navigator DOS Navigator (DN) is an orthodox file manager for DOS, OS/2, and Windows. Influence DOS Navigator is an influential early implementation of orthodox file manager (OFM). By implementing three additional types of virtual file systems (VFS): XTr ...
(DN), Open DOS Navigator (ODN), Necromancer's DOS Navigator (NDN), Windows Commander,
Total Commander __NOTOC__ Total Commander (formerly Windows Commander) is a shareware orthodox file manager for Windows, Windows Phone, Windows Mobile/Windows CE and Android, developed by Christian Ghisler. Originally coded using Delphi, latest Windows 64-bit ...
, Double Commander, 7-Zip, XnView, ACDSee, Newsbin Pro, V,
FreeCOM FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems. FreeDOS ca ...
and some CUI_LIB-based applications.
Human68K The is a home computer created by Sharp Corporation. It was first released in 1987 and sold only in Japan. The initial model has a 10 MHz Motorola 68000 CPU, 1 MB of RAM, and lacks a hard drive. The final model was released in 1993 with ...
, the operating system of the Sharp X68000 computers since 1986, is based on an extended FAT file system. It allows up to 18.3 characters in a filename (instead of the 8.3 in FAT) and allows also upper and lower case characters (as well as
Kanji are the logographic Chinese characters taken from the Chinese script and used in the writing of Japanese. They were made a major part of the Japanese writing system during the time of Old Japanese and are still used, along with the subsequ ...
in Shift JIS code) that are all treated as distinctive. If restricted to the use of 8.3-format filenames with upper case characters only, the Human68K floppies are fully compatible with the Japanese 1232 KiB standard FAT floppy format (77 cylinders, 2 heads, 8 sectors, 1024 bytes/sector). This format is used by the
NEC PC-9800 The , commonly shortened to PC-98 or , is a lineup of Japanese 16-bit and 32-bit personal computers manufactured by NEC from 1982 to 2000. The platform established NEC's dominance in the Japanese personal computer market, and, by 1999, more th ...
, Fujitsu FMR and FM Towns series computers. Novell NetWare versions 3.x and 4.x volumes can also support Microsoft-compatible long filenames, by loading an additional
NetWare Loadable Module A NetWare Loadable Module (NLM) is a loadable kernel module (a binary code module) that can be loaded into Novell's NetWare operating system. NLMs can implement hardware drivers, server functions (e.g. clustering), applications (e.g. GroupW ...
(NLM). In order to support
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
applications without implementing a VFAT-compatible scheme, the FlexOS-based IBM 4690 OS version 2 introduced its own virtual file system (VFS) architecture to store long filenames in the FAT file system in a backwards compatible fashion. If enabled, the virtual filenames (VFN) are available under separate logical drive letters, whereas the real filenames (RFN) remain available under the original drive letters.


See also

* TRANS.TBL *
Rock Ridge ISO 9660 (also known as ECMA-119) is a file system for optical disc media. Being sold by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is ...
* Joliet (file system) *
Romeo (file system) ISO 9660 (also known as ECMA-119) is a file system for optical disc media. Being sold by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is ava ...
*
8.3 filename An 8.3 filename (also called a short filename or SFN) is a filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.5. It is also used in modern Microsoft operating systems as an altern ...
*
6.3 filename A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name &ndas ...
*
Filename A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name &ndas ...
* VFAT patent issues * Design of the FAT file system * File system *
Large file support Large-file support (LFS) is the term frequently applied to the ability to create files larger than either 2 or 4  GiB on 32-bit filesystems. Details Traditionally, many operating systems and their underlying file system implementations use ...
(LFS)


References


External links


The filesystems howto

Current version of DOSLFN




{{Computer files Windows architecture Filenames