Skip to main content
Summary of attempts
Source Link
oz1cz
  • 5.9k
  • 8
  • 40
  • 60

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

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?

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

Source Link
oz1cz
  • 5.9k
  • 8
  • 40
  • 60

Combining bash and CMD in Linux under Windows 10

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?