Re: CMD vs. BAT
From: Mark V (notvalid_at_nul.invalid)
Date: 10/18/04
- Previous message: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- In reply to: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Next in thread: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Reply: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 17 Oct 2004 18:41:16 -0700
In microsoft.public.win2000.cmdprompt.admin Bassam Abdul-Baki wrote:
> Bassam
>
> "Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com> wrote in
> message news:%23z6QQUItEHA.2804@TK2MSFTNGP14.phx.gbl...
>>
>> "Bassam Abdul-Baki" <babdulbaki@comcast.net> wrote in message
>> news:ulf$9axsEHA.1468@TK2MSFTNGP12.phx.gbl...
>>> 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.
>>
>> Contrariwise, I always use .CMD when writing batch files that use
>> NT-specific features, whether NT, 2K, or XP. This prevents me
>> from inadvertently running them from a Windows 98 system and
>> either getting error
>> messages, or remembering to code the thing to exit gracefully
>> when run from
>> 9X.
>>
>> /Al
>>
>>> 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%40TK2MSFTNGP
>> 12.phx.gbl
>>> >
>>> > I always use a .bat extension in XP.
> 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. Use whatever works I guess. :-)
>
And we still apparently have no idea why those systems print or
include "garbage" when the extension is .CMD instead of .BAT. I have
no certain knowledge why that would occur, but to get back on track.
Have you confirmed/replaced CMD.EXE
Have you acertained that ".bat", ".cmd", "batfile" and "cmdfile"
association are correct and standard.
Eliminated any "AutoRun" entries for Command Processor in the
registry.
Double-checked Language, Encoding, codepage, et al.
Just a few to consider...
BTW I started using the .CMD extension with early OS/2. Since both
that and NTx Windows use cmd.exe for the console natively, it seemed
quite natural to continue using .CMD and leaving .BAT to it's DOS
heritage.
- Previous message: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- In reply to: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Next in thread: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Reply: Bassam Abdul-Baki: "Re: CMD vs. BAT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|