windows symbolic link target
To complement Paul Verest's helpful answer:
While
cmd
'sdir
indeed shows the link type and target path, extracting that information is nontrivial - see below for a PowerShell alternative.In order to discover all links in the current directory, use
dir /aL
.
PowerShell (PSv5+) solutions:
List all links and their targets in the current directory as full paths:
PS> Get-ChildItem | ? Target | Select-Object FullName, TargetFullName Target-------- ------C:\root\public\mytextfile.txt {C:\root\Public\myothertextfile.txt}
Determine a given link's target:
PS> (Get-Item C:\root\Public\mytextfile.txt).TargetC:\root\Public\myothertextfile.txt