0

I have a batch file I need to run in DOSBOX to run 16-bit program. It was originally written for MS-DOS with long command line with "&" to split command lines.

for example:

MyCommand aaaaa, bbbbb, ccccc, dddd, eeeee &
fffff, ggggg, hhhhh &
iiiii, jjjjj, kkkkk

The "&" doesn't work in DOSBOX.

I know that "^" works for Windows Command Prompt, but it doesn't work for DOSBOX.

So, how do I do it in DOSBOX, splitting long command line to several lines in a batch file.

Thanks, Oren.

Jeff Zeitlin
  • 9,773
  • 2
  • 21
  • 33
  • Why not just do two separate commands, one before the `&` and one after it? imo there's only one reason to ever chain commands with an ampersand, and it isn't applicable here. – SomethingDark Aug 09 '22 at 13:00
  • This might be better asked in [retrocomputing.se], as MS-DOS is no longer supported. Be aware that DOSBOX identifies as MS-DOS 5, so if the capability you are inquiring about didn't appear until MS-DOS 6, it may not be implemented at all in DOSBOX. – Jeff Zeitlin Aug 09 '22 at 13:03
  • Alternatively, search or ask on the [DOSBox Forum](https://www.vogons.org/viewforum.php?f=53) – Compo Aug 09 '22 at 13:41
  • @SomethingDark [DOS is severely crippled](https://superuser.com/a/1411173/241386) and doesn't support that syntax – phuclv Aug 09 '22 at 14:01
  • @Oren [Try `Ctrl+T` to see if it works](https://stackoverflow.com/a/8055390/995714) – phuclv Aug 09 '22 at 14:02
  • @phuclv - DOS doesn't support running one command and then running a second command? Because that's what my recommendation was to do. – SomethingDark Aug 09 '22 at 14:26
  • @SomethingDark yes, command.com doesn't have that capability. Ctrl+T works in MS-DOS 6 but DOSBOX is MS-DOS 5 – phuclv Aug 09 '22 at 15:00
  • 1
    @phuclv - You understand that I'm saying to enter a command, press enter, and then enter the second command and press enter, right? Like instead of `cls&echo hi` you'd type `cls`, press enter, type `echo hi` and press enter again. – SomethingDark Aug 09 '22 at 16:55
  • 1
    @SomethingDark sometimes you don't have that choice, for example `command /c "cls & echo hi"` – phuclv Aug 10 '22 at 03:53
  • True, at that point you'd just have to create a script and run that. Unfortunately, the actual command in question here hasn't been revealed so it's hard to give useful advice. – SomethingDark Aug 10 '22 at 12:48
  • What version of MS-DOS could use & like you claim? I have never seen it done in MS-DOS. – Bernhard Eriksson Aug 19 '22 at 11:28

0 Answers0