Re: CMD vs. BAT

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Bassam Abdul-Baki (babdulbaki_at_comcast.net)
Date: 10/16/04


Date: Fri, 15 Oct 2004 20:26:09 -0400

Hi Clay,

Interesting find and read that link. Suffice to say, I will have to use BAT
files from now on. I've always used BAT files myself in the past, but I
inherited the CMD script from the previous developer and didn't have any
problems before to warrant renaming it, until recently. BAT files seem more
honorable than CMD, even though the link you gave seemed to imply BAT files
are legacy OS's and CMD files are for the newer ones. The differences
between the two were clear, but irrelevant to my case, because even the ECHO
command had garbage prepended to it (for a very tiny percentage of machines)
and I can't figure out why. Thanks for your feedback.

Bassam

"Clay Calvert" <ccalvert@Wanguru.com> wrote in message
news:4fdum09t1banu98ugi9ofnad3r10es4nip@4ax.com...
> On Thu, 14 Oct 2004 20:40:34 -0400, "Bassam Abdul-Baki"
> <babdulbaki@comcast.net> wrote:
>
>>Greetings,
>>
>>Can anyone tell me the difference between CMD files and BAT files on a
>>Windows 2003 Server domain? Basically, the BAT file runs correctly on all
>>client machines whether the BAT files are located on the network or
>>locally.
>>As for the CMD files, on a few machines (XP) the files do not run
>>correctly.
>>For example, if I call "del test.txt" from a CMD file, the del command
>>gets
>>prepended with garbage and I get the following error: !@#%del is not
>>recognized as an internal or external command, operable program or batch
>>file. The same call works if it is typed inside a DOS window manually,
>>but
>>running it from a BAT file does not work on all XP machines. Any
>>suggestions? Thanks.
>>
>>Bassam
>
> This post is the only place I've ever seen a documented difference
> between .bat and .cmd.
>
> http://groups.google.com/groups?selm=ODYdDP6TDHA.1552%40TK2MSFTNGP12.phx.gbl
>
> I always use a .bat extension in XP.
>
> Clay Calvert
> CCalvert@Wanguru.com
> Replace "W" with "L"



Relevant Pages

  • Re: CMD vs. BAT
    ... not work on all XP machines. ... Bassam ... > Can anyone tell me the difference between CMD files and BAT files on a ... As for the CMD files, on a few machines the files do not run ...
    (microsoft.public.win2000.cmdprompt.admin)
  • CMD vs. BAT
    ... Windows 2003 Server domain? ... client machines whether the BAT files are located on the network or locally. ... As for the CMD files, on a few machines the files do not run correctly. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: CMD vs. BAT
    ... I was using CMD files, but like my original post said, CMD files were giving ... me problems on XP Pro machines where the BAT files were working. ... Bassam ... I've always used BAT files myself in the past, ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: CMD vs. BAT
    ... >Windows 2003 Server domain? ... >client machines whether the BAT files are located on the network or locally. ... >As for the CMD files, on a few machines the files do not run correctly. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: .cmd vs. .bat
    ... ..cmd files are batch files that are intended to run on NT based Windows while .bat files will run in the "DOS based" Windows AND/OR "NT based" Windows. ... with the .cmd extension as opposed to with the .bat ...
    (microsoft.public.windowsxp.general)