From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Displaying Directory Hierarchy with the Tree Control

Code and Documents

Attachment

This example uses a Tree Control to display the hierarchy of files and folders in a given directory. The VI searches first for subfolders of the directory, then for files with names that match a pattern you specify, such as *.vi. The VI displays the files and folders of the directory in hierarchical order in a Tree Control.

Note: If you do not specify a pattern, the Tree Control displays all files except shortcuts.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors