08-05-2013 02:40 PM
Hi,
I need to look at several files of data. How can I loop through all the files in a directory in order to get the data from those files?
Thanks very much
Solved! Go to Solution.
08-05-2013 03:05 PM
Build an array of the file names in the folder you are interested in, using the Advanced File Functions "List Folder" under File I/O, then index through the file names (a while loop possibly) where each file name will be used to perform whatever function(s) you are trying to perform.
08-06-2013 06:47 AM
An autoindexed FOR loop would be the way to go. As already stated, use the List Folder function to get a list of the files in the folder.
08-06-2013 06:55 AM
Thanks a bunch! Both posts were very helpful!
08-06-2013 07:02 AM
@CRivett wrote:
I need to look at several files of data. How can I loop through all the files in a directory in order to get the data from those files?
You can use either
a. List Folder Function OR
Later is useful if you have nested folders containing data files, so you can input the top level directory and this VI will output all files in that folder or any sub-fiolder.