Creating Links to Folders in WAMP

I’ve installed WAMP on my laptop into C:\wamp64\www and one way of implementing websites and HTML files installed to place them in that folder. That works, but what I don’t like about it is that my files aren’t all in one place such as my Documents folder. If they were, it would be easier for me to backup etc. and get to anything because I would be just going to one destination.

So the next thought you might have is that you just create a shortcut in the www folder to wherever you fancy, but when you do that (go ahead and try!), it just doesn’t work.

The solution is to create a hard link and Windows has just the tool for you.

Open up a command window as an administrator and type the following in:

You will need to replace the “folder-to-create” with your own folder name and of course, “folder-which-already-exists” will point to where you already have a directory with your project in it.

Command output

Running the command

In my case, I created a folder called Test and added in a small PHP file which dumped out the PHP information just to demonstrate this.

Watch out that you are in fact running the shell as an administrator or you will see something like this:

Oops. Error message.

Not an administrator error.

Here’s everything working as expected:

Dump of the php info details

PHP Info

twittergoogle_plusredditpinteresttumblrmail

Written by Stephen Moon
email: stephen at logicalmoon.com
www: https://www.logicalmoon.com


Leave a Reply

Your email address will not be published. Required fields are marked *