www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/12/12:48:52

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Thorsten Kampe <thorsten AT thorstenkampe DOT de>
Subject: Re: Bash fails to run .bat file with spaces in pathname and argument
Date: Thu, 12 Oct 2006 17:45:58 +0100
Lines: 16
Message-ID: <eglrg5$q38$1@sea.gmane.org>
References: <452D5DF0 DOT 9070605 AT cs DOT berkeley DOT edu>
Mime-Version: 1.0
User-Agent: MicroPlanet-Gravity/2.70.2067
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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

* 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019