Here is a quick and easy Windows tip that can come in pretty handy if you find yourself always wanting to access a specific location on your hard drive using a command prompt. In the following example, I will create a shortcut to a command prompt window that opens using my desktop as the root. This can be handy when you want to work with files that you are using on your desktop (e.g. that you just downloaded from Firefox, etc.)
- Right-click in the open space of your desktop and click “New“> “Shortcut“.
- For the location, type or copy and paste one of the following lines. The first one is standard, while the second one is used in administrator mode.
%windir%\system32\cmd.exe /k cd \Users\YourAccount\Desktop
- Click “Next“.
- For the name, type something descriptive, like “Command Prompt at Desktop” then click “Finish“.
- Now right-click on the new shortcut and choose “Properties“.
- Change the “Start In” field to whatever directory you want the command prompt to start in. In this case, we want it to start in my desktop, so I would type in:
"C:\Users\Mitch\Desktop\" -Be sure to include the quotation marks, and of course you would need to customize this file path to your own system (i.e. replacing “knr” with your own Windows username).
- You can assign a shortcut key if you like, as well as configure other options. If you use this icon in administrator mode, right-click the icon, then select “Shortcut” > “Advanced…“, then check “Run as administrator“). Once you have finished, click “OK“.
(Optional) Click and drag the shortcut that you created onto your Quick Launch toolbar or put it anywhere you prefer so that you can access it quickly.
That’s it! Now, whenever you want a command prompt window at the location that you specified in the shortcut, just click the icon (or use your shortcut key, if you defined one) and you are in business!