This is the mail archive of the
mailing list for the Cygwin project.
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
- Date: Wed, 5 Aug 2009 16:24:26 -0400
- Subject: Re: CygWin backslash variable - stores dos based filename with path
- References: <email@example.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
Mark J. Reed <firstname.lastname@example.org>
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple