I'm using the Linux subsystem under Windows 10.
If I have, for example, a PowerPoint file called x.pptx
, I can request the Linux bash shell to request Windows to open the file with the default application. The following command will do the trick:
/mnt/c/Windows/System32/cmd.exe /C start x.pptx
But if the file name contains a space (for example, x y.pptx
) I can't get it to work. I think I have tried every possible combination of single quotes, double quotes and backslashes.
Is what I want to do even possible?
EDIT
Here are my attempts:
Using x\ y.pptx
or "x y.pptx"
or 'x y.pptx'
or \"x y.pptx\"
simply causes the CMD window to open.
Using '"x y.pptx"'
causes Windows to say that it cannot find y.pptx\
(the missing x and the backslash are not typos).
Using '\"x y.pptx\"'
causes Windows to say that it cannot find y.pptx\\\
(sic).
x y...
in current working directory? start has also /D option to specify directoryx y.pptx
is in the current working directory. Adding the /D option doesn't seem to help.start
commands in cmd shows the same result using title seems to be a workaround