H:\>"H:\Program Files\R\R-3.4.0beta\bin\R.exe"
'H:\Program' is not recognized as an internal or external command,
operable program or batch file.
H:\>"H:\Progra~1\R\R-3.4.0beta\bin\R.exe"
The system cannot find the path specified.
H:\>H:\Progra~1\R\R-3.4.0beta\bin\R.exe
The system cannot find the path specified.
我尝试使用 "
..."
和 Progra~1
,但两者都无法在 Windows 10 上运行。
我做错了什么?
最佳答案
简答:使用 & 'C:\path with spaces\app.exe'
说明:只需在 powershell 中输入您的路径,并在您选择任何包含空格的目录时使用 TAB
自动完成。 Powershell 将自动插入单引号 'bla bla'
并且它还会在前面放置一个 &
,这是将字符串视为需要的东西应该被执行。像往常一样继续完成您的路径。
关于windows - 如何在 Windows 10 的命令行中运行路径中包含空格的可执行文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43510438/