LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'd like to verify that a particular folder exists on the local drive

I have an application that gathers data and writes it to a text file on the local hard drive. Yesterday we found that the folder in which the text file is to be written was not present on the drive, but there was no indication to the user that there had been any problem with writing the file. What's the best way to have LabVIEW (6.1) verify that a given folder exists? (I have a couple of ideas I'm working with, but there's got to be something better.) I'd like to have a dialog box appear telling the user to stop testing if that folder does not exist.
Thank you very much,
-Dan Arrington
0 Kudos
Message 1 of 4
(2,847 Views)
Use File/Dir Info (Functoins->File I/O->Advanced) to check if it exists. See example.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 4
(2,848 Views)
Arrington wrote:

> I have an application that gathers data and writes it to a text file
> on the local hard drive. Yesterday we found that the folder in which
> the text file is to be written was not present on the drive, but there
> was no indication to the user that there had been any problem with
> writing the file. What's the best way to have LabVIEW (6.1) verify
> that a given folder exists? (I have a couple of ideas I'm working
> with, but there's got to be something better.) I'd like to have a
> dialog box appear telling the user to stop testing if that folder does
> not exist.
> Thank you very much,
> -Dan Arrington

Try to make a directory-listing of the folder, this should yield 2+
enties i fthe folder exists and 0 or an error if it doesn't
exist.

--
Matthias Eisner
0 Kudos
Message 3 of 4
(2,847 Views)
Thanks! That's a lot easier than what I had prepared.
-Dan
0 Kudos
Message 4 of 4
(2,847 Views)