LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need File Dialog that does not resolve Windows shortcuts

I find that the file dialog options all automagically resolve Windows file shortcuts.  This might lead my users to accidently select a file not in the local directory, one that I might not want to monkey with.  Is there a way to intercept shortcuts before they get resolved?  I have been trying, and can't find a way.

 

Thank you.

0 Kudos
Message 1 of 5
(2,275 Views)

You are describing what is called "expected behavior."  Your best bet would be to remove the shortcut itself, the reason being that if they can get there from a file dialog, they can get there through Windows Explorer.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(2,266 Views)

I know it is expected behavior.  I was hoping perhaps the NI guys were smarter than the MS guys.  Shortcuts are very handy, but a programmer should be able to tell the difference and treat them differently if necessary.

0 Kudos
Message 3 of 5
(2,227 Views)

BTW, If I use the stock "List Folder" subVI, shortcuts are listed differently from "real" files.  So, the operating system doesn't really hide the fact that some files are shortcuts.  The issue is that the standard File Dialog tools automatically resolve shortcuts and do not let the progarmmer see that a shortcut has been selected.  I suppose I could write my own file dialog starting from "List Folder", but that would really be a lot of work.

0 Kudos
Message 4 of 5
(2,226 Views)

@Mark_Holm wrote:

BTW, If I use the stock "List Folder" subVI, shortcuts are listed differently from "real" files.  So, the operating system doesn't really hide the fact that some files are shortcuts.  The issue is that the standard File Dialog tools automatically resolve shortcuts and do not let the progarmmer see that a shortcut has been selected.  I suppose I could write my own file dialog starting from "List Folder", but that would really be a lot of work.


That's probably your best option because I believe that the standard File Dialog boxes are just that - standrad dialog boxes.  Even though I cannot confirm it, I would expect the Mac version to bring up a standard Mac dialog box, etc.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 5
(2,210 Views)