Long filename

Source: Wikipedia, the free encyclopedia.

Long filename (LFN) support is

filesystems since its first implementation in Windows NT 3.5
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
(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

Windows Explorer. Windows NT
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.

extended attributes
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.

FAT32
volumes.

The long filename system allows a maximum length of 255

UCS-2 characters[3][4] including spaces and non-alphanumeric characters (excluding the following characters, which have special meaning within the COMMAND.COM command interpreter or the operating system kernel: \ / : * ? " < > |). This is achieved by chaining up to 20 directory entries of 13 2-byte Unicode characters each.[4]
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

DR DOS (prior to DR DOS 6.0 November 1991 updates) which still utilized a relative path representation internally,[7][8][9]
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

DR-DOS 7.02
, so that DOS commands such as DIR would show long file names as well.

OS Driver name Provider
any plain DOS DOSLFN, LFNDOS third-party
DR-DOS LONGNAME included
RxDOS
built-in included
OS/2 VFAT-OS2.IFS third-party
Windows NT 4.0 NTLFN third-party

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

FreeCOM[11] and some CUI_LIB[12]
-based applications.

Fujitsu FMR and FM Towns series computers.[citation needed
]

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

In order to support

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.[14]

See also

References

  1. ^ "MSDOSFileSystem". CocoaDev. 2005-09-12. Archived from the original on 2006-10-18.
  2. ^ "Errors Creating Files or Folders in the Root Directory". Microsoft. 120138.
  3. Microsoft Corporation. 810456. Archived from the original
    on 2008-04-23. Retrieved 2007-04-19.
  4. ^ a b Dobiash, Jack "vinDaci", ed. (1998-01-06) [1996-11-18]. "Long Filename Specification" (4 ed.). Grand Ronde, Oregon, USA. Archived from the original on 2015-10-25. Retrieved 2013-05-22.
  5. ISBN 978-0-201-63287-3. (xviii+856+vi pages, 3.5-inch floppy) Errata: [1][2]
  6. INTER61
    .
  7. ^ a b Paul, Matthias R. (1997-07-30) [1994-05-01]. NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP (in German) (3 ed.). Archived from the original on 2017-09-10. Retrieved 2014-08-06. (NB. NWDOSTIP.TXT is a comprehensive work on Novell DOS 7 and OpenDOS 7.01, including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.) [3]
  8. ^ a b Paul, Matthias R. (1997-06-07) [April 1994]. "Chapter 1.3.xi: Überlange Pfade". NWDOS7UN.TXT — Zusammenfassung der dokumentierten und undokumentierten Fähigkeiten von Novell DOS 7. MPDOSTIP (in German). Archived from the original on 2016-11-07. Retrieved 2016-11-07.
  9. ^
    4DOS 8.00 online help
    .
  10. pseudo-environment variables, 0xED being reserved for Digital Research/Novell/Caldera and 0xFD for FreeDOS
    .)
  11. ^ Davis, Jeremy. "FreeCom and 4DOS DESCRIPT.ION files" (FreeDOS tech note). FreeDOS. Archived from the original on 2016-11-11. Retrieved 2016-11-11.
  12. ^ Paul, Matthias R. (1997-05-01) [1995-03-01]. "Hinweise zu JPSofts 4DOS 5.5b/c, 5.51, 5.52a und NDOS". MPDOSTIP (in German). Archived from the original on 2016-11-04. Retrieved 2015-05-08. (NB. The provided link points to a HTML-converted version of the 4DOS5TIP.TXT file, which is part of the MPDOSTIP.ZIP collection.) [4]
  13. ^ Novell (1999-02-11). "TID1002030 Windows NT, Long File Names on NetWare". Archived from the original on 2011-06-06. Retrieved 2007-12-03.
  14. ^ 4690 OS Programming Guide Version 5.2 (PDF). IBM. 2007-12-06. IBM document SC30-4137-01. Archived from the original (PDF) on 2022-01-25. Retrieved 2018-09-03.

External links