cdiggins.com

May 31, 2007

Neat Trick: Opening a command shell in a frequently used directory

Filed under: Everything — cdiggins @ 10:12 pm

I frequently find myself using the command shell in directories with long-names. To avoid the hassle of opening the command prompt from the start menu and typing in the path, instead I place a “launch_shell.bat” script in my frequently used directories. This file contains one line:

cmd.exe \k

2 Comments »

  1. Better yet, just add a context menu option in Explorer:

    1) Open a windows explorer (not internet explorer, but the file system viewer)
    2) Goto “Tools | Folder Options… | File Types”
    3) Find the entry for “Folder”
    4) Click the “Advanced” button
    5) Click the “New…” button
    6) Enter a name for the action (I usually call it “cmd”)
    7) Click “Browse…” and select cmd.exe (which is in %WINDIR%/System32 I believe)
    8) Then click “Ok”

    You now how a command that appears on the context menu for directories in windows explorer (it doesn’t show up on non-directory files).
    NOTE: if you use it on a directory icon on the left side “Folders” pane, it takes you to that directory, if you use it on the right side pane, it takes you to the directory above the directory icon you use it on.

    Comment by petritis — June 1, 2007 @ 4:42 pm

  2. I suspected there was a better way, thank you for sharing that technique!

    Comment by cdiggins — June 2, 2007 @ 4:58 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress