Hello there!
Unfortunately, the File Browser Intrument won't display shortcut links in the left folder tree. These are however listed and available in the right tree, where the directory contents are displayed.
The reason for this is that, internally, the File Browser Instrument explictly doesn't allow shortcuts to be listed in the right tree, due to the way in which the intrument is written.
However, you are free to change the behavior of the custom control. The source code is located under <CVI Installation>\toolslib\custctrl\FileBrowser.c, so you can modify it to fit your needs.
Here is a helpful hint about how you could modify this custom control:
- PopulateFolderWithPath populates the right directory tree with all directories under the current expanded item.
- The folders from that directory are retrieved using GetFirstFile and GetNextFile.
- However, GetFileAttrs filters the items under the directory. As GetFirstFile returns -1 when the .lnk is found, it doesn't add it to the right directory tree and gets skipped.
Here are some options about how you could work around this limitation:
- Explicitly verify for .lnk files. This way you can determine that the file/folder is actually a link, without using GetFileAttrs.
- Although it's easier to determine symbolic links on Linux (readlink, stat), on Windows, this is a suggestion from MSDN on how to do this: Determining Whether a Directory Is a Mounted Folder
I hope this helps!
- Johannes