[英]How to quickly open the current directory from the command prompt? OS - Windows
There is a need to quickly open the current directory from the command prompt.需要从命令提示符快速打开当前目录。 I know that there is a command explorer
.我知道有一个命令explorer
器。
But to enter the full path to the directory is very inconvenient.但是要输入目录的完整路径是很不方便的。
For example:例如:
exoplorer c:\progra~1\nodejs~1\worskp~1\project\module\convert
It works.有用。 But is that the faster you can open the folder with the mouse... I think it's not right.但是是不是越快就可以用鼠标打开文件夹了……我觉得不对。
And this command:这个命令:
explorer cd.
Opens My Documents
.打开My Documents
。 Although I am in a different directory.虽然我在不同的目录中。
Whether prompt me please!是否请提示我!
You can try:你可以试试:
start .
or或者
explorer .
.
is a shortcut for current directory.是当前目录的快捷方式。
In PowerShell command prompt:在 PowerShell 命令提示符中:
ii .
ii
is a shortcut for Invoke-Item
. ii
是Invoke-Item
的快捷方式。
Use the .
使用.
to indicate the current directory:指示当前目录:
explorer .
Just to add to the answers above (tested on windows 10)只是为了添加上面的答案(在 Windows 10 上测试)
Open current directory打开当前目录
explorer .
explorer ...
explorer ....
explorer .......
start .
start ...
start ....
start ........
Open subfolder of current directory打开当前目录的子文件夹
start .\subfolder
explorer .\subfolder
Open the parent directory of current directory打开当前目录的父目录
explorer ..
start ..
Navigate to another folder from the parent directory从父目录导航到另一个文件夹
start ..\another-folder
explorer ..\another-folder
Create a batch file (eg. c:\\somepath\\q.bat) with this line:使用以下行创建一个批处理文件(例如 c:\\somepath\\q.bat):
explorer .
Add it to your path (example shown will only work in the current console, add it to your System Properties->Advanced->Environment Variables to make it work anywhere):将它添加到您的路径(显示的示例仅适用于当前控制台,将其添加到您的系统属性->高级->环境变量以使其在任何地方都可以使用):
set PATH=%PATH%;c:\somepath
Then open a command window and type然后打开一个命令窗口并输入
q
Then it should open the fastest way.那么它应该以最快的方式打开。
just append cmd in the beginning of the address bar in windows.只是 append cmd 在 windows 的地址栏开头。
for eg: if you're at [C:\foo\bar] just type cmd [cmd C:\foo\bar] and hit enter.例如:如果您在 [C:\foo\bar],只需输入 cmd [cmd C:\foo\bar] 并回车即可。 this will open a terminal at C:\foo\bar for you.这将在 C:\foo\bar 为您打开一个终端。
cmd
, press enter输入cmd
,按回车
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.