Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: .bat or .cmd?  (Read 4514 times)

0 Members and 1 Guest are viewing this topic.

Xeratul

    Topic Starter
  • 100,000th poster


  • Hopeful
  • Experience: Familiar
  • OS: Windows 7
.bat or .cmd?
« on: March 08, 2006, 06:55:10 PM »
Ok, heres probably and easy question...
What is the difference between a batch file (.bat) and a NT command script (.cmd)?  :-?
What exactly is a NT command script or .cmd file?

When I save my batch files with a .cmd extension they appear to run the same.

SunflowerNetwork

  • Guest
Re: .bat or .cmd?
« Reply #1 on: March 08, 2006, 07:22:41 PM »
For the most part, these are treated identically by Windows.
If you're creating something new, use .CMD.

The details: For reasons of maintaining backward compatibilit, Windows treats .BAT slightly differently than .CMD files -- essentially wrapping the newer windows command shell in a veneer of an older command shell, in case the .BAT file is doing something specific to  the older Windows versions.  Stick with .CMD and you'll be fine.


AJ
Sunflower Network
Friendly Comptuer Help. Instantly.
www.sunflowernetwork.com

Xeratul

    Topic Starter
  • 100,000th poster


  • Hopeful
  • Experience: Familiar
  • OS: Windows 7
Re: .bat or .cmd?
« Reply #2 on: March 09, 2006, 08:11:17 AM »
Isn't that kind of like how they keep command.com around so it has better compatibility?