X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <4E739D87.4060806@gmail.com> Date: Fri, 16 Sep 2011 13:03:35 -0600 From: "J.V." User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: how to run a .bat or .cmd file from bash prompt Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 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