windows symbolic link target
As Harry Johnston said dir
command shows the target of symbolic links
2014/07/31 11:22 <DIR> libs
2014/08/01 13:53 4,997 mobile.iml
2014/07/31 11:22 689 proguard-rules.pro
2014/09/28 10:54 <JUNCTION> res [\??\C:\Users\_____\mobile\src\main\res]
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, Target
FullName 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).Target
C:\root\Public\myothertextfile.txt