Skip to content
daniel@cosenza:~/blog
FreeDOSHow-To July 8, 2026 2 min read

How to Set Up Long Filename Support on FreeDOS with DOSLFN

A complete walkthrough installing DOSLFN, understanding what it can and can't do, and verifying long filenames actually work with your specific FreeDOS utilities.

By default, FreeDOS operates under the classic 8.3 filename limit — DOSLFN adds support for the longer, VFAT-style filenames modern users expect, intercepting standard DOS file calls to translate between the two.

Step 1: confirm your FreeDOS installation includes DOSLFN

DIR C:\FREEDOS\BIN\DOSLFN.*

DOSLFN ships as part of the standard FreeDOS distribution — if it’s missing, it’s available from the FreeDOS package repository via FDIMPLES or the package manager covered elsewhere on this blog.

Step 2: add DOSLFN to CONFIG.SYS

DEVICE=C:\FREEDOS\BIN\DOSLFN.COM

Load it as early as practical in CONFIG.SYS, so subsequent drivers and programs started from AUTOEXEC.BAT all see long-filename support already active.

Step 3: reboot and verify it loaded

LOADED /C:DOSLFN

Step 4: create a file with a long name to test

COPY CON "My Long Document Name.txt"
This is a test.
^Z
DIR

Confirm the file appears with its full long name in DIR output, not truncated to an 8.3 equivalent.

Step 5: check the short-name alias DOSLFN generates alongside it

DIR /X

Every long-named file gets an automatically generated 8.3 short-name alias — useful to know both names exist simultaneously, since some programs will only ever see the short one.

Step 6: verify long names work correctly from within your actual applications

Open, save, and rename a long-named file from whatever specific DOS applications you plan to use regularly — as covered in fixing DOSLFN long filename problems, not every program honors long names even with DOSLFN loaded, so confirming your actual workflow works is worth doing directly rather than assuming.

Step 7: use quotes around long filenames containing spaces at the command line

TYPE "My Long Document Name.txt"

Unlike some later DOS-like environments, spaces in filenames need explicit quoting for FreeDOS’s command interpreter to treat the whole name as one argument.

Step 8: be aware of long-name behavior across removable media

Long filenames created under DOSLFN persist correctly on FAT-formatted removable media (USB drives, if USBASPI is configured) the same way they do on a hard disk, since the long-name data lives in the FAT filesystem structure itself, not anything DOSLFN stores separately.

Why DOSLFN is a driver-level solution rather than a built-in kernel feature

FreeDOS’s kernel itself remains fundamentally 8.3-based, for maximum compatibility with the huge body of software written against that exact assumption over DOS’s history — DOSLFN adds long-name support as an optional, removable layer on top, rather than changing that foundational behavior system-wide. This is precisely why it’s an installable driver you choose to load, not a permanent, unconditional change to how FreeDOS handles filenames.