7

I'd like to able to find all junction links on a whole drive or just given directory. Is it e.g. possible with the Total Commander search plugins? I just can't seem to find any decent solution for this on Windows... I mean I do know that I can run this:

dir /A:D /S

And I will get a list, but with far more then just junctions...

3 Answers 3

9

Using SysInternals tools:

junction -s .

Using only built-ins:

dir/ad/s . | findstr "<JUNCTION>"
1
  • Had to update junction, but it seems to work now (-q for c). Funny that dir+findstr seem to be as fast junction is. I though junction would be faster. Thanks.
    – Nux
    Jun 28, 2011 at 22:02
4

Using only internal DIR command:

DIR /S /A:L > JunctionList.txt

This will produce nicely formatted file with all junctions in current directory and subdirectories, organized by folder.

2
  • That seems to work, but I actually like junction -s . format as I can easily parse it to have full paths of source an destination.
    – Nux
    Mar 9, 2015 at 20:03
  • 1
    Unfortunately dir /a:l lists directory of type <SYMLINKD> as well as <JUNCTION>
    – DavidPostill
    Jun 28, 2015 at 14:55
3

!!! Beware I noticed that it may miss entries occasionally. I have a lot links and that may confuse it. I didn't have the time to post a bug report to nirsoft so I have no further details to spare :/ !!!

A (much enhanced and UI enabled) alternative to junction is NTFSLinksView (freeware). The ability to

  • have the results in a grid so I can sort them and
  • select the ones I am interested at and
  • keep only the interesting ones in a text file

is the answer to my questions :)

1
  • 1
    Nice tool, but doesn't work as fast as DIR /S /A:L.
    – Nux
    Jun 29, 2015 at 12:05

You must log in to answer this question.

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