Long Filename Support for DOSBox and vDos, by Wengier Wu

Long filename support in DOS emulators | DOSBox SVN-lfn: DOSBox with long filename support | vDosPlus: vDos with long filename support and other features

Long filename support in DOS emulation software for Windows

Wengier Wu has created patches that add long filename support to the two leading DOS emulators for Windows, DOSBox (by the DOSBox team) and vDos (by Jos Schaars). The vDos patch also provides IRQ1/INT9 handling that makes it possible to use EDIT.COM, QBASIC, XyWrite and other programs that otherwise cannot be run under vDos.

This page provides download links to executable files and source code for these patched versions, and some suggestions for using them. 

"Long filenames" are Windows-style filenames that can contain up to 256 characters, including spaces. Traditional DOS programs only recognize filenames in "8.3" format (for example, MYRESUME.DOC) and cannot recognize long filenames at all, even when these programs are run in the NTVDM "DOS window" in 32-bit Windows versions.

In order to make files with long names accessible to DOS applications, Microsoft devised a scheme in which files with long names are seen by DOS applications (including COMMAND.COM) under "short filenames" generated by Windows itself. So, for example, a file that is listed in Windows Explorer as WindowsUpdate.log will have a generated short filename that might look like WINDOW~1.LOG (the number after the tilde may vary in different systems and different directories). A traditional DOS application may be able to open the file, but will recognize it only under its generated short filenname, not its actual name. (Note that Windows includes an advanced option that disables generation of short filenames; if this option has been switched on by a system administrator, DOS programs will only see files whose actual filenames are in the traditional "8.3" format.)

vDos and DOSBox have different ways of handling long filenames:

Note: A few DOS applications written or updated since the release of Windows 95 are "LFN-aware applications" which also recognize long file names directly when LFN support is enabled, either by running within DOSBox SVN-lfn or vDos-lfn, or when the DOSLFN software is loaded in DOS itself. Examples of these LFN-aware applications include MS-DOS 7 EDIT, PKUNZIP 2.50, MPXPLAY, QuickView Pro and Doszip Commander; further examples are listed here.

DOSBox SVN-lfn: DOSBox with full long filename support

DOSBox, as supplied by its authors on its official web site, displays arbitrarily-created short filenames (FILENA~1.EXT) for Windows files that have long filenames, but it cannot display the actual long filename for those files. Also, DOSBox creates its own short filenames, which may not be the same as the short filenames created by Windows, leading to problems when you attempt to delete or rename a file inside DOSBox.

Wengier Wu provides a continually updated version of LFN-enabled version of DOSBox that displays long filenames with the DIR command and in LFN-aware programs such as those describe above. Under Windows, this LFN-enabled DOSBox uses the actual Windows short filenames instead of generating arbitrary ones; if the source code is compiled and used under Linux or OS X, arbitrary short filenames are created for listing long filenames. 

Further details on the LFN support in these builds may be found in this discussion thread at Vogons.org.

Additional features include copy/paste support via the mouse, as described in this discussion thread at Vogons.org, and support for DBCS, used for displaying Chinese, Japanese, and Korean characters. (Further details on copy/paste support:  right-drag on text in the DOSBox window and release the mouse to copy to the clipboard; right-click in the DOSBox window to paste from the Windows clipboard; you can modify this behavior to use Alt-Right-click, etc., via the dosbox.conf file.)

DOSBox-SVN-lfn now (8 May 2016) supports parallel-port passthrough; you can print from DOSBox-SVN-lfn to LPT1, and the output will be redirected either to an actual LPT1 if it exists in your system or to any printer that you have designated as LPT1 through the NET USE command in Windows.

DOSBox-SVN-lfn also supports automatic drive mounting. Instead of using the standard DOSBOX MOUNT command, simply type a drive letter and colon (for example, E:), and you will be prompted to mount that drive in DOSBox-SVN-lfn.

I have compiled a copy of DOSBox-lfn that combines Wengier Wu's revisions to the source code (as of September 2017) and later revisions to SVN code. Both basic DOSBox and DOSBox-lfn binaries may be downloaded from this link.

Wengier Wu's changed source files used in this version (based on a recent SVN version of DOSBox) may be downloaded from this link. If you build DOSBox SVN-lfn under OS X or Linux, it will display the long names of files on the host system and (like ordinary DOSBox) generated arbitrary short names for use in applications that expect short names or as an alternative to long filenames at the command prompt and other applications that use either long or short filenames.

vDosPlus: vDos with long filename. extended keyboard support, and other features

Jos Schaars' vDos is an advanced emulator designed for use with DOS application programs, including databases. It is the only DOS emulator that provides file locking and other features that make it possible to use database software without file corruption.

Wengier Wu's vDosPlus modification provides full support for long filenames, and also alters vDos's keyboard handling so that programs like EDIT, QBASIC, and XyWrite can run under vDos. It is continually upated, and includes an update-checker that may be run from the Windows Start Menu.

A brief description and download link may be found on another page. Questions and suggestions may be posted in the support forum at the project's Sourceforge page.

Edward Mendelson (em thirty-six [at] columbia [dot] edu, but with two initials and two numerals before the [at] sign, not spelled out as shown here).