Wednesday, July 11, 2007


I had forgotten about doskey and I read about it somewhere recently which jogged my memory. I love setting up aliases to some common directories on Linux, and was looking to do the same on Windows. This is one way not really sure if its the best way.

doskey wa=cd C:\Users\Adnan\Some\Directory

Now when you type wa, you should change to the directory specified.

You can also specify shortcuts to run programs, for instance:

doskey vi=start c:\progra~1\vim\vim71\gvim.exe $*

Now "vi Autoexec.bat" should start up an instance of vi with the Autoexec.bat file open.

Speaking of Autoexec.bat, it doesn't work in Vista. I got around that by editing the shortcut and adding "/k C:\Autoexec.bat".

There is probably a better way to do this by now. If you know of one, leave it in the comments.