To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example counts all the files in a specified directory with a specific file extension.
Description
The example counts all the files in a specified directory with a specific file extension, when you try to counts the number of specified file, use it!
Requirements
Steps to Implement or Execute Code
Additional Information or References
Front Panel
VI snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
A better way to do this would be to use the "pattern" input on List Folder, so you only get a list of matching files, and then simply use Array Size to determine how many there are. It will be much quicker, and use less memory as well.
Also, if you decide to use a For Loop, you should definitely only read the RingText once, not on every iteration.