[Wine] WINE fails in directories with Question Marks in name
Martin Gregorie
martin at gregorie.org
Mon Sep 12 18:14:48 CDT 2011
On Mon, 2011-09-12 at 16:58 -0500, stvs wrote:
> > You can escape a character to remove its special properties or
> > enclose the string containing it in single quotes.
>
>
> Great, but how do I do that when I'm in a DIRECTORY that contains a special character? This is how this problem arises: there is a directory called 'foo?' in which there is the file bar.mpg. This fails:
>
> $ cd 'foo?'
> $ wine cmd.exe bar.mpg
>
> WINE is unable to operate within the directory named 'foo?'. There is
> no way for me to escape the directory's name in the (scripted) call to
> wine.
>
Try this (tested, saved as xtest and made executable):
<code>
#!/bin/bash
y=$(echo "$1" | sed -e 's/\?/\\?/')
echo "y=$y"
</code>
$ xtest foo?
y=foo\?
so the following should work too:
#!/bin/bash
y=$(echo "$1" | sed -e 's/\?/\\?/')
cd "$y"
wine cmd.exe bar.mpg
Martin
More information about the wine-users
mailing list