28

since Windows Vista there is an new Win32-API call CreateSymbolicLink to create a symbolic link on the NTFS filesystem.

Does anyone know if there is an way to list all existing symbolic links on the filesystem?

Alexander
  • 3,724
  • 8
  • 42
  • 50

3 Answers3

85

Window-key -> cmd -> dir /AL /S c:\

Copy-paste from comment on -> http://windows7themes.net/how-to-find-all-symbolic-links-junction-points-in-windows-7.html

You can of course put any other drive label instead of c:\

RJFalconer
  • 10,890
  • 5
  • 51
  • 66
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
  • 6
    While it's not an answer to the question, it *is* related and what I happened to be looking for. Churbrew! – Sophistifunk Jun 20 '13 at 02:23
  • 3
    I tried it -- Looks like an answer to the question to me. All symbolic links on the drive show , and all junction points say . So if you only want symbolic links, filter the result... – ToolmakerSteve Mar 20 '14 at 22:51
  • 2
    `dir` hangs in an infinite loop if you have recursive reparse points (a stupid thing to have as it trips up most software dealing with directory trees, but the AppData folder of my standard W7 installation has them by default). Nfts_Links_View as recommended by Tristan doesn't have this problem. – Endre Both Apr 01 '15 at 09:24
9

You can also use this free GUI tool:

http://www.nirsoft.net/utils/ntfs_links_view.html

Tristan CHARBONNIER
  • 1,119
  • 16
  • 12
6

Following the links in that article takes you to this one. Quoting:

To determine if a specified directory is a mounted folder, first call the GetFileAttributes function and inspect the FILE_ATTRIBUTE_REPARSE_POINT flag in the return value to see if the directory has an associated reparse point. If it does, use the FindFirstFile and FindNextFile functions to obtain the reparse tag in the dwReserved0 member of the WIN32_FIND_DATA structure. To determine if the reparse point is a mounted folder (and not some other form of reparse point), test whether the tag value equals the value IO_REPARSE_TAG_MOUNT_POINT. For more information, see Reparse Points.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536