To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Coding that exemplifies how to list the size of all files within a selected folder and store the information into a spreadsheet file.
Description
This VI uses the Recursive File List VI to obtain all files in a directory, even files in directories within the main directory. The VI then lists the size file of each, and writes this information to a spreadsheet file that can be opened in Excel or Notepad.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Select the folder that you would like to analyze.
2. Select the spreadsheet file that will held the information.
3. Run the VI.
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This VI is useful. To make the Front Panel more practical, both the File Path Controls can be changed to allow the user to select a Folder, rather than just a file.
Now when the user browses, they have the option to select 'Current Folder' when in a folder.
On OS's like Vista and Windows 7, the user will receive an error when trying to save a file to the C:\ drive. In order to allow a user to choose a new file name at a new location on the PC, the following changes must be made.
Now when the user browses, they have the option to to create a new file in 'My Documents' or the 'Desktop' with a file name of their choosing.