Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: Problem: duplicate .BAT and .COM in DOS 3.3 Message-ID: <54@b.gp.cs.cmu.edu> Date: Sun, 28-Jun-87 21:07:40 EDT Article-I.D.: b.54 Posted: Sun Jun 28 21:07:40 1987 Date-Received: Sun, 5-Jul-87 20:15:55 EDT References: <302@ashtate.UUCP> Distribution: world Organization: Carnegie-Mellon University, CS/RI Lines: 25 Keywords: DOS 3.3 BAT batch In article <302@ashtate.UUCP> cy@ashtate.UUCP (Cy Shuster) writes: >In DOS 3.3, if you have FOO.BAT and FOO.COM in the same subdirectory, >the COM program is always executed, even if you type "FOO.BAT" at the >DOS prompt -- or even "CALL FOO.BAT" (didn't try DETACH :-) ). EXEs >also override .BAT. Happens on a PS/2 Mod 30 as well as AT 339. Surely >this isn't a feature? > >--Cy-- ashtate!cy@seismo.CSS.GOV Yep, it's a feature. It's been in DOS since 1.0, and maybe even since QDOS :-) The precedence order is .COM, .EXE, and finally .BAT. You don't expect that DOS can read your mind when you type FOO and decide whether you want FOO.COM, FOO.EXE, or FOO.BAT? :-) (Although I would kind of expect it to use .BAT on a CALL statement). Presumably .COM overrides .EXE because .COM is the final product of a compilation ending with EXE2BIN, and should thus be used in preference to the intermediate .EXE. BTW: any extension you give is simply ignored, thus FOO.XXX will work too. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ARPA: RALF@B.GP.CS.CMU.EDU USnail: Ralf Brown AT&T: (412) 268-3053 (school) Computer Science Department Carnegie-Mellon University DISCLAIMER? Who ever said I claimed anything? Pittsburgh, PA 15213 "I do not fear computers. I fear the lack of them..." -- Isaac Asimov