www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/05/16:24:46

X-Recipient: archive-cygwin AT delorie DOT 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 DOT 21d7720a DOT 78e4 DOT 60fc AT mx DOT google DOT 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 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

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 AT gmail DOT 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

- Raw text -


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