Sample code for 30+ languages & platforms
Rust

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

Rust
let fac = chilkat::FileAccess::new();

let Ok(target_path) = fac.symlink_target("qa_data/my_shortcut") else {
    println!("Failed to get shortcut target.");
    return;
};

println!("target path = {}", target_path);