long filename (LFN)

Definition of long filename (LFN) in The Network Encyclopedia.

What is LFN (Long Filename)?

Names of files in Microsoft Windows NT, Windows 95, Windows 98, and Windows 2000, which can be up to 260 characters long and can include letters, numbers, and selected special characters.

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

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 Filename MS-DOS 8.3 Alias
This is my document.doc
THISIS~1.DOC
This is my other document.doc
THISIS~2.DOC
This was a text document.text
THISWA~1.TEX