Open containing directory in Windows Explorer from IntelliJ
Asked Answered
E

9

16

Is there a way (keyboard shortcut?) to open the folder of the currently opened file in Windows Explorer?

What I mean is this: When a java source file is open in IntelliJ, I'd like to open Windows Explorer on the folder containing that file. Is there a short way of doing that?

Edgeworth answered 25/10, 2009 at 12:7 Comment(1)
Sorry, but I don't understand this questionDramaturge
C
20

Just padding out Peter Lawrey's answer, for Intellij 12.n on Windows 7 the steps for adding explorer as an external program would be:

  1. File > Settings > External Tools
  2. Click on the Plus (+) in the
  3. Name: Open Containing Folder
  4. Group: [select group]
  5. Description: Open Containing Folder
  6. Unselect "Open Console"
  7. Program: explorer [or] C:\Windows\System32\explorer.exe
  8. Parameters: $FileDir$
  9. Working Directory: [leave blank]
  10. Click OK

You can then add the External Tool as a keyed short cut through File > Settings > Keymap

Right clicking on a source file External Tools->Open Containing Folder is another way to use this tool. enter image description here

Caret answered 27/9, 2013 at 13:54 Comment(2)
For Windows10, Explorer is located at C:\windows\explorer.exeBrassie
Works great, just wanted to mention that the keymap settings option really is "External Tool", and then it lets you choose the open folder one in particular.Cyclopedia
M
9

As of version 2016.2 you can press Alt+F1 while in the editor and navigate to different view. Choose "Show in file manager". You can even navigate to a corresponding pom.xml from Maven view. Powerful, indeed.

Mockery answered 24/1, 2017 at 4:12 Comment(0)
F
2

You can try one of these plugins:

  • "OpenContainingFolder"
  • "Open containing folder in a File Explorer"
Freda answered 4/11, 2009 at 15:17 Comment(2)
not that I really expected it, but they don't seem to exist anymore in 2023.Dendritic
OpenContainingFolder exists but doesn't work on ubuntu (and an error on startup)Cyclopedia
M
2

Just wanted to add to Simon B's answer that based on this article for selecting the file in addition to opening its parent folder in step 8 change "$FileDir$" to "/select, $FilePath$"

Mathison answered 17/2, 2014 at 13:47 Comment(0)
S
2

This help page provides an easier way of doing this in later versions of IntelliJ as follows:-

  1. Hold down CTRL and then left-click the mouse on the tab containing the source code (i.e. the actual tab part at the top).
  2. This will display a folder hierarchy with the filename at the top: To open the folder the file is in, click on the the filename.
Submiss answered 13/4, 2018 at 9:24 Comment(0)
M
1

You can add explorer as an external program and add a hot key for that. i.e. you will be able to select a directory or file and the same opens in windows explorer.

Management answered 25/10, 2009 at 13:41 Comment(0)
A
1

Use Open In contextual menu option

enter image description here

Argot answered 14/12, 2020 at 16:48 Comment(0)
A
0

Windows 10: use "C:\Windows\explorer.exe" instead. (#7 Program:)

Affined answered 1/3, 2019 at 1:18 Comment(0)
T
0

You can assign a keyboard shortcut via setting/keymap. See the image below. Select a folder/sub-folder from the project directory tree and key in the shortcut.

enter image description here

Tavern answered 10/8, 2021 at 16:57 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.