This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Access '.BAT' executables via $PATH without typing '.BAT'?


At 06:22 PM 2/11/2002, Peter Nann wrote:

>Is there any way to configure Cygwin so that I
>can run DOS/Windows Batch files that are in my $PATH
>without typing the '.bat'?
>
>Eg, If you have a path like $PATH=~/bin
>and you have a file ~/bin/myTool.exe
>
>You can just type at a bash prompt:
>$ myTool
>
>And it will run.
>
>However, if you have ~/bin/myTool.bat you
>cannot type just 'myTool', you must instead
>type 'myTool.bat'.
>
>Why the inconsistency? I'm sure there is a good-ish
>reason, but I thought a flexible implementation
>might see a setting somewhere like:
>$PATH_EXT_ORDER=.exe:.bat:.pl
>
>Is there any way I can make the .BAT files easier
>to access?
>
>P.S. Yes I know about aliases, symlinks, bash command-line
>completion and shell-script alternatives.
>- I just don't want such extra steps each time
>I make a new batch file - I want it as easy as it is under
>DOS/Windows command-line, which shouldn't be too much to
>ask seeing as Cygwin is generally so neat that I just assume
>is going to make my life easier!


Another thing that makes life easier is the Cygwin email archives.
Searching there can find you answers to all sorts of questions like 
these.  It's a good place to start with any issue you have, in addition
to Cygwin documentation.  In this case, the answer is only in the email
archives (you won't find it in other Cygwin documentation).  Although I 
generally loathe to do so, I went and looked up the reference myself
and I'm providing it below:

http://sources.redhat.com/ml/cygwin/2001-01/msg00730.html

While some will probably think I'm of sinister temperament for not always
providing direct pointers to specifics in the email archives, I usually 
avoid doing so only since it serves to hone my search skills and perhaps 
encourages others who query this list to let theirs languish.  I like 
everybody to have the opportunity to develop their search skills! :-)  I 
won't ask everyone to like this personal policy of mine but at least I want 
to be clear to those who read this and would otherwise care to take me to 
task for stating my preference had I not stated the reasoning.

Hope the above pointer helps,




Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]