Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: From: "Buchbinder, Barry (NIH/NIAID)" To: cygwin AT cygwin DOT com Subject: RE: running .bat files from bash Date: Wed, 15 Dec 2004 16:21:03 -0500 MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes At Wednesday, December 15, 2004 3:10 PM, Donal Murtagh wrote: > Hi, > > I've noticed that if I want to run a .bat file in bash I have to cd > to the > directory it's in first in order for it to run properly > > For example, if I want to run c:\foo\bar.bat I have to use: > > cd /cygdrive/c/foo > bar.bat > > if I try > > /cygdrive/c/foo/bar.bat > > it doesn't work properly. It seems that if I attempt the latter, the > .bat file > is launched, but doesn't work properly. The particular .bat file I'm > running > compiles a Java source tree, and when I try to launch it via > /cygdrive/c/foo/bar.bat, the messages sent to standard output suggest > it's > working fine, but none of the .class files are created. > > Has anyone else come across this? > > Cheers, > - Donal You could try launching it with `cygpath -u $COMSPEC` /c `cygpath -d /cygdrive/c/foo/bar.bat` -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/