LabVIEW

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Directory Spacer/Divider which is OS independant

In LabVIEW I have a File Path Control selecting a directory I want to use. To this directory name then I want to add the name of a file, which is always going to be the same. However, I want to be able to use the LabVIEW VI on both Linux & Windows OSes, so I'm just wondering if there is any file/directory seperator constant which is cross platform i.e. on Linux it would be a forward slash ("/") but on Windows it would be a back slash ("\") for the construction of the full path to my file up on the network. Has anybody come across this before? Have they come up with a workaround ๐Ÿ™‚ ?

For example, on Linux I might have
"/usr/apl" + "/" + "sample.txt" = /usr/apl/sample.txt

On Windows then, I might have U: mapped to /usr on the network, so it's now
"U:\apl" + "\" + "sample.txt" = U:\apl\sample.txt

Hope I've explained this enough ๐Ÿ™‚ ...
0 Kudos
Message 1 of 2
(2,390 Views)
Use the Build Path and Strip Path VIs From the File I/O pallete.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,386 Views)