We rarely see .cmd
, but when we open it, we see that its contents are very close to .bat
.
- What is the reason for this similarity?
- What would be the main differences between them?
We rarely see .cmd
, but when we open it, we see that its contents are very close to .bat
.
The only difference between .cmd
and .bat
, is that in .cmd
the variable ERRORLEVEL
( PATH / APPEND / PROMPT / SET / ASSOC ) is also supported in the case of successful commands affected by command extensions .
In% w / w%, variable% w / w% will only change in case of an error.