LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I check if a file exists in CVI Real Time?

Solved!
Go to solution

It would also be nice if the help file designated whether functions were supported in real time or now.

 

I tried this:

 

    if(GetFileAttrs (DataFileName,NULL,NULL,NULL,NULL) == -1)

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 4
(4,068 Views)
Solution
Accepted by DieselPower

You can check if a file exists in CVI Real-Time using GetFileInfo function.

 

The CVI help provides a list of functions available on CVI Real-Time here: CVI Real-Time Functions

National Instruments
0 Kudos
Message 2 of 4
(4,060 Views)

Excellent.  Now how to I tell if the file is currently open (fopen) so I know whether to close it or not?

 

Thanks!

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 4
(4,053 Views)

It looks like I just do this:  if (filePointer) fclose(filePointer);

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 4 of 4
(4,048 Views)