📜  CMD和BAT的区别

📅  最后修改于: 2021-09-15 01:30:39             🧑  作者: Mango

1.命令:
CMD 文件是一种脚本文件,它以简单的文本内容格式合并了一个或多个指令,这些指令是为了操作一系列任务而执行的。它类似于 .BAT 文件,它在许多情况下还用于保存一批可执行命令。CMD 是小工具中的直接命令,编程语言称为 DOS 批处理语言。此文件类型由 Microsoft 生成,用于执行 Windows NT 命令脚本。

2. 蝙蝠:
BAT 文件的扩展名为 .BAT,意思是批处理文件。它是一个简单的文本内容文件,其中包含许多用于重复性任务或一个接一个运行脚本组的指令。 BAT 文件用于许多目的,例如运行应用程序、复制文件、删除文件和关闭进程。它们还被称为批处理文件、shell 脚本、批处理程序和命令文件。

CMD 和 BAT 的区别:

S. No. CMD BAT
1. It has a CMD interpreter to run commands.  It has an NT Virtual DOS Machine to run commands. 
2. It has many advanced features as compared to BAT. It has old features’ ad not offering many advanced features yet because it is an old type of file.
3. It handles the errorlevel variable by changing its state even if no error takes place. In this, this variable is solely modified as soon as a real error takes place and no change in the state takes place when each command executes successfully.
4. It supports only cmd.exe. It supports  cmd.exe. as well as command.com.
5. These files support nearly all windows versions as it is a new file type. These files are not supported in all windows versions as it is an old file type.
6. It is a unique kind of file. It is not a unique kind of file.
7. It does not sequentially process files.  It processes files in a sequential manner.
8. It is more secure than BAT files. It is not secure as CMD files.