.bat
files are left-overs from DOS. .cmd
files are for Window NT command processor or higher, and have more capabilities (some looping structures, the ability to call and return from procedural type blocks).
command.com
was what ran the operating system and contained the internal commands like dir
in DOS and early versions of Windows. It was replaced by cmd.exe
when Windows NT was introduced, and was the first 32-bit command processor.