windows 使用 cd 命令浏览程序 x86 和一些路径问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30262784/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:03:47  来源:igfitidea点击:

using cd command to navigate through Program x86 and some pathing problems

windowspowershell

提问by Lem

I'm trying to get into a file using

我正在尝试使用

cd Program Files (x86)\Google\google_appengine

starting from the C:// folder.

从 C:// 文件夹开始。

I tried googling around and I keep getting things along the lines of

我试着用谷歌搜索,我一直在按照

${Env:ProgramFiles(x86)}

or to use a dir command. But it doesn't lead me to google_appengine. It just displays my file. I'm pretty sure I just don't know what words to google since I'm new and wondering if someone could help me.

或使用 dir 命令。但这并没有引导我使用 google_appengine。它只显示我的文件。我很确定我只是不知道用什么词来谷歌,因为我是新手,想知道是否有人可以帮助我。

回答by Bill_Stewart

PowerShell uses the Tabkey for directory completion. So if you type

PowerShell 使用Tab密钥完成目录。所以如果你输入

cd C:\Program

Then press Tabkey to cycle through names, you will see how PowerShell adds quote marks around the directory name. If you don't quote the directory name, the cdcommand (which is an alias for Set-Location) won't know that the arguments after the command are a single path name. The quotes tell PowerShell that the stuff in between the quotes is a single argument instead of multiple arguments.

然后按Tab键循环浏览名称,您将看到 PowerShell 如何在目录名称周围添加引号。如果您不引用目录名称,则该cd命令(它是 的别名Set-Location)将不知道该命令后面的参数是单个路径名。引号告诉 PowerShell,引号之间的内容是单个参数而不是多个参数。