简体   繁体   English

如何从命令提示符快速打开当前目录? 操作系统 - Windows

[英]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 . iiInvoke-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 为您打开一个终端。

  • Press CTRL+LCTRL+L
  • type cmd , press enter输入cmd ,按回车

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在VIM中打开Windows命令提示符到活动文件的当前目录? - How do I open the windows command prompt to the current directory of the active file in VIM? 如何从命令提示符打开目录中的所有文件 - How to open all files in a directory from command prompt 相当于Windows中的“转到文件夹窗口”,以访问位于当前目录其他位置的Windows打开提示中的文件? - equivalent of "Go to Folder window" in windows, to access a file in a windows open prompt located somewhere else from the current directory? 从命令提示符显示 bash 目录 windows - Show bash directory from command prompt windows 打开命令提示符窗口并更改当前工作目录 - open command prompt window and change current working directory Windows命令提示符从某个目录开始 - Windows command prompt start from certain directory Sublime Text 2-在当前目录或项目目录中打开CMD提示(Windows) - Sublime Text 2 - Open CMD prompt at current or project directory (Windows) 如何在Windows中打开以“ shell>”开头的命令提示符? - How to open command prompt starting with “shell>” in windows? Windows命令提示符-空目录 - Windows Command Prompt — Empty Directory 如何仅使用命令提示符在 windows 操作系统上安装任何软件? - How to install any software on windows os using command prompt ONLY?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM