X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.2 required=5.0	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
CC: "cygwin@cygwin.com" <cygwin@cygwin.com>
Message-ID: <C728FB0E-00ED-42FE-AED8-9B06575F346E@creativegroup.tv>
From: Robert Perlberg <perl@creativegroup.tv>
To: "J.V." <jvsrvcs@gmail.com>
In-Reply-To: <4E739D87.4060806@gmail.com>
Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0 (Apple Message framework v936)
Subject: Re: how to run a .bat or .cmd file from bash prompt
Date: Fri, 16 Sep 2011 15:10:38 -0400
References: <4E739D87.4060806@gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

cmd /c batch_file [arguments ...]

This is such an original idea.  I wish the Unix shell had something  
like that.

-c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c -c - 
c -c -c -c -c -c -c -c -c

On Sep 16, 2011, at 3:03 PM, J.V. wrote:

To run a .bat or .cmd file, I can do this:
     $cmd

     C:>mybat.bat or C:\>mycmd.cmd

In other words, I have to type two commands (one to get to the shell,
and another to run the .bat or .cmd file).

What I want is to write a shell script (bash), that will cd to a
directory, enter the dos cmd prompt and execute a .bat file and then
return to my bash shell.

I do not know if this is possible, have tried many things, but nothing
works.

thanks

J.V.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

