When I need to create a symbolic link (symlink) in Windows 7, I always forget how. Hopefully by sharing this information, I will be able to retain it.
To create a symbolic link in Windows 7, we can use the mklink command that comes with Windows 7.
Typically you want to create a symbolic link for a directory. This is accomplished by using the /D option.
To start you need to open a command (CMD) prompt as an administrator.
For our example, lets assume we have a folder called c:\development\php\myproject and we want to create a symbolic link in our Apache htdocs folder, c:\apache2\htdocs that points to our project. Using the symlink will allow us to make changes and not have to worry about copying them to the Apache folder.
To create the symlink, we will use the following command from the c:\apache2\htdocs folder:
mklink /D myproject c:\development\php\myproject
There are other utilities out there that will do the same thing, but the mklink utility comes with Windows 7 and works.