LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Not a Path?" is not working

Hello,

i added a simple example vi where i have a path-control and a "Not-a-Number/Path/Refnum?" and as output a boolean.

The boolean should be false if the path is correct and true if the path is invalid.

 

Then i insert as path the value "c:\abc|||def.txt". When i run the vi then the path is valid.

But this is not a valid name in Windows so why is it displayed as valid? I cant create a file manually in with this name.

 

Thanks for any help

0 Kudos
Message 1 of 7
(3,081 Views)
This is a frequently asked question. See here. In other words it tells whether it's a path, not whether it's valid or not.
Message 2 of 7
(3,075 Views)

The vertical bar or "pipe" symbol can't be used in filenames, but it is a valid character within a command or "DOS" enviroment.  You could use it as "type c:\myfile.txt | more" and that would pipe the myfile.txt through the more program a page at a time.

 

Also, I believe the function just checks whether what you have could be a path.  Not whether it is a valid or invalid path.

 

The function is called "Not a Path" rather than "Not a Valid Path"Smiley Wink

Message 3 of 7
(3,069 Views)
So what do i have to insert in the path-control that the boolean becomes true?
0 Kudos
Message 4 of 7
(3,065 Views)
This is also a frequently asked question. See, for example, here. Smiley Wink
Message 5 of 7
(3,063 Views)

I mean the path-control in my example where i use the "Not a path".

I saw the other examples how to solve it. But i still want to know for what i can use the "Not a path"-thing.

0 Kudos
Message 6 of 7
(3,060 Views)

Not a path is the Tag <Not a path> and can be found under File-I/O -> path constants as a Not A Path Contant.vi

Several file vis will also return that constant if cancelled (file dialog) or an error occures. 

 

Felix 

Message 7 of 7
(3,051 Views)