Monday, March 12, 2012

Fast way to Change the Directory Path in a Console Window

I have been aware of this trick for over a year now, but I haven't shared it until now because of my legendary procrastination when it comes to blogging.  If you open a command prompt the usual way this is what you get:

clip_image002

Notice the path defaults to my users folder? So in order to change it I have to enter a command like this: cd C:\ which will change the path to the root C:\ folder. I have learned a better way than doing the cd command to get to arbitrary folders.
If you click on your arbitrary folder, then hold down the Shift key and right click you will see this menu come up:

clip_image004

Notice there is a choice to “Open a Command Window Here?”
Clicking this menu item will give you this:

clip_image006

Woo hoo! No cd command nonsense!

One other thing, you may need to have your command window open with administrator privileges.  here is a link that explains how you can make that happen automatically:

Setting Command Window to Open in Administrator Mode

3 comments:

  1. One trick I've been using for a while is that once you are in a command window, you can use the {Tab} key to avoid typing an entire folder or file name.
    For instance, from c:\>, type cd W{Tab}, then the first folder name starting with "W" will appear:
    c:\>cd Windows
    If there's more than one folder starting with "W," just keep pressing {Tab} to find the one you want.
    This works for file names too, and automatically adds double quotes around filenames containing spaces. :)

    ReplyDelete
  2. Good one! I didn't know you could do that. Thanks for sharing it!

    Bob

    ReplyDelete
  3. Sure! Didn't mean to be anonymous, by the way...

    ReplyDelete