cmd defaults to F: drive

Use the command

C:

To change to the drive C. It would of course work for any drive letter.


http://blog.stevienova.com/2007/04/08/change-your-default-cmd-prompt-path/

Sometimes, your path when you go to start->run, CMD will be something you don’t want. In active directory or on an NT domain, sometimes your default home path might be a network drive. This isn’t so good when you are offline or drop offline after being online. The CMD prompt is set to a place where you can’t get to.

To change the path, you can edit the registry (at your own risk)

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor] “Autorun”=”c:”

This will change the path to your c: drive.


Very minor nit: if you're using Windows 7 you don't need the cmdhere powertoy, it's built in to Explorer.

You just navigate to a directory in Windows Explorer then hold down the shift key and right click. "Open command window here" is one of the selections on the context menu.

When it comes to opening cmd.exe in a specific directory, I just create a shortcut to cmd.exe and then in the shortcut properties I set "Start in:" to the drive/directory I want it to start in.

Using a shortcut allows me to customize the cmd.exe windows depending on what I'm using it for. For normal file editing/viewing I use a 180x60 window and appropriate font, but when I want to read/search log files I have a shortcut that opens a 260x100 window with a smaller font. That way I can view most long log file lines without having to use the horizontal scroll.

Tags:

Windows

Cmd