LONGNAME
   HOME

TheInfoList



OR:

Long filename (LFN) support is
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
's backward-compatible extension of the
8.3 filename An 8.3 filename (also called a short filename or SFN) is one that obeys the filename convention used by CP/M and 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 opera ...
(short filename) naming scheme used in
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
. 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 (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
s such as .jpeg, .tiff, and .html that are common on other operating systems, rather than specialized shortened names such as .jpg, .tif, or .htm. The standard has been common with
File Allocation Table File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on Ha ...
(FAT) filesystems since its first implementation in
Windows NT 3.5 Windows NT 3.5 is the second major release of the Windows NT operating system developed by Microsoft, targeting the data server and personal workstation markets. It was released on September 21, 1994, as the successor to Windows NT 3.1. One of t ...
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 File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on h ...
, 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 and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
(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 DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
-based operating system in the form of
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft and the first of its Windows 9x family of operating systems, released to manufacturing on July 14, 1995, and generally to retail on August 24, 1995. Windows 95 merged ...
, 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 A file manager or file browser is a computer program that provides a user interface to manage computer files, files and folder (computing), folders. The most common Computer file#Operations, operations performed on files or groups of files incl ...
, 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 run as a shell on top of MS-DOS; it was the last Windows 16 ...
(Windows for Workgroups) file manager that was made obsolete by the new operating system shell,
Windows Explorer File Explorer, previously known as Windows Explorer, is a file manager application and default desktop environment that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user i ...
.
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
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 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
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 File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on ...
and
FAT16 File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on Ha ...
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 and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on ...
volumes. The long filename system allows a maximum length of 255
UCS-2 UTF-16 (16-bit Unicode Transformation Format) is a character encoding that supports all 1,112,064 valid code points of Unicode. The encoding is variable-length as code points are encoded with one or two ''code units''. UTF-16 arose from an earli ...
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 ( ini ...
command interpreter or the operating system kernel: \ / : * ? " < > , ). This is achieved by chaining up to 20 directory entries of 13 2-byte
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
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 (computing), process is a directory (file systems), directory of a hierarchical file system, if any, dynamically associated with the process. It is sometimes called the current working directory (C ...
(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 DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 1988, ...
(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 MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
or
DR-DOS 7.02 DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 1988, ...
, so that DOS commands such as DIR would show long file names as well.


Driver-less real mode DOS LFN commands

Some small real mode DOS programs have also been written over the years, although many have been lost over time. One notable collection of programs that still exists is LFN Tools, which is open source and comprises seven useful LFN commands written in C++ and assembly language, with documentation included in English and German, and is available at LFNTOOLS on Sourceforge.net.


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 4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in MS-DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, it has ...
and
NDOS 4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in MS-DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, it has ...
with their internal DESCRIBE command and corresponding DESCRIPT.ION 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 Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive ...
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 4OS2 is the OS/2 analogue of 4NT and 4DOS by JP Software, Inc. JP Software discontinued 4OS2, TCMDOS2 and TCMD16, making version 3.0, 2.0, 2.0 the final version of these. The code for 4OS2 has been released, and is maintained, first by Sci ...
, 4NT / Take Command. It was adopted also by various other programs like Volkov Commander (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 is an orthodox file manager, i.e. it features two file list panels (selectable via tab key) and a Command-line interface, command line. It supports Tab (interface), multiple tabs for each panel. Total Commander is deve ...
,
Double Commander Double Commander is a dual-pane file manager. It is a piece of free and open-source software licensed under the terms of the GNU General Public License. It is designed to be operated by a keyboard, a mouse, or by both at the same time. It has ...
,
7-Zip 7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own Archive file, archive forma ...
,
XnView XnView is an image organizer and general-purpose file manager used for viewing, converting, organizing and editing raster images, as well as general purpose file management. It comes with built-in hex inspection, batch renaming, image scan ...
, ACDSee, Newsbin Pro, V,
FreeDOS FreeDOS (formerly 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 system, 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 Megahertz, MHz Motorola 68000 Central processing unit, CPU, 1 Megabytes, MB of Random Access Memory, ...
, the operating system of the
X68000 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 Megahertz, MHz Motorola 68000 Central processing unit, CPU, 1 Megabytes, MB of Random Access Memory, ...
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 logographic Chinese characters, adapted from Chinese family of scripts, Chinese script, used in the writing of Japanese language, Japanese. They were made a major part of the Japanese writing system during the time of Old Japanese and are ...
in
Shift JIS Shift JIS (also SJIS, MIME name Shift_JIS, known as PCK in Solaris contexts) is a character encoding for the Japanese language, originally developed by the Japanese company ASCII Corporation in conjunction with Microsoft and standardized as 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,
Fujitsu FMR The is a Japanese personal computer built by Fujitsu from 1989 to 1997. It started as a proprietary PC variant intended for multimedia applications and PC games, but later became more compatible with IBM PC compatibles. In 1993, the FM Towns Ma ...
and
FM Towns The is a Japanese personal computer built by Fujitsu from 1989 to 1997. It started as a proprietary PC variant intended for multimedia applications and PC games, but later became more compatible with IBM PC compatibles. In 1993, the FM Towns ...
series computers.
Novell NetWare NetWare is a discontinued computer network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, using the Internetwork Packet Exchange, IPX network protocol. The f ...
versions 3.x and 4.x
volumes Volume is a measure of regions in three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). The ...
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. GroupWi ...
(NLM). In order to support
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
applications without implementing a
VFAT File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on h ...
-compatible scheme, the
FlexOS FlexOS is a discontinued modular real-time multiuser multitasking operating system ( RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business ...
-based IBM 4690 OS version 2 introduced its own
virtual file system A virtual file system (VFS) or virtual filesystem switch is an abstract layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. A VFS ...
(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 ISO 9660 (also known as ECMA-119) is a file system for optical disc media. The file system is an international standard available from the International Organization for Standardization (ISO). Since the specification is publicly available, im ...
*
Rock Ridge ISO 9660 (also known as ECMA-119) is a file system for optical disc media. The file system is an international standard available from the International Organization for Standardization (ISO). Since the specification is publicly available, im ...
*
Joliet (file system) ISO 9660 (also known as ECMA-119) is a file system for optical disc media. The file system is an international standard available from the International Organization for Standardization (ISO). Since the specification is publicly available, im ...
* Romeo (file system) * 6.3 filename * VFAT patent issues *
Design of the FAT file system The FAT file system is a file system used on MS-DOS and Windows 9x family of operating systems. It continues to be used on mobile devices and embedded systems, and thus is a well-suited file system for data exchange between computers and devi ...
* 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 us ...
(LFS)


References


External links


The filesystems howto

Current version of DOSLFN




{{Computer files Windows architecture Filenames