If you’re using Windows for scripting, development, hackery or the like, you probably want to use the good old Windows command line now and then, or even quite frequently.
This tip allows you to create a portable shortcut that you can drag to any directory and it’ll automatically use the directory it’s in as its working directory.
- Create a new shortcut to cmd.exe
(e.g. by right-clicking on the Desktop and picking ‘New > Shortcut…’). - Right-click the shortcut and go to Properties.
- In the ‘Start In…’ field, type:
%1 - Enter / OK everything.
You can now drag & drop or copy this shortcut to any directory and it will always open with the current directory as its working directory. This saves you having to type it in or always cd away from c:\windows\system32.
It’s also pretty handy if, like me, you have a shortcut to cmd.exe in a Dropbox folder that is synched between two different computers with the Dropbox folder in different places! In fact, it’s ideal!













