3

When I compare a dir in DOSBox 0.74 against a dir from Windows 7 command prompt, the 8.3 filenames differ.

Long format (both drives and directories):

2012-07-30_abcdefg-abcde
2012-07-30_abcdefg-abcde.7z
2012-08-06_abcdefg-abcde
2012-08-06_abcdefg-abcde.7z
2012-10-22_IIS-LogFiles
2012-10-22_IIS-LogFiles.zip
2012-11-14_selective-abcde

DOSBox 0.74 (dir):

2012-0~1
2012-0~3
2012-1~1
2012-1~3
2012-0~2 7Z
2012-0~4 7Z
2012-1~2 ZIP

Windows 7 (dir /x):

2012-0~1
2012-0~1.7Z
2012-0~2
2012-0~2.7Z
2012-1~1
2012-1~1.ZIP
2012-1~2

so for instance if I'm passing in a path to DOSBox, sometimes this happens and whatever I'm trying to automate will fail. Why the difference, and can I change any settings to help DOSBox generate the correct shortnames?

wes
  • 745

2 Answers2

2

This has been reported to the DOSBox authors around 4.5 years back, and unfortunately they prefer to call this bug a "feature":

we are aware of that. Think the dosbox ones are always the windows ones in a different order. It wouldn't be easier to use the windows api function as then dosbox has different behaviour on different oses.

Don't think there's any way around it TBH, unless you make the changes yourself and compile your own copy, or are lucky enough to find one already made by someone else.

Karan
  • 57,289
2

There is already a solution for this by now. Try the latest enhanced DOSBox SVN build with Long File Name (LFN) support (and also the right mouse button copy/paste feature). It should support long filenames as well as using the same 8.3 filenames as the Windows system itself uses.

Latest Windows binary + required DLLs, zipped: http://bit.ly/12jANWF

Related forum discussions & sources: http://www.vogons.org/viewtopic.php?t=40610

Wengier
  • 61