wd wrote:If it really uses that switch it would break because your suggestion is to *ignore* that switch.
No. At the moment, all DOSBox returns to the game is "Illegal Switch: /ON". This is written to a file (using something like "DIR /B /ON > foo.txt") and the game expects to find a list of file names in that file. So in that case it will find one invalid filename ("Illegal switch") in that file, which effectively breaks the game. If the files weren't sorted by name that would still be fine, but not getting any files at all is not.
Dungeon 2 (by me) uses /ON in the setup code, so player can't play a custom map.
Paddle Battle (by me) uses /ON to retrieve a list of player graphics, so won't run at all in DOSBox.
Frankus Tracker II (not by me) uses /ON to retrieve a list of songs when loading/saving using the F2/F3 keys.
The point is, DIR emulation is incomplete in its current state and I bet there are even games and applications that make use of the other even less used but still valid switches as well. As most switches are not critical to the output (apart from /B and /AD, which luckily are already supported!), it would be much better to simply ignore them instead of printing an error. That way, some file listings might not be in the expected order, but that's still way better than having no file list at all. I suppose most applications wouldn't crash from a list that is not sorted by file name / date / extension, but as you can see above, there are cases where programs become unusable because there is no file list at all. And believe me, using DIR for getting a directory listing was usual in programming languages that didn't offer native / library commands for this task.