Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I bought a powerful desktop system with two hard disks. Windows Vista came pre-installed on the D: disk. My secondary disk received the letter E:.

Really annoying, but when I just had the system, it didn't bother me much. I changed the E: disk to B: because the computer management couldn't alter the drive letter for the D: disk. (Something with boot information or primary disk or whatever…)

Now, I know I can create a folder on the D: disk which would point to the root folder of another disk. This took away the problem I had simply because my secondary disk is just for data storage.

But now I want to create a folder D:\Companyname and I want this folder to be linked to B:\Companyname… How do I link one folder to another without installing additional software?

Why I need this? Simple. I started working on a Delphi project and some [beep][beep] has used lots and lots of hard-coded path names in the code. I can't change those paths because I have just precompiled units.

And please, don't suggest re-installations or repartitioning the disks because that would be too much trouble for a single project. Besides, I don't want to mess up a good system by messing up the file/disk system. I just need this for the three weeks that I'm working on this project... (And I would use a Virtual machine for this if I had a Vista virtual machine. But I don't have one.)

share|improve this question
up vote 5 down vote accepted

Windows Vista and Windows 7 bring you the MKLINK command.

MKLINK [[/D] | [/H] | [/J]] Link Target

        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link.
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link 
                refers to.
share|improve this answer
I apologise for the code formatting, but it's really SuperUser's fault :) – user3463 Sep 25 '09 at 10:02
Works like a charm! Thanks! – Wim ten Brink Sep 25 '09 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.