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.

As I am using a SSD but it is limited in size I want to be able to use junction points to remap files and directories to my HDD, this would work ideal if I could create a shell extension for it that does this.

The ideal behavior would be to right click a directory or junction point and have an option
"Manipulate junction point" in which I can perform the following actions:

  • Create: For a directory, move the directory to a location I specify and replace it by a junction point.
    (Dir) C:\Example turns into (JP) C:\Example --> D:\Example

  • Swap: For a junction point, I want to swap the junction point with its location.
    (JP) C:\Example --> (Dir) D:\Example turns into (Dir) C:\Example <-- (JP) D:\Example

    This means it would remove the junction point, move the data and place a reverse junction point.

  • Remove: For a junction point, I want to remove it and move the directory back.
    (JP) C:\Example --> (Dir) D:\Example turns into (Dir) C:\Example

My most important questions:

  • What approach should I take to do this? Script? Bash? Executable?
  • How do I create the menu entry?

Less important questions:

  • Does there exist such a solution already?
  • Are there better commands or API calls for checking and manipulating junction points?

I already know of Microsoft's mklink and Sysinternals junction.

share|improve this question
    
Just to let it out - I can't really think of a situation (or recognize the one you cited) where doing this is a necessity, meaning I'd try other approaches to solve the broader issue, whatever it is. Why linking SSD files to the HDD? –  Cawas Sep 22 '10 at 18:01
    
Because not everything fits on the SSD, so I have to move things that do not require to be fast to my HDD without breaking anything... I don't want a workaround, I want a solution. –  Tom Wijsman Sep 22 '10 at 18:15
    
We've made a blog post about maximizing the lifetime of your SSD. –  Tom Wijsman May 10 '11 at 14:49
    
related: superuser.com/questions/95862/… –  Cawas May 10 '11 at 15:55

2 Answers 2

up vote 14 down vote accepted

Since you asked if such solutions exist already, have you taken a look at Junction Link Magic or Link Shell Extension?

Junction Link Magic allows creation, modification, and removal of junction points. It is freeware, and does support Windows 7.

Link Shell Extension also provides the same functionality, and is also freeware. It also supports Windows 7.

share|improve this answer
    
For some reason, I vaguely remember @TomWij mentioning these software in a comment on a hardlink/junction point-related question here on SU. I just can't find the actual question at the moment. –  Isxek Sep 22 '10 at 18:02
    
Exactly, but I want the best way to do it, I didn't know of the extension though, I'm checking it out now... –  Tom Wijsman Sep 22 '10 at 18:07
    
It indeeds makes it easier to work with junction points, I'll use this for the moment being and I will leave this open waiting for a better solution... I wish the source code was available so I could remove the text it adds to the directory name and to remove the options I will never use. –  Tom Wijsman Sep 22 '10 at 18:20
    
Sure, no worries :) –  Isxek Sep 22 '10 at 18:50
    
Just to add: you've probably found these already, but here's a couple of links off CodeProject (with source) related to junction points: codeproject.com/KB/winsdk/junctionpoints.aspx and codeproject.com/KB/vista/ReparsePointID.aspx –  Isxek Sep 22 '10 at 19:54

I just use MKLINK which is built into Windows 7. You'll end up writing batch files I guess, but it's not hard to use.

share|improve this answer

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.