X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0	tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,MIME_CHARSET_FARAWAY,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CA+nJC94ufjA2HZFAAohySp1iMSzERSuzQMgFDY=4b7CU9WSBJQ@mail.gmail.com>
References: <CA+nJC94ufjA2HZFAAohySp1iMSzERSuzQMgFDY=4b7CU9WSBJQ@mail.gmail.com>
Date: Mon, 13 Aug 2012 21:25:38 -0400
Message-ID: <CAM7SfR1kBNTf3BKFjXNV+1mvct=r7D_OvLvzCdDd1sfPbbrhfg@mail.gmail.com>
Subject: Re: Cannot pass space arguments to BATs contains spaces.
From: Sean Daley <spdaley@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=GB2312
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
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q7E1PwCK028874

On Mon, Aug 13, 2012 at 8:41 PM, Atry <> wrote:
> I execute following command in bash:
>
> echo 'echo %1' > 'hello world.bat'
> chmod +x 'hello world.bat'
> './hello world.bat' 'There are some spaces.'
>
> And I got:
>
> 'C:\Users\Atry\hello' 不是内部或外部命令，也不是可运行的程序
> 或批处理文件。

There's a thread from about 8 years ago which goes over quite a few
issues with .bat files, spaces, and Cygwin.  Though, eventually someone
extrapolated a way to pull Cygwin out of the equation and show that
even cmd could be broken pretty badly under some circumstances.

Check out:
http://cygwin.com/ml/cygwin/2004-09/msg00081.html
for more information and to see if it might cover what you're running
into now.  That's the initial question, just read through some of
the child responses to get more information.

Sean

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


