0

I'm trying to understand some dosbox.conf files for some games I have and would like to play on linux I noticed in the [autoexec] part have some lines are either prefixed with '@' or not and I don't understand what this prefix is used for

two examples : Game 1

[autoexec] 
cd .. 
@cd .. 
@mount c .\games\ 
imgmount d .\games\baris\cd\BARIS.cue -t cdrom 
@c: 
cls
@cd baris 
@call buzz
exit

Game 2

[autoexec] 
cd .. 
cd .. 
mount c .\games\WackyWhe  
imgmount d .\games\WackyWhe\cd\wackywheels.iso -t cdrom 
c: 
cd wacky
cls 
@ww
exit

In that second example only one line has the @prefix and the ww correspond to the main executable file of the game, and the game launch so this isn't a comment (which seems to use #)

so what is the difference between @ww and ww ?

or between

@cd baris 
@call buzz

and

cd baris 
call buzz

?

Is it purely DosBox syntax or plain dos/cmd ?

Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
Voljega
  • 156
  • 1
  • 13

1 Answers1

2

Normally dos commands, when run from inside a batch file, echo the command to the screen and then run the command and display the results. Putting @ at the beginning of the command suppresses echoing that command to the screen before running it.

Something else: you can turn all echoing off with the echo off command but how to you suppress echoing the echo off command? With @echo off

You mention # could be a comment character, but it isn't for dos. With dos you need to use the rem command to make a remark or use a double colon to start the line.

Jerry Jeremiah
  • 9,045
  • 2
  • 23
  • 32
  • Thank you for the answer Jerry, maybe I was mistaken with the # I've think I've only seen once. – Voljega Oct 03 '17 at 07:15
  • @Voljega # is the comment character for many languages including Unix shells and Python so I'm sure you've seen it before. – Jerry Jeremiah Oct 03 '17 at 07:33
  • @Voljega The `#` character is used for comments in DOSBox configuration files, and that include in the `[autoexec]` section. It won't work if you use it in a batch script or from the command prompt under DOSBox. – Ross Ridge Oct 04 '17 at 01:06
  • @RossRidge any character can be used as a comment character in config files. If you stick a character before the name the name is changed and can't be found. There is more info here: https://stackoverflow.com/a/19550081/2193968 But INF files do have a defined comment character: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/general-syntax-rules-for-inf-files – Jerry Jeremiah Oct 04 '17 at 03:14
  • @JerryJeremiah DOSBox configuration files aren't Windows .INI files and do have a defined comment character: `#`. In particular the `[autoexec]` section doesn't contain settings so doesn't have names that would be ignored. If you put `; this a comment` in the `[autoexec]` section then DOSBox complains about the command `;` not being found, while if you put `# this a comment` it simply ignores the line. – Ross Ridge Oct 04 '17 at 04:04