Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Symbolic link for Windows?  (Read 2751 times)

0 Members and 1 Guest are viewing this topic.

yangyang

    Topic Starter


    Greenhorn
    • Yes
    • Web Dev Blog
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 7
Symbolic link for Windows?
« on: February 21, 2012, 03:32:37 AM »
As far as I know, Windows doesn't have such a thing inherently but is there any software / utility that would enable me to create symbolic links in Windows?

My C drive is currently almost full on my Windows 7 and it's a pain to clean it. I tried many ways but failed to do it efficiently. They either didn't help much or the drive was filled up again within a few weeks - my C drive is a solid state disk and you know it's small.

I'm wondering if I can create symbolic links in Windows so as to move monster folders from C drive to other drives that are on SATA disk which are much much more spacious? You get the idea. Just leave the symbolic links in C drive but move the actual content to other drives...

Otherwise I'd have to buy a larger solid state disk to replace my current one. It costs money and time.

Thanks for your help!
I built an online tool to convert images. Hope it can be useful to you.

oldun

  • Guest
Re: Symbolic link for Windows?
« Reply #1 on: February 21, 2012, 04:12:22 AM »
You can use the MKLINK command line utility, included in Win7. This needs to be run in an elevated console. Type MKLINK /? for the syntax.

yangyang

    Topic Starter


    Greenhorn
    • Yes
    • Web Dev Blog
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 7
Re: Symbolic link for Windows?
« Reply #2 on: February 21, 2012, 07:06:33 PM »
Thanks oldun! This is so nice of Windows. Never knew that. I'll give it a try and let you know.

So say if I want to completely move C:\mydir to E:\mydir, I would:

1. Copy C:\mydir to E:\mydir
2. Open CMD command line window and go to C:\
3. "mklink /H C:\mydir E:\mydir"

Is this correct?
I built an online tool to convert images. Hope it can be useful to you.

oldun

  • Guest
Re: Symbolic link for Windows?
« Reply #3 on: February 21, 2012, 07:50:30 PM »
I don't believe that you can create a link to an existing file or directory. You would therefore need to create the link before placing files in the link location.
There are numerous examples of using MKLINK on the web. This is just one of them:
http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/
Or you could use the Junction utility from SysInternals.