Wednesday, October 22, 2008

Junction - Shortcuts for CMD and PowerShell File Paths

Some of you may know of the Junction.exe program for Windows, but some of you may not. This is a little function that has been around for a little while now, and it's really useful if you are tired of trying to remember the full path you need to type in when trying to get to stsadm.exe (or similar) and don't have a shortcut.

Well, now you can "alias" the long path via junction.exe.

Example:

Turn this: C:\windows\system32\drivers\etc
Into this: C:\hosts

Code: junction.exe hosts C:\windows\system32\drivers\etc

Another Example:

Turn this: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12
Into this: C:\12hive

Code: junction.exe 12hive "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12"

TechNet Article and Download Link for Junction

Enjoy!