LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

check if file or folder

Your "compulsion" to demand an apology over a nearly 7-year-dormant thread is not a good look.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 21 of 23
(450 Views)

@gksloane wrote:

GerdW - you are "newbie shaming" for no reason. In fact BOTH of the below methods are correct. If as you say "You create a file path by using string constants. THAT'S PLAIN WRONG! Use path constants whenever you want to handle paths!" were in fact even remotely true, why would "String to Path" even exist? Yes, your way is more efficient and what a seasoned LabVIEW programmer might do; but shaming someone AND providing incorrect information in the process simply because they did something a different way than you think is correct is both inaccurate and unfair. Both ways work. You should apologize. I know this is an old thread, but I felt compelled to comment.

 

check.png


Both ways only work if you never intend to move to a different platform than Windows. With LabVIEW running on Windows, Linux, MacOS, Pharlap ETS, VxWorks and NI Linux RT and in the past also Sun Solaris and HP-Unix, and only with Windows and Pharlap ETS using the DOS naming scheme, it is valid to say that building paths by concatenating strings is the wrong way to do business!

 

The existence of the String to Path node is not a contraindication to this, but simply a helper function if you absolutely have to do it. But you need to be aware of the limitations when using this method. Just because you can hammer a nail in with a screwdriver doesn't mean that this is the way you should do it. If you have nothing else at hand, and absolutely definitely need to get this nail in without being able to get a hammer, then you can try to do it but don't wonder if the nail goes in badly and your screwdriver gets damaged!

Rolf Kalbermatter
My Blog
Message 22 of 23
(440 Views)

@rolfk wrote:

 

 


Both ways only work if you never intend to move to a different platform than Windows. With LabVIEW running on Windows, Linux, MacOS, Pharlap ETS, VxWorks and NI Linux RT and in the past also Sun Solaris and HP-Unix, and only with Windows and Pharlap ETS using the DOS naming scheme, it is valid to say that building paths by concatenating strings is the wrong way to do business!

 

 


In fact, the OP was running on an sbRIO 9641... which means that this is specifically a case where the user wasn't using Windows, and should have been using path constants 🙂

0 Kudos
Message 23 of 23
(419 Views)