While using cmd for compiling and running programs of <Insert favourite programming-language here>, it sometimes becomes tiresome to switch to the directory where you saved the source file. Worse yet,if you close the command prompt accidentally , you have to repeat the process again.
Fortunately,there's a registry-hack to set the default directory whenever you open you cmd.Here are the steps.
Fortunately,there's a registry-hack to set the default directory whenever you open you cmd.Here are the steps.
- Press Windows Key + R(Or Start=>Run).
- Type "regedit".
- From the menus in the left pane, navigate to
HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Command Processor - If it does not already exist,Right click on any empty area on the right pane, click New => String value.Name it as "Autorun".
- Now suppose you want to set the default directory to D:\Java , you can double click the autorun string,and in the value field type
CD /d D:\Java
No comments:
Post a Comment