2

If I rename a folder which is the target of a (or multiple) junction, is there any way to update all the junctions to point to the renammed folder instead of just breaking?

ᄂ ᄀ
  • 208

2 Answers2

2

I just tried this. It doesn't work if you rename the folder as the junctions still point back to the original folder. However, a chain of junctions would work:

mkdir source
junction dest source
move source source2
junction source source2

This now means that dest links to source and source links to source2 (where source2 is the only folder containing data). I'm not sure how this works internally, though it seems to work as desired.

You have your junctions set up so you can rename the folder and link to it using the same folder name your existing junctions point to.

john
  • 2,005
2

A junction target does not know about any junctions targeting to it (in other words, there's no backlink from a junction target to the junction itself). So the only proper solution requires scanning all directories for junctions and then update them accordingly.