Subscribe to How-To Geek

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 .

image

You'll immediately see an Explorer window show up with the contents of the directory your command prompt is in.

image 

If you want to type less characters, you can use the following instead:

start .

image

You can even use the full path to a folder…

explorer c:\some\folder\path

image

Or one of the built-in shell variables…

start %APPDATA%

image

Or the newer shell: operator style:

start shell:startup

image

And you'll see that directory instantly show up:

image

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

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 06/24/08 and tagged with: Windows Vista, Vista Tips & Tweaks, Keyboard Ninja

Daily Email Updates

You can get our how-to articles in your email inbox each day for free. Just enter your email below:


Comments (9)

  1. Daniel Spiewak

    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.

  2. The Geek

    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.

  3. Chabis

    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 :-)

  4. The Geek

    @Chabis:

    You could use the same thing to launch an alternate explorer like xplorer2.

  5. Barron

    Great tip. Is there a way to do this on OS X? The obvious 'finder .' doesn't work.

  6. Isaac

    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!

  7. Scott Wegner

    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,.

  8. Michael Higham

    Great tip! Thanks!

  9. Mark

    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


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.