Long filename (LFN)

Definition of Long Filename (LFN) in the Network Encyclopedia.

What is Long Filename?

Long Filename is a Microsoft’s backward-compatible extension of the old 8.3 filename naming scheme used in MS-DOS. Names of files in Microsoft Windows, which can be up to 260 characters long and can include letters, numbers, and selected special characters. They can also include longer filename extensions like .tiff, .html, .xhtml or .jpeg.

An 8.3 alias is automatically generated so that MS-DOS and 16-bit Windows-based applications can access the files.

Long Filename
Long Filename

How it works

The NTFS file system has native support for long filenames, while Windows 95 and Windows 98 use multiple file allocation table (FAT) entries to hold a single long filename, marking these entries with the following unique set of attributes:

  • Read-only
  • System
  • Hidden
  • Volume label

Windows 95, Windows 98, Windows NT, and Windows 2000 similarly generate MS-DOS 8.3 aliases by using the first six characters (excluding spaces) from the long filename, followed by a tilde and a number, plus a three-character extension using the first three characters after the final period. All characters in the filename and extension are translated to uppercase. The following table shows some long filenames and their MS-DOS aliases. Long Filenames and Corresponding MS-DOS Aliases

Long FilenameMS-DOS 8.3 Alias
This is my document.docTHISIS~1.DOC
This is my other document.docTHISIS~2.DOC
This was a text document.textTHISWA~1.TEX


Articles posted after being checked by editors.

Recent Posts