First post, by Annorax
- Rank
- Newbie
I've been playing around with writing a batch script to be a launcher for my games. It looks something like this:
@echo offecho ###########echo Choose Gameecho ###########echo 1.) Ultima Underworldecho 2.) Ultima Underworld 2echo 3.) Ultima 6echo 4.) Quitchoice /n /c:1234if errorlevel 4 GOTO:EOFif not errorlevel 4 if errorlevel 3 cd C:\Ultima\ultima6 & ultima6.exeif not errorlevel 3 if errorlevel 2 C:\Ultima\uw2\uw2.exeif not errorlevel 2 if errorlevel 1 cd C:\Ultima\uw & uw.exe
It does not work fully as intended and I think the reasons are real DOS vs DOSBox differences. Are there any workarounds or plans to implement the following?
1.) "GOTO:EOF" - this gives illegal command error but is valid in real DOS. This is helpful in batch scripts to quit the script without "exit", which closes the DOS window.
2.) Running multiple commands on one line with &, &&, |, ||, etc... does not seem to work as intended.
3.) "doskey" would be nice to have but it also gives illegal command errors.
4.) Batch files typically can have the file extension .BAT or .CMD. In DOSBox, only .BAT seems to work, not .CMD, even though the files are identical. Not a major problem as we can just use .BAT, but a difference nonetheless.
Knowledge is power. Power corrupts. Study hard. Become evil.