X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_YG X-Spam-Check-By: sourceware.org Message-ID: <4E4C25C4.50805@cs.umass.edu> Date: Wed, 17 Aug 2011 16:34:12 -0400 From: Eliot Moss Reply-To: moss AT cs DOT umass DOT edu User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: how to get into dos mode & run .bat or .cmd file References: <4E4C23E9 DOT 3090509 AT gmail DOT com> In-Reply-To: <4E4C23E9.3090509@gmail.com> 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 On 8/17/2011 4:26 PM, J.V. wrote: > I want a bash / shell script that I can run that will go into dos mode, and from there run a .bat or > a .cmd script automatically. > > After much googl'ing and experimenting, I cannot quite get it to run a dos shell and run a .bat or > .cmd. > > any help would be appreciated. If you have a .bat file named foo.bat, then you can run simply by: foo.bat from a bash command line or shell script file. You can pass arguments as well. There is no automatic conversion between Windows and cygwin/Unix-style paths, so you may find the cygpath utility helpful. I am not sure what "going into dos mode" would mean, but you can also run cmd.exe from the command line by typing: cmd In the case of both cmd and foo.bat, their directories need to be in your search path, or else offered explicitly. Best wishes -- Eliot Moss -- 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