Jump to content

Question about *.cmd content

Recommended Posts

what's the difference between .cmd and .bat ?

In addition to what cluberti linked to, there's a couple more points:

-.cmd being the new extension, won't run on older OS'es (i.e. Win9x and DOS)

-to quote a ex-MS employee (Mark Zbikowski):

The differences between .CMD and .BAT as far as CMD.EXE is concerned are:

With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD

files will set ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL

only on errors.

So for most uses, there's not a whole lot of difference. That being said, there's no reason to still use the very old .bat extension, unless you're writing a batch file for legacy systems (pre-NT)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...