LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Check if file or folder exists" returns TRUE for invalid path

The 'Check if file or folder exists' VI returns a TRUE when the path is invalid.  It seems like it should return FALSE. 

Here are some examples:

Path               Result
c:                     TRUE (okay)
e:                     TRUE (this drive not present on my PC)
\\SomeServer   TRUE (non-existent server)
//SomeServer   FALSE (okay)

Any suggestions?

Thanks, Mark
0 Kudos
Message 1 of 12
(6,026 Views)

Can you show your code?  Either attach an image or the actual code.

Thanks,

RayR

0 Kudos
Message 2 of 12
(6,023 Views)
Which version of LabVIEW are you using? It returns false for me on the current beta for paths of all the kinds you've shown.

___________________
Try to take over the world!
0 Kudos
Message 3 of 12
(6,020 Views)
I thought you weren't allowed to talk about the beta in a public forum. Smiley Wink
0 Kudos
Message 4 of 12
(6,018 Views)
Here is the file (LV 8.2)
0 Kudos
Message 5 of 12
(6,007 Views)
It looks like a bug to me. If you just provide a drive letter (i.e. x:\), the File/Directory Info function returns an error which causes Get File Type to be called. This returns a value of 'Directory'. The test of file or folder exists is if Get File Type does not return 'Invalid file/path'.
0 Kudos
Message 6 of 12
(5,997 Views)

I agree that the Get File Type VI is the source of the error.

I can think of two reasons why it works in the beta:

  1. The VI was changed.
  2. I'm running the beta on XP home, which handles these paths differently.

I'm leaning towards 1.


___________________
Try to take over the world!
0 Kudos
Message 7 of 12
(5,956 Views)
I've confirmed this is a problem with the Get File Type vi.  This was reported to R&D (#110902) for further investigation.  Thanks for pointing this out!
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 8 of 12
(5,918 Views)

hi tr.....!!

 

since i am using 7.1 version m nt able to find a fnt called "check if file or folder exits " in the selected path ,so cud anyone plezz help me in this regard ,humble request,plezzzzzzzzz!!:mansad:Smiley Indifferent,

i hav also attached my code ,since m a begginer in lab view i wud always welcome ur feedbacks .........

 thanking u.......

thanking you

LAKSHMAN C G
0 Kudos
Message 9 of 12
(5,189 Views)

@setty wrote:

hi tr.....!!

 

since i am using 7.1 version m nt able to find a fnt called "check if file or folder exits " in the selected path ,so cud anyone plezz help me in this regard ,humble request,plezzzzzzzzz!!:mansad:Smiley Indifferent,

i hav also attached my code ,since m a begginer in lab view i wud always welcome ur feedbacks .........

 thanking u.......


This thread is four years old...you probably should have started a new one. Also, I'll warn you, not typing words out in full is a pet peeve of many on this forum, so I'd suggest trying to use full words rather than "text message speak" in the future.

 

That said, in LabVIEW 7.1 you can probably use the create folder VI and if you get an error, you will know the directory is already there. It may not be quite this straight forward, but it is worth trying and is a starting point. Someone else may have a better solution, as I never really used 7.1

 

0 Kudos
Message 10 of 12
(5,185 Views)