How to search for all junction links in a given directories and its subdirectories

Using SysInternals tools:

junction -s .

Using only built-ins:

dir/ad/s . | findstr "<JUNCTION>"

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.


!!! 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 :)