Sample code for 30+ languages & platforms
Tcl

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 Tcl Downloads

Tcl

load ./chilkat.dll

set fac [new_CkFileAccess]

set targetPath [CkFileAccess_symlinkTarget $fac "qa_data/my_shortcut"]
if {[CkFileAccess_get_LastMethodSuccess $fac] != 1} then {
    puts "Failed to get shortcut target."
    delete_CkFileAccess $fac
    exit
}

puts "target path = $targetPath"

delete_CkFileAccess $fac