Windows – create a shortcut to a Windows directory

command lineshortcutswindows

I would like a quick command line-based way to get to a directory I use all the time. Is there a way to create some kind of alias in Windows so that I can type, for example, VS08P at a command prompt or in the address bar and Windows will automatically open the folder I want, which is c:\Documents and Settings\[My ID]\My Documents\Visual Studio 2008\Projects?

(Note that the question isn't about what to do with Visual Studio 2008. Unless the solution is a batch file, I think I've asked the question on the right site.)

Best Answer

If you want to open that folder in Windows Explorer, you can either:

  1. Create a shortcut (.lnk file) to a folder (by right clicking > New > Shortcut in Windows Explorer or on your desktop) then drop that shortcut somewhere in your path.
  2. Create a batch file like this:

    cd "c:\Documents and Settings\etc\etc"
    start .
    

    then save it as VS08P.bat and put it somewhere in your path.

If you want to jump to it in your command prompt, see Phoshi's answer.

Related Question