Sample code for 30+ languages & platforms
Visual Basic 6.0

Get the Target of a Windows Shortcut

See more FileAccess Examples

Demonstrates how to get the target of a Windows shortcut.

Note: This example requires Chilkat v9.5.0.77 or greater.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim fac As New CkFileAccess

Dim targetPath As String
targetPath = fac.SymlinkTarget("qa_data/my_shortcut")
If (fac.LastMethodSuccess <> 1) Then
    Debug.Print "Failed to get shortcut target."
    Exit Sub
End If

Debug.Print "target path = " & targetPath