Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open containing directory in Windows Explorer from IntelliJ

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?

like image 693
ripper234 Avatar asked Oct 25 '09 12:10

ripper234


People also ask

How do I open a folder in IntelliJ?

Launch IntelliJ IDEA. If the Welcome screen opens, click Open. Otherwise, from the main menu, select File | Open. In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open.

How do I change the default directory in IntelliJ?

Change the default location for projectsIn the Settings/Preferences dialog ( Ctrl+Alt+S ), select Appearance & Behavior | System Settings. In the Default project directory field, specify the path to the folder in which you want to store your projects. Apply the changes and close the dialog.


2 Answers

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.

like image 102
Valya Avatar answered Sep 22 '22 01:09

Valya


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

like image 38
Simon B Avatar answered Sep 26 '22 01:09

Simon B