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.

This may be a simple question but I couldn't find any answers - folder redirection usually refers to redirecting profile folders only.

I have 2 hard drives in my laptop: C: and D:. C: is an SSD, D: is a regular HDD. I'd like to keep some files on C: but transparantly access those files through the D: drive. For example, I'd like to have:

C:\Source - this is where I want my physical files to be stored.

D:\X_Drive - this folder is mapped to a virtual X: drive, using subst X: D:\X_Drive.

X:\Source - when I go into this folder, I'd to see the contents of C:\Source.

Effectively, I'm looking for a way to map D:\X_Drive to C:\Source. Is this possible under Windows 7 Ultimate?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

Junctions (also called symbolic links or reparse points) allows you to do that. You can use mklink in the command prompt (with /D for directory) to create them:

mklink /D C:\Source D:\Source

This will be transparent to applications - that is they will see it as a regular folder.

In Windows Vista/7, it is safe to delete C:\Source from Windows Explorer, or from the command prompt (del C:\Source) as it will only delete the link, without affecting the content of your target folder (D:\Source). However, in WinXP/2000 it would also delete the target content, so you should use rmdir, or the Sysinternal Junction utility in this case.

share|improve this answer
    
For the asker, there is also a Wikipedia article you should check out when it comes directory deleting with junctions, here –  The_aLiEn Feb 18 '12 at 6:16
    
@The_aLiEn Thanks, I wasn't sure if rmdir was safe in XP, and apparently it is. –  mtone Feb 18 '12 at 6:18
    
Wow, thanks a lot! I knew about junctions/symbolic links but I was unfamiliar with them. I suspected that I may need one but I wasn't sure and I didn't know how to use them. Thnks again. –  xxbbcc Feb 18 '12 at 14:14

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.