Google Groups

Difference between .cmd & .bat files?

Mark Zbikowski (MSFT) Jul 21, 2003 9:18 AM
Posted in group: microsoft.public.win2000.cmdprompt.admin
The differences between .CMD and .BAT as far as CMD.EXE is concerned are:

With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD
files will set ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL
only on errors.

Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.

"Gregory Mamayek" <> wrote in message
> Gang:\>
> How come some files fire using .cmd, while others use .bat?
> When would you use either one?
> Is it because .cmd is for execution, while .bat is used to provide a
> data source (ie. like web page .htm using SQL to call data source .bat)?
> --
> Cordially,
> Greg
> A+ BS MCSE Web Developer