Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .