LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Open txt file

Hello,

I need to open all txt files in a folder (one by one).

Using this function "OpenFile ("c:\\Users\\file1.txt", VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII);" i have to give the name of each file but wanna open all the files without giving the name then extract values from each file and put them in an excel file.

How can i make an automatic test without giving the names of all files?

 

Thanks a lot.

0 Kudos
Message 1 of 2
(3,360 Views)

You can build up a loop with GetFirstFile and GetNextFile to extract all the file names, then handle them one-by-one in the loop.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,355 Views)