Start Command Prompt in Another Drive’s Folder on Windows 7

Create a shortcut to cmd.exe by opening your start menu, and typing “cmd” into the search bar. Right click on either “cmd.exe” or “cmd.exe (admin)”, and open the properties of the shortcut.
On the “Shortcut” tab, edit the Target;

C:\Windows\System32\cmd.exe /k "e: & cd e:\Vagrant"

In this case, I want to start the command prompt in the Vagrant folder located on the E drive.

You may have noticed the “Start in:” field in that Shortcut tab. Well, I wish that worked in this case, but since the target is on another drive, Windows 7 doesn’t let us use it.

If you’re wondering what’s going:
/k allows us to pass some commands to the Command Prompt
The ampersand (&) lets us chain commands, which takes us to the E drive, then the Vagrant folder

Leave a Reply

Your email address will not be published.