LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does File Exist?

Hello,
 
Is there any way to use LabVIEW determine if a certain file exists?
 
I have a program in which I enter a "NUMBER" into a string control.  I need LabVIEW to search a specified folder called "DATA" on the C:\ drive for a Microsoft Excel Spreadsheet named "NUMBER.xls."  If the file exists, I would like the outcome to be "FALSE."  If the file does not exist, I would like the outcome to be "TRUE."
 
I plan on wiring this Boolean output to a TRUE/FALSE case structure.
 
Help me Obi-Wan.  You're my only hope!
 
Thanks,
 
Drew
0 Kudos
Message 1 of 2
(2,856 Views)
Just call "file info" with the desired file name and wire the error output to your case structure. One case will be red (error) and the other green (no error).
 
You get an error if the file does not exist.
0 Kudos
Message 2 of 2
(2,854 Views)