How to create a symlink or symbolic link on Windows Server 2008 to help share folders

A symlink or symbolic link can be easily created in Widows Server 2008 to share a common folders or files amongst projects. Lets assume you have a folder in called CSS and you want to share this folder with You could just upload the CSS folder into but then you need to FTP and update the CSS folder in 2 places. If both sites are using the exact same CSS this could cause you issues over time as you might forget to roll out updates from one site to another.

Using Windows Server 2008 you could create a symlink to solve this issue. Once you have the CSS folder created on then you can run the following command from the command line on the server to create a symlink:

MKLINK /D C:\inetpub\wwwroot\\CSS C:\inetpub\wwwroot\\CSS

The format of the above is: MKLINK [new directory] [where to generate the new folder] [target folder you want the new link to go to]

If you're using Windows Server 2003 you can achieve something similar using:

fsutil hardlink create c:\foo.txt c:\bar.txt

There is a good answer on that covers this topic quite well -

blog comments powered by Disqus

Get In Touch

Follow me online at TwitterFacebook or Flickr.

Latest Tweets