Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Apparently-From: <earnie?boyd@yahoo.com>
Message-ID: <3A634686.A775FD84@yahoo.com>
Date: Mon, 15 Jan 2001 13:50:46 -0500
From: Earnie Boyd <earnie_boyd@yahoo.com>
Reply-To: Earnie Boyd <cygwin@cygwin.com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
CC: Michael Yorg <myorg@extensity.com>,
        "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Re: Running .bat files from CYGWIN
References: <4.3.1.2.20010115124313.023299b8@pop.ma.ultranet.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 12:43 PM 1/15/2001, Michael Yorg wrote:
> >I have read that CYGWIN supports running DOS .bat files but the shell seems
> >the think that they aren't executable.  The exact error is, 'command not
> >found'.  I've used chmod to give the file executable status and it still
> >won't work.  Someone recommended running the .bat file from within a shell
> >script and that didn't seem to work either.  What am I doing wrong?
> 
> Check the mail list archive for discussions on this.  You should be able to
> execute batch files by invoking the command interpreter (i.e. "cmd /c b.bat"
> on NT/W2K).  sh (ash) or bash won't know what to do with these files
> otherwise, even if it did read them...
> 

Create a noop program named #!.exe and put it in command.com/cmd.exe
PATH.
Then at the top of your .bat file put
  #! c:\\path\\to\\cmd.exe /c
and this will cause Cygwin to think it's executable and execute it.

Cheers,
Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

