From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to systematically open file in a folder and process them with a program

Solved!
Go to solution

Hello,

 

For my second question of the night.

 

I am wondering if there is a way to open every file in a folder, run them through a vi, and then append the output to an array or spreadsheet? This would save me lots of time and my wrists.

 

Thanks

0 Kudos
Message 1 of 4
(2,512 Views)
Solution
Accepted by topic author mrphud

Use list folder and autoindex over all file names in a FOR loop, processing each file in the list.

Message 2 of 4
(2,507 Views)

Hi,

 

Yes you can open a file in the folder by using 'List folder' function (Programming>File I/O>Advvanced File Function>List Folder) which lists all the files and folders in the given path. From that you can build the path and give to 'Open File' function.

 

Hope this helps you. Let us know this solves your issue 🙂

Message 3 of 4
(2,506 Views)

Thanks for all the help. I ended up using the list file function as suggested except, I did not need the open file function becuase I used a sub vi that already employed a read from spreadsheet function.

 

 

0 Kudos
Message 4 of 4
(2,472 Views)