LFN is an extension of the “short filename” standard that is used in DOS, which only allows eight uppercase characters plus a three-character file extension.

Full-form of LFN is ” Long Filename .” LFN filenames can be about 255 characters long, which includes file extensions, which are longer or shorter than three characters. They can come under lowercase and uppercase characters, along with spaces, numbers, and symbols.

Microsoft introduced long filename support with VFAT file system in 1994. VFAT was first included in Windows NT 3.5 and then later in Windows 95.

To maintain backward compatibility with the previous FAT File System, Microsoft provided an automatic way to shorten long filenames, which used a tilde followed by a number.

If the shortened filename ever conflicts with another filename, then the number is incremented by 1.

for example

  • Example.doc → EXAMPLE.DOC
  • Sample File.doc → SAMPLE~1.DOC
  • Sample File copy.doc → SAMPLE~2.DOC
  • Verylongfilename.txt → VERYLO~1.TXT
While Windows, macOS, and Unix have supported long filenames for the last 20 years, a filename can still be truncated if the file is copied or edited by a Windows system, while the FAT file system When used

« Back to Wiki Index