NOTE: This works natively on Windows 7 or Vista only (Not XP or earlier - the command doesn't exist)
If, say, you wanted to move a program to a different harddrive, you could use the mklink command to make a directory symbolic link
For example, lets say i have Steam installed to
but, thanks to the recent steam sales, my OS harddrive is starting to fill up. I have another harddrive with plenty of space, so I shutdown steam, cut the directory to the new harddrive (at
X:\Steam) and in a command prompt window, i type
cd "C:\Program Files"
mklink /D "Steam" "X:\Steam"
/D makes a directory symbolic link, instead of the default file symbolic link)
Now, if you browse to Program Files using explorer, there will be a shortcut-looking folder (it'll have the little arrow on the icon) and if you open it, the path in the explorer window will still say
So windows is happy, as far as it's concerned steam is still at Program files, and I'm happy, because my OS drive now has a bit more space.
I think you can even set the link to be hidden if you don't want to see it in Program Files, but i haven't tried because i'm not that worried about it.
EDIT: I forgot to mention, when you open the command prompt window, run it as administrator if you're editing Program Files (Right-Click -> Run as Administrator) otherwise you might not have permission to create a file in Program Files.