Windows Hack: Open an explorer from the command line

With the WinXP Power Toys, you can open a command window at any directory you want.

For instance, if you are deep within the tree of directories and sub-directories and you decided you need to execute something on the command line, right at that directory, all you need to do is right click and say ‘Open Command Window Here’. You get a command window and the current working directory would be the directory on which you right clicked. Nifty, huh?

What if you want the other way around? Say, you are using the command window and you are currently in the directory
C:\Documents and Settings\Administrator\My Documents\My Music and you want to open a window at this location?

Simple. Type the following:

c:\>start .

The dot is for the current directory.

If you are a cygwin user, then stick this statement in your bash_profile or bashrc file.

alias start=”cmd /c start”

and then start away.

cygwin>start .

This ‘start’ comes handy at times. If you have a pdf file which you want to open, type ‘start filename.pdf’ and it opens in your PDF reader.

Bottom line is, ‘start’ is like double-clicking on an icon. You can do a lot of things with it. Try it, it’s addictive.


2 thoughts on “Windows Hack: Open an explorer from the command line

  1. Anon says:

    “explorer .” also works just aswell 🙂

  2. Athul Acharya says:

    For cygwin users, the following might be a useful addition to one’s .bashrc:

    function open() {
    explorer `cygpath -aw $1` &

    This way you can do things like “open ~” and “open ${HOME}/doc/something.doc” and it will still work. You can, of course, replace ‘open’ with ‘start’ if you prefer; I chose open because I’m used to it in OSX 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: