Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wikipedia link on the differences:

https://en.wikipedia.org/wiki/Batch_file#Filename_extensions

Which also links to:

http://waynes-world-it.blogspot.com/2008/08/difference-betwe...

There used to be a microsoft.com page on it too, but that's been lost to time.



Those articles match my understanding, but it's a bit different to your previous comment (but maybe I misunderstood your previous comment).

I thought you were saying that there was at least one version of Windows where .cmd would run in cmd.exe while .bat would run on COMMAND.COM.

Whereas I think the actual situation is that: on Win95 .bat would run on COMMAND.COM whereas .cmd wouldn't run at all; on NT .bat and .cmd would both run on cmd.exe. As a result, if you used .cmd you could be sure that it would never run on COMMAND.COM, so you could use the new command extensions in cmd.exe without worrying about it causing a confusing error.


Now you say it, I'm not sure either tbh. During that period I was principally an NT user, and I never really used 95/98.

When I get a mo, I might fire up an NT VM and see what actually happens.

Maybe.... .bat and .cmd DO both run cmd.exe, but the former disables the command extensions?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: