How to quickly open the current directory from the command prompt? OS - Windows
Asked Answered
C

7

35

There is a need to quickly open the current directory from the command prompt. I know that there is a command 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. Although I am in a different directory.

Whether prompt me please!

Crabstick answered 2/10, 2015 at 11:56 Comment(0)
A
80

You can try:

start .

or

explorer .

. is a shortcut for current directory.

In PowerShell command prompt:

ii .

ii is a shortcut for Invoke-Item.

Agnate answered 2/10, 2015 at 11:58 Comment(2)
This should be the answerDasher
Late 2018 on Win7 Pro, "explorer ." results in error message about 64-bit... But "start ." works!Habsburg
G
20

Use the . to indicate the current directory:

explorer .
Gillman answered 2/10, 2015 at 11:58 Comment(0)
A
11

To add to the answers above (tested on Windows 10 and 11)

Open current directory

explorer .
explorer ...
explorer ....
explorer .......
explorer %cd%

start . 
start ...
start ....
start ........
start %cd%

Open the subfolder of the current directory

start .\subfolder
explorer .\subfolder

Open the parent directory of the current directory

explorer ..
start ..

Navigate to another folder from the parent directory

start ..\another-folder
explorer ..\another-folder
Antecedency answered 31/12, 2018 at 11:16 Comment(0)
U
2

Easiest

  • Press CTRL+L
  • type cmd, press enter
Urfa answered 25/8, 2022 at 17:38 Comment(0)
E
1

Create a batch file (eg. c:\somepath\q.bat) with this line:

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.

Erlanger answered 2/10, 2015 at 12:19 Comment(0)
C
0

just append cmd in the beginning of the address bar in windows.

for eg: if you're at [C:\foo\bar] just type cmd [cmd C:\foo\bar] and hit enter. this will open a terminal at C:\foo\bar for you.

Christner answered 11/8, 2022 at 10:3 Comment(1)
The question wasn't about opening a command prompt, but about opening Windows Explorer.Jollanta
C
0

You can do like this:

  1. Open the desired folder
  2. Press [CTRL+L] or click on the url bar (the current path will be highlited)
  3. Type 'cmd' into the url bar and press enter

A little img containing the explanation

Camlet answered 31/3, 2023 at 8:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.