Sample code for 30+ languages & platforms
Xbase++

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 Xbase++ Downloads

Xbase++
LOCAL oFac
LOCAL cTargetPath

oFac := CreateObject("Chilkat.FileAccess")

cTargetPath := oFac:SymlinkTarget("qa_data/my_shortcut")
IF (oFac:LastMethodSuccess != 1)
    ? "Failed to get shortcut target."
    oFac:destroy()
    RETURN
ENDIF

? "target path = " + cTargetPath

oFac:destroy()