取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 11 条)
4,619 次查看

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

0 项奖励
2 条消息(共 11 条)
4,616 次查看

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 项奖励
3 条消息(共 11 条)
4,612 次查看

Check the screen shot

0 项奖励
4 条消息(共 11 条)
4,611 次查看

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

 

 

regards

prince

0 项奖励
5 条消息(共 11 条)
4,599 次查看

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,,

下载全部
0 项奖励
6 条消息(共 11 条)
4,596 次查看

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 项奖励
7 条消息(共 11 条)
4,588 次查看

 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 项奖励
8 条消息(共 11 条)
4,586 次查看

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,,

下载全部
0 项奖励
9 条消息(共 11 条)
4,568 次查看

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)

 

 

10 条消息(共 11 条)
4,556 次查看