Symbolic links and junctions are invisible in normal directory listings — they appear as regular folders or files in File Explorer and most tools. When auditing a system, troubleshooting a broken path, or reviewing a server you inherited, knowing where the links are and what they point to is essential. This article covers the commands for finding all symbolic links, junctions, and hard links on Windows — from a single folder to an entire drive.
Quick answer
:: List all symlinks and junctions in current directory
dir /AL
:: List all symlinks and junctions recursively on C:\
dir /AL /S C:\
CMD: dir /AL
dir /AL lists only entries with the reparse point attribute — which covers symbolic links and junctions. This is the fastest built-in method and works on all Windows versions without additional tools.
:: Show symlinks and junctions in the current directory only
dir /AL
:: Show symlinks and junctions recursively from a specific path
dir /AL /S "C:\Users\username"
:: Full drive scan — can be slow on large volumes
dir /AL /S C:\
Example output:
Volume in drive C is Windows
Volume Serial Number is A1B2-C3D4
Directory of C:\Users\username\AppData\Roaming
25/03/2026 09:14 <JUNCTION> MyBigApp [D:\Config\MyBigApp]
Directory of C:\Users\username
25/03/2026 10:02 <SYMLINKD> OneDriveGames [C:\Users\username\OneDrive\GameSaves]
The tag in angle brackets identifies the link type:
| Tag in output | Link type |
|---|---|
<JUNCTION> | Directory junction (mklink /J) |
<SYMLINKD> | Directory symbolic link (mklink /D) |
<SYMLINK> | File symbolic link (mklink without switch) |
dir /AL output. Use fsutil to inspect hard links — see the section below.
CMD: fsutil
fsutil gives lower-level access to NTFS structures. Use it to inspect reparse point details on a specific path, or to find all hard links pointing to a file.
:: Check whether a specific path is a reparse point (symlink or junction)
fsutil reparsepoint query "C:\LinkedFolder"
:: List all hard link paths for a specific file
fsutil hardlink list "C:\App1\Logs\output.log"
Example output for a junction:
Reparse Tag Value : 0xa0000003
Tag value: Microsoft
Tag value: Name Surrogate
Tag value: Mount Point
Substitute Name : \??\D:\Config\MyBigApp
Print Name :
fsutil reparsepoint query returns raw NTFS data. The Substitute Name field shows the actual target path. For most audit purposes, dir /AL is sufficient — use fsutil when you need to confirm the exact NTFS reparse tag or target path of a specific entry.
PowerShell: Get-ChildItem
PowerShell’s Get-ChildItem exposes the LinkType property on filesystem objects. This makes it easy to filter, format, and export link inventory in a structured way.
# List all symlinks and junctions in a directory (non-recursive)
Get-ChildItem -Path "C:\Users\username" |
Where-Object { $_.LinkType -ne $null } |
Select-Object Name, LinkType, Target
# Recursive scan of an entire drive
# -ErrorAction SilentlyContinue skips permission-denied paths
Get-ChildItem -Path "C:\" -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.LinkType -ne $null } |
Select-Object FullName, LinkType, Target
Example output:
FullName LinkType Target
-------- -------- ------
C:\Users\username\AppData\Roaming\MyBigApp Junction {D:\Config\MyBigApp}
C:\Users\username\OneDriveGames SymbolicLink {C:\Users\username\OneDrive\GameSaves}
To export the results to a CSV file for documentation or review:
# Export all symlinks and junctions on C:\ to a CSV file
Get-ChildItem -Path "C:\" -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.LinkType -ne $null } |
Select-Object FullName, LinkType, Target |
Export-Csv -Path "C:\bat\symlink-audit.csv" -NoTypeInformation
C:\bat\symlink-audit.csv with a full inventory of all links found — ready to share or import into a spreadsheet.
Hidden gems
Windows creates its own junctions — expect noise on a full drive scan
Running dir /AL /S C:\ or a recursive PowerShell scan will include system-created junctions such as C:\Users\All Users, C:\Documents and Settings, and entries inside C:\ProgramData. These are part of the Windows compatibility layer and are not user-created. Filter them out by excluding C:\ProgramData and paths under C:\Windows when auditing for user or admin-created links only.
# Scan C:\ but exclude Windows system paths to reduce noise
Get-ChildItem -Path "C:\" -Recurse -ErrorAction SilentlyContinue |
Where-Object {
$_.LinkType -ne $null -and
$_.FullName -notmatch "^C:\\Windows" -and
$_.FullName -notmatch "^C:\\ProgramData"
} |
Select-Object FullName, LinkType, Target
Hard links require a different approach
Hard links do not appear in dir /AL or Get-ChildItem link filtering because they have no reparse point attribute. The only built-in way to detect them is fsutil hardlink list on a specific file. If you need to audit hard links across a volume, third-party tools such as Sysinternals du or hardlink tools provide more complete coverage.
Where this matters
System audit after inheritance — when taking over a server or workstation from another admin, a quick dir /AL /S reveals any unexpected redirections or legacy junctions before they cause confusion.
Troubleshooting broken paths — if an application reports a missing path that visually exists in Explorer, check whether it is a broken symlink pointing to a deleted or moved target.
Backup verification — before setting up a backup job, identify which folders are junctions or symlinks so the backup policy can be configured to handle them correctly rather than duplicating or skipping data unexpectedly.
Documentation of link-based environments — development setups and deployment scripts often rely on symlinks to share configs or data. Exporting the inventory to CSV provides a baseline record that can be version-controlled alongside the environment.
Tips and limitations
dir /AL /S C:\is slow on large volumes — scope it to a specific path when possible- PowerShell recursive scans require
-ErrorAction SilentlyContinueto skip protected system paths without stopping - Hard links are not detectable by
dir /ALorGet-ChildItemlink filtering — usefsutil hardlink listper file - System junctions under
C:\WindowsandC:\ProgramDataare normal — do not remove them - The
Targetproperty in PowerShell output returns an array — displayed with braces{}in the console but accessible as a string in scripts via$_.Target[0]
Official reference
dir — Windows Commands | Microsoft Learn
Related guides
- mklink in Windows: symlinks, junctions, and when to use each
- How to delete a symbolic link on Windows without deleting the target
- NTFS links on Windows: symbolic links, junctions, and hard links compared
- How to move AppData folder to another drive on Windows — coming soon
