Sample code for 30+ languages & platforms
Go

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

Go
    fac := chilkat.NewFileAccess()

    targetPath := fac.SymlinkTarget("qa_data/my_shortcut")
    if fac.LastMethodSuccess() != true {
        fmt.Println("Failed to get shortcut target.")
        fac.DisposeFileAccess()
        return
    }

    fmt.Println("target path = ", *targetPath)

    fac.DisposeFileAccess()