How to select a symbolic link in a dialog?

210 Views Asked by At

I'm working on a small program that can create symbolic links. Currently you could select a source and a target folder via FolderBrowserDialog. The source gets copied into the target, deleted and replaced with an symbolic link.

Now I want the program to detect if source is already an symbolic link, but FolderBrowserDialog returns the target path when a link gets selected. Is there a possibility to get the full path to the link (e.g. C:\path\to\) instead of the target path?

I only found a sample project that returns if a given path is a symlink but the program iterates over all directories via Directory.GetDirectories (which also returns the path to symlinks). But there is no way for a user to select a link via dialog.

1

There are 1 best solutions below

0
On BEST ANSWER

As Sergey.quixoticaxis.Ivanov mentioned, it is not possible to select a Symlink in .Net.