Skip to content
Related Articles

Related Articles

Improve Article

Difference between CMD and BAT

  • Last Updated : 04 Jun, 2021

1. CMD :
A CMD file is a script file that incorporates one or more instructions in a simple textual content format that are performed in order to operate a range of tasks. It is comparable to a .BAT file, which is additionally in many instances used to keep a batch of executable commands.CMD is the command immediate in the gadget and the programming language is referred to as DOS batch language. This file type was produced by means of Microsoft to be used for the implementation of Windows NT command scripts.

2. BAT :
BAT files have an extension .BAT which means batch processing file. It’s a simple textual content file that incorporates a number of instructions used for repetitive tasks or to run groups of scripts one after another. BAT files are used for quite a number of purposes such as running applications, replicating files, deleting files, and shut down processes. They are additionally referred to as batch files, shell scripts, batch programs, & command files.

Difference between CMD and 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
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.


My Personal Notes arrow_drop_up
Recommended Articles
Page :