I'm trying to read the target file/directory of a shortcut (.lnk) file using Go.
I already have a loop for all the files in a directory and I can successfully identify if it is a dir with IsDir()
or if it is a file IsRegular()
. Now I need a way to read if it is a link and, if it is a .lnk
, the path of it so I can print it.
I couldn't find any way of doing this and I've been searching on SO but nothing comes up. Any idea?