Stupid Geek Tricks: Open an Explorer Window from the Command Prompt's Current Directory
Have you ever done something on your computer without really thinking about it, but the person next to you has a surprised and confused look on their face? If so, then you might have performed a Stupid Geek Trick. Today we'll show how to open an Explorer window from the current command prompt directory.
Let's begin… just open up a command prompt and then type in the following (the . passes the current directory to Explorer)
explorer .
You'll immediately see an Explorer window show up with the contents of the directory your command prompt is in.
If you want to type less characters, you can use the following instead:
start .
You can even use the full path to a folder…
explorer c:\some\folder\path
Or one of the built-in shell variables…
start %APPDATA%
Or the newer shell: operator style:
start shell:startup
And you'll see that directory instantly show up:

And finally, don't forget that you can also use most of these techniques from the File Open/Save Dialog.


I'm not sure this counts as a stupid geek trick; I do this *all* the time. It's particularly useful when I've been futzing around with some CL-only utility (like Ant) in a certain directory and want to get the results. I also use it a lot from the jEdit console pane to open up a more powerful file manager than its built-in support.
It's worth noting that `explorer .` probably doesn't behave the way you would want it to, it just happens to work because the Windows shell cheats in its kernel integration. The more general form appends an ampersand: `explorer . &` This is required in shells like jEdit to ensure that the shell itself doesn't block forever, it just launches the appropriate window.
But you do all the time precisely because you Are a geek
I've found that a surprising number of people don't know about it, which is why I wrote it up… it's definitely not anything extraordinary, most of my stupid geek tricks aren't.
That's really a geek trick! Love it! As I not often use the Explorer (found a better alternative) I never saw that trick. Keep geeking
@Chabis:
You could use the same thing to launch an alternate explorer like xplorer2.
Great tip. Is there a way to do this on OS X? The obvious 'finder .' doesn't work.
Actually this is something that I've been curious about how to do for a long time and never invested the time it took to find a solution. You just delivered that solution to me without me having to do the work.
Thank you - and keep the tricks coming!
There are a few undocumented switches to the explorer command as well. For example, to open a folders view, use the /e switch:
explorer /e
to use this along with a path, separate them with a comma. For example, to see a folders view of the current directory:
explorer /e,.
Great tip! Thanks!
Another thing you can do is use a switch like '/e' which tells explorer to open up using its "full" mode (I forget the correct term), eg explorer /e,C:\Windows