X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4a79e7dd.21d7720a.78e4.60fc@mx.google.com>
References: <4a79e7dd.21d7720a.78e4.60fc@mx.google.com>
Date: Wed, 5 Aug 2009 16:24:26 -0400
Message-ID: <f60fe000908051324o65664abai9e0c1d110354d341@mail.gmail.com>
Subject: Re: CygWin backslash variable - stores dos based filename with path
From: "Mark J. Reed" <markjreed@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
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

On Wed, Aug 5, 2009 at 4:13 PM, Rajesh George wrote:
> "e:\test\testcomn\util\jre\1.1.8\bin\jre.exe" become
> "e:testtestcomnutiljre1.1.8binjre.exe" and I got "command not found" error.
> In this case, am not allowed to edit the any bat/sh files. But I can modify
> the CygWin settings.

Well, we'd need to see the bat file to be sure, but chances are you're
out of luck.  I'm guessing it's doing something like

bash -c "somecommand c:\some\path\here"

then there's nothing you can do - by the time somecommand sees the
pathname, the backslashes are gone. and there's no way it can figure
out where they went.

You don't  have to change them to forward slashes, you just need to quote them:

bash -c "somecommand 'c:\some\path\here'"

But if you can't change the batch file, then I can't think of any
workarounds.  Maybe someone else can... but I don't know why you'd
have batch files calling Cygwin commands that can't be modified to use
Cygwin conventions.


-- 
Mark J. Reed <markjreed@gmail.com>

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

