VOGONS


Reply 20 of 30, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Just for fun, I threw together GENEVL.C which create EVL.BAT:

@echo OFF
%1 %2 %3 %4 %5 %6 %7 %8 %9
echo 0
if errorlevel 1 echo 1
... repeat for 2-254 ...
if errorlevel 255 echo 255

Here is a test run:

R:\> EVL ERRLVL 5
Exit[5] <- produced by ERRLVL
0
1
2
3
4
5
R:\>

Attached .ZIP contains GENEVL.C and the generated EVL.BAT

- Dave ; https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChardware can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small FileTrans(w/o netSW)via Lan/Lpt/Serial

Reply 21 of 30, by Cursed Derp

User metadata
Rank Oldbie
Rank
Oldbie

Hello, I tried two of the tools mentioned in the thread. For some reason, DaveDDS's errlevel tool crashes dosbox and igully's errlevel tool shows this screen after running:

The attachment image (4).png is no longer available

Thank you all again for the information and tools provided. If there is something I'm doing wrong or that I'm missing, please let me know

I am as smooth as a gravy train with flaming biscuit wheels.

Reply 22 of 30, by Cursed Derp

User metadata
Rank Oldbie
Rank
Oldbie

I apologize, I hadn't seen davedds's most recent post. I tried genevl and it seems to have worked perfectly while the other tools for some reason didn't.

I am as smooth as a gravy train with flaming biscuit wheels.

Reply 23 of 30, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie
Cursed Derp wrote on Yesterday, 20:31:

Hello, I tried two of the tools mentioned in the thread. For some reason, DaveDDS's errlevel tool crashes dosbox and igully's errlevel tool shows this screen after running:w

My tool is called ERRLVL.COM - you are running ERRLEVEL - I think it was posted by someone else, and I've not looked at.

It looks like you are .BAT file of some sort, with commands DOS doesn't recognize in it.

ERRLVL.COM is an executable program which searches for a .COM or .EXE in current directory, then along your path and executes it directly (not via DOS command processor) - this allows it to receive the actual exit code the program terminated with. No batch is involved.

I assure you it works find in DosBox - I use it frequently there.

- Dave ; https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChardware can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small FileTrans(w/o netSW)via Lan/Lpt/Serial

Reply 24 of 30, by igully

User metadata
Rank Member
Rank
Member

The problem is that you are running DOSBOX not a real DOS.
It works on a real DOS, like MS-DOS, DR-DOS, PC-DOS, etc.

It is likely that the emulation/simulation of DOSBOX DOS batch file processing API is not complete or accurate.

Reply 25 of 30, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on Today, 01:25:

The problem is that you are running DOSBOX not a real DOS.
It works on a real DOS, like MS-DOS, DR-DOS, PC-DOS, etc.

It is likely that the emulation/simulation of DOSBOX DOS batch file processing API is not complete or accurate.

I'm curious - have you tested this in older versions of DOS?

I've not looked at the script other than the error messages that were posted - I do seem to recall that .BAT file capability was less in oldere versions (but it has been a long time since I looked closely)

Fwiw: ERRLVL.COM works in DosBox (that's probably where I use it most often)

- Dave ; https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChardware can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small FileTrans(w/o netSW)via Lan/Lpt/Serial

Reply 26 of 30, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

That's a windows DOS batch file. It definitely will not run on DR-DOS, PC-DOS, etc.

Reply 27 of 30, by igully

User metadata
Rank Member
Rank
Member

It works under MS-DOS 6.22, PC-DOS 6.3, and DR-DOS 7.01.

Lots of things fail on DOSBOX and also it has its own set of inaccuracies. It is extremely easy to set up, which is its most favorable aspect. I do however, prefer PC emulators which are precise and accurate at what they do (with the added complexity to set them up).

Last edited by igully on 2026-04-25, 03:42. Edited 1 time in total.

Reply 28 of 30, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

You know DOSBox can run MS-DOS, right? Just like those other emulators.

Reply 29 of 30, by igully

User metadata
Rank Member
Rank
Member
jmarsh wrote on 21 minutes ago:

You know DOSBox can run MS-DOS, right? Just like those other emulators.

Other emulators run DOS. I have just submitted three pictures taken on VirtualBox a minute ago with DOSes I had at hand, but could well have used 86Box or the other emulators of the lot.

Reply 30 of 30, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

I guess you're unaware DOSBox can boot disk images just like those other emulators. In which case it won't be using its own shell, and can run batch files that contain commands only compatible with "windows" DOS.