delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/11/13:25:10

Date: Fri, 11 May 2001 20:25:43 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: tim DOT van DOT holder AT pandora DOT be
Message-Id: <3395-Fri11May2001202542+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com, snowball3 AT bigfoot DOT com
In-reply-to: <CAEGKOHJKAAFPKOCLHDIIEDICDAA.tim.van.holder@pandora.be>
Subject: Re: spawn* and LFN again
References: <CAEGKOHJKAAFPKOCLHDIIEDICDAA DOT tim DOT van DOT holder AT pandora DOT be>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Fri, 11 May 2001 18:26:57 +0200
> > > 
> > > >lfnexe.bat
> > > Bad command or file name
> I think you would get the same for lfnexe.exe if only lfnexe.exe.exe
> exists.

Yes, it seems that COMMAND.COM doesn't try an extension if what you
type already has an extension (any extension).  This makes sense on
plain DOS, where there can be only one dot, but not under LFN.

> > Then I think spawn*'s logic is better.  It doesn't make sense, IMHO,
> > to find a program lfnexe.foo.exe, but fail to find lfnexe.foo.  If I
> > replace the first dot with something else, as in lfnexe_foo, then both
> > lfnexe_foo and lfnexe_foo.exe work.  That is, COMMAND.COM (at least on
> lfnexe.foo.exe would actually work; (for example, for hello.world.exe,
> both 'hello.world' and 'hello.world.exe' run the executable).

Not for me, it doesn't: I just tried (on Windows 98).  If I type
"hello.world [Enter]", it says "Bad command or file name".  Only
hello.world.exe works.

You did try it from COMMAND.COM, yes?

> Basically, if I ask spawn to run <foo>, I expect it to run <foo> if it
> exists, and try <foo>.exe if it doesn't

That's not what COMMAND.COM does.  Try typing "foo" in a directory
where both `foo' and `foo.exe' exist, and see who gets called.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019