Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks. I didn't know Windows saved shortname as metadata. At least the DOSBox alphabetizing is something that can be scripted around. –  wes Nov 28 '12 at 3:36
    
Yeah, you can even turn off the 8.3 short filenames completely so that only LFNs are stored. Just type fsutil behavior set disable8dot3 1 at an elevated command prompt. –  Karan Nov 28 '12 at 15:38

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.