Hi Friends, today in this post I will show you how to change the command prompt default directory. So why would someone change the command prompt default directory. Well there may be various reason to do that but in my case I am using command prompt for my sass compiler. So every time I have to set to watch a new project I have to navigate command prompt default directory to my project directory which is from c drive(default) to my d drive (project drive). Well you can easily change the default directory of command prompt by following these simple steps.
- Open your registry editor by typing “regedit” in the start menu search box and then clicking on the link up top.
- Navigate to the following path
HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processorand search for the string “Autorun” in the left window. If the string doesn’t exit, you can create a new one with the name “Autorun”. Simply click the mouse right button on white screen on the right side and click “new”.
- Double-click it afterwards and add the new directory path in the following way:
CD /d C:\
- Set the path to your own desire:
CD /d D:\project
- Close the registry editor, and then open the new command prompt to check your work.
Well you see now, you easily change the command prompt default directory to your favorite one. Thanks for reading.