flow.
"Flow is a condition of deep, nearly meditative involvement." - Tom DeMarco

Opening the Current Directory From the Command Line

Monday, November 24, 2008 1:47 PM

Given my aversion to mice (the peripheral, not the mammal) I generally try to favor command line whenever possible.  However, I still sometimes find myself dropping into an explorer window to do things that would be inefficient at the command prompt.  Adding or removing multiple files to or from a Subversion repository comes to mind, as an example.

In these cases I always lost precious seconds opening the explorer window and then manually navigating back to where I was at the command prompt.  However, today I remembered that Explorer.exe accepts command arguments, and that '.' is apparently the universal symbol for 'current directory'.  Therefore, typing the following command at the command prompt immediately opens an explorer window on the directory that you're currently in.

commandPrompt

Hope this saves you a few seconds, too.


Feedback

# re: Opening the Current Directory From the Command Line

Or use start . to save a couple of characters and always launch the correct shell :)

The equivalent on Mac OS X is open . if you ever find yourself there.

[)amien 11/24/2008 4:08 PM | Damien Guard

# re: Opening the Current Directory From the Command Line

Hmm...well what do you know :) I didn't realize you could do that.

Thanks for the tip, Damien! 11/24/2008 4:24 PM | Jeremy

# re: Opening the Current Directory From the Command Line

Slightly faster to type, but in the same vein is:

start .

Works just like that. 11/25/2008 5:02 PM | Steve Donie

# re: Opening the Current Directory From the Command Line

this would work as well:

explorer %CD%

not as easy, but still sufficient. 12/1/2008 11:42 AM | Rob Chartier

Post a comment





 

Please add 8 and 1 and type the answer here: