VOGONS

Common searches


First post, by Qooty

User metadata
Rank Newbie
Rank
Newbie

(Hi, new, sorry)

In the attempt to resolve a bug with my QBasic progs while using DOSBox, I have noted that not all DOS Command Line commands - or at least all of their parameters - area available.

I am overseas and have only my wife's MacBook for a computer, and after 6 months have lost patience waiting for a chance to get back to basic. So I googled and noted DOSBox can offer emulated QBasic, even on an OS/X system.

I'm now happily enjoying QBasic on the MacBook (thank you, thank you very much), but have hit trouble with a prog of mine. I tracked it back to find that its a Command Line issue ...

So here I am :
Mac OS/X 10.4.11
DOSBox 0.72, DOSBox 3G cycles 0 Frameskip
What normally works but doesn't in this case :
dir /b
Illegal switch: /b.

I note that there are issues with \ ... but this is /

/b is a parameter to enable a "Bare" format of the directory listing. I come there often.

So I checked for "help DIR" and got nuffin.

Then I searched the WIKI, the forum, and Google, for DOSBox Command Line options ...

... and now I'm here. I was wondering if "dir /b" is available in DOSBox, or if something else does on its behalf, and overall what DOS commands are available in DOSBox. I also noted that it wasn't keen on my "title" command in my opening .BAT file, either.

So, can anyone help me out?

Sorry for the dramatic presentation, but my wife is watching Chicago while I type.

Thanks for any assistance you can provide.

Kev

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

dir /b isn't available in dosbox
To be honest. I didn't know it existed until this post

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

Reply 3 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Yeah dosbox does not provide the full list of dos commands. My advice would be to use Dosbox to boot an MS-Dos version on an image file and then you have the full set of Dos Commands. In the guide section is a quick guide on how to use the booting image function.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you can upgrade to Extended QuickBASIC, you might be able to use the DIR$ function to do what you were shelling to DOS DIR for. It does not recurse subdirs, though.

Reply 5 of 7, by Qooty

User metadata
Rank Newbie
Rank
Newbie

Thanks all! DIR /b is a fave of mine because it just gives filenames only, no headers, sizes, last opened ... handy for getting a list for a user to choose from, or for checking to ensure files exist, etc.

I have followed the instructions offered (wow, so THAT's what mounting is!) and now have a pile of zip files that look like DOS files. I tried "Edit" and YAY!

So now I just have to work out which files hold the "Dir" syntaxis.

ripsaw its a nice idea but I'm too old to learn a new trick ... or even a slicker version of an old trick 😀 ... I'd have to search replace a hell of a lot of code dating from the early 1990s! But if I can't work this out ... well maybe 😀

I dunno what recurse subdirs means though. I wasn't blaming them in the first place ...

Thanks all!

Reply 6 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Recursing the subdirs meaning looking into subdirectories for files as well. The /S switch on DIR, for example.

If you are piping the DIR /B into a file and parsing that into selection lists and so forth, you would probably find using DIR$ easier than what you were doing; even if it is a new trick. 😉