LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How make programme for multiple file

I have programme for analysis of a one data file, now i want to make the programme if there are 100 no of file so that programme will work on that file one by one,,

is it possible? 

0 Kudos
Message 1 of 11
(2,976 Views)

Post your code what you have done so far. So, some one will help you.

0 Kudos
Message 2 of 11
(2,973 Views)

To do it, you will have to use a "list folder" VI present in advaced file functions of function pallete. This VI will list all the files and folder present in a specified location in two different arrays ( one array has list of all file and the other one has list of all folders). Once you get all the files, you can analyze those files one by one in a for loop.

 

Regards,

 

Prashant

0 Kudos
Message 3 of 11
(2,969 Views)

Check the screen shot

0 Kudos
Message 4 of 11
(2,968 Views)

thanks for suggestion , if you have any example please send me.

 

 

regards

prince

0 Kudos
Message 5 of 11
(2,956 Views)

Here i have attached my programme ,, which is aplicable for the file attched with same post,,,

 

but i want make it if i have 100 no of similar file so that programme will work for all file one bye by one click,,

Download All
0 Kudos
Message 6 of 11
(2,953 Views)

As PCSNF stated in an earlier post, you will need to wrap your code in a loop to repeat the parsing process for all the files.

 

Also it is good practice to use the Buld Path function from the File palette rather than maniplating strings to get your path.  Did you want the path to be "parsed.txtPrased.txt.txt" ?  That is what your code generates. Put an indicator on it and look.

 

Lynn

0 Kudos
Message 7 of 11
(2,945 Views)

 don't want to pars the file i just want to run thprogramme at one and give a folder to that programme , which folde having multiplee noumber of files , so that wil take file one by one and run them similar for all,

0 Kudos
Message 8 of 11
(2,943 Views)

Here i have attached my programme ,, which is aplicable for the file attched with same post,,,

 

but i want make it if i have 100 no of similar file so that programme will work for all file one bye by one click,,

Download All
0 Kudos
Message 9 of 11
(2,925 Views)

Overall, your code can probably be simplfied, but here's a quick draft that lets you select a folder and process all *.txt files in it.

 

I also thing you could just write the "resulst string" directly to a plain text file. coverting to an array for a nanosecond just to convert it back to what it was inside "write to spreadsheet file" seems a little detour, unless you really want to see the 2D array during execution. I would also delete all indicators, they change very rapidly and just slow down the loop.

 

(I did not test the code, so there could be bugs. Modify as needed)

 

(btw, never operate on paths as strings. it will break OS independence. Always use strip path/build path)

 

 

Message 10 of 11
(2,913 Views)