Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It's simple. I bought a powerful desktop system with two harddisks. Windows Vista came pre-installed on the D: disk. My secondary disk received the letter E:.

Real, real 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 driveletter 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 hardcoded pathnames in the code. I can't change those paths because I have just precompiled units.
And please, don't suggest re-installations of repartioning 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

1 Answer 1

up vote 4 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

 
discard

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.