VOGONS


First post, by neat2k

User metadata
Rank Newbie
Rank
Newbie

I've found a bug in Dosbox 0.63
It assings worng names for my long named directories. My guess is that windows create the short names in the order that they were created, e.g.

<first-six-chars-of-1st-created-file.EXT>
<first-six-chars-of-2nd-created-file.EXT>
However it appears like DOSBox is creating the short names itself (instead of using the operating system's name), probably doing

<first-six-chars-of-1st-alphabetically-file.EXT>
<first-six-chars-of-2st-alphabetically-file.EXT>
that is numbering files by name order.

DOSBox should use windows names. I've tried running a game through D-Fend and it file-not-found me as it CDed to the wrong directory

My system - Windows XP, NTFS file system (I hope that's enough info)

Attachments

  • Filename
    DOSBox Bug.jpg
    File size
    66.03 KiB
    Downloads
    165 downloads
    File comment
    Look at this screenshot. It demonstrates command prompt vs. dosbox
    File license
    Fair use/fair dealing exception

Reply 1 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it remains the question who is doing it wrong.
We like to blame winxp for it.

We don't use windows it's shortname calls as they are pretty useless if you aim for cross-platform support.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 11, by neat2k

User metadata
Rank Newbie
Rank
Newbie

huh? you can't say xp is doing that wrong... or you want the short names to be numbered by names, so they might change if you create another file?

DOSBox has the bug in there. in other platforms you have no choice but in windows it really should be based on the short names windows provides. otherwise it breaks programs and batch files so they can't run on dosbox CUZ DOSBox assings them a different name!

And no, I don't see how fixing this problem would hurt the cross-platformness. Actually it will improve the windows ver and keep the other verisons intact.

Reply 4 of 11, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

neat2k - unless I am mistaken, this kind of problem only occurs if you create the files/directories from *outside* DOSBox. In that case, I say it is the outside that has to take care not to create names that that exceeds the original 8.3 format.

I believe it is somewhat similar to what would happen if a *nix user creates a directory named A:B:C:D: (which is perfectly legal in *nix) and expects DOSBox to be able to use the same name.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

neat2k you can't seriously think that the names that winxp makes are the real names.

It may be microsoft but I think that they moved on to longer filenames then 8.3. hence their filenames are emulated as well.

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 11, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

neat2k you can't seriously think that the names that winxp makes are the real names.

It may be microsoft but I think that they moved on to longer filenames then 8.3. hence their filenames are emulated as well.

If I'm not mistaken, long and short filenames are stored in FAT. On NTFS I'm not sure, but I wouldn't be surprised, given M$'s backward compatibility strategy, if the short names are stored there as well.

Note that I don't agree with the original poster, as DOS emulation should never have to bother with long filenames (DOS games never use 'm).

JAL

Reply 7 of 11, by Markus

User metadata
Rank Newbie
Rank
Newbie

Short file names are completely different under NT-based Systems from Windows 9X.

Per default short names are stored even on NTFS and they don't necessarily have to follow 6chars~number.ext.
Try the follwing:

echo This is a test> longfilename.txt
fsutil file setshortname longfilename.txt short.txt
type short.txt

You can switch off short file name generation by setting

HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation 

to dword 1 and Windows 2000,XP,2003 will not store short file names anymore (requires reboot to take effect.)

Reply 9 of 11, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Imo this only means spending time on a pretty useless
thing, if that's the only problem you have you must be
a pretty happy person 😉
Rename your folders and your happiness will increase
even more.

wd

Reply 10 of 11, by priestlyboy

User metadata
Rank Oldbie
Rank
Oldbie

*chuckles*

I dunno why but if you want to see how DOSized version of filenames in a Windows XP CMD shell.
Just type DIR /X and it will show the 8.3 (crunched) title. 🤣
Just felt like contributing my tid bit of uselessness.

/Ieremiou

Ieremiou
----------
Helping Debug DOSBox.