4 ms·
If I remember correctly, the order was COM, EXE, BAT. On NT platforms today, this is actually user-configurable via the PATHEXT environment variable - and that
by int_19h 9y ago
If I remember correctly, the order was COM, EXE, BAT.
On NT platforms today, this is actually user-configurable via the PATHEXT environment variable - and that definitely has them in that order.
I wonder why that was the case. I remember reading some explanation about how it was about backwards compatibility, but that doesn't make much sense, since the first release of DOS 1.0 already had all three. Strictly speaking, COM as a format predates DOS (it's originally from CP/M), while EXE and BAT are more recent additions, COM files compiled for CP/M cannot run on DOS for other reasons, so there's still no compat issue there.
- TazeTSchnitzel 9y agoHaving an order of precedence provides predictable behaviour and, perhaps more importantly, is simpler to implement than forcing disambiguation. But probably it's just that they added the checks in that order and put no further thought into it.