# VBForums CodeBank > CodeBank - C# >  Getting the target of a file link (lnk)

## Lord_Rat

Right click your project, Add Reference, COM and add "Windows Script Host Object Model".

Then, add:


```
using IWshRuntimeLibrary;
```

And the code...


```
    string linkPath = @"c:\path\path\file.lnk"; //whereever the lnk file is

    if (System.IO.File.Exists(linkPath))
    {
        WshShell WShell = new WshShell();
        IWshShortcut Link = (IWshShortcut)WShell.CreateShortcut(linkPath);
        
        string TargetPath = Link.TargetPath;
        string WorkingPath = Link.WorkingDirectory;
    }
```

----------

