X-Spam-Check-By: sourceware.org Message-ID: <452EA571.3010509@cs.berkeley.edu> Date: Thu, 12 Oct 2006 13:28:33 -0700 From: Johnathon Jamison User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Bash fails to run .bat file with spaces in pathname and argument References: <452D5DF0 DOT 9070605 AT cs DOT berkeley DOT edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Note-from-DJ: This may be spam That is strange quoting syntax, with carets, but it works. I wonder why the last caret is needed, which does seem to be required. Thank you for giving this to me, since I had not seen this example. None of the solutions using cmd are great, because it can be hard to explain such things to customers. Johnathon Thorsten Kampe wrote: > * Johnathon Jamison (Wed, 11 Oct 2006 14:11:12 -0700) >> I am having some funny behavior. If I have a .bat file that is in a >> directory whose pathname contains a space, and an argument is given to >> the .bat file that has a space in it, then the .bat file fails to run. >> Instead, I get "'xxx' is not recognized as an internal or external >> command, operable program or batch file." where xxx is the portion of >> the complete path to the .bat file before the first space. >> >> I am not sure why this is occurring. Any help would be appreciated. I >> have more specific information and a sample run below. If I have left >> anything out, just ask. In particular, I am not sure which version >> numbers would be needed, or where to find (many of) them. > > Try escaping the spaces and some of the quotes. wfm in the other test > case mentioned: > cmd /c "F:\tmp\dir^ with^ space\test.bat^" "Hello, world." > -- 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/