Task Overview
Consider the Front Panel shown below:
Construct a VI that performs a case insensitive search of a defined folder and lists all of the files within that folder whos filenames begin with a defined prefix. The VI should by default only search within the folder specified but be capable of optionally including a recursive search of all subfolders within the defined start folder.
The VI should output an array containing the pathnames of all files, within the search folder (or folders) whos filenames begin with the defined prefix.
The VI should detect any problems with data entered by the user, in particular into the Starting Folder and Filename Prefix controls, before any search operations are carried out and provide appropriate error codes and messages in Error Out.
Controls
Name | Type | Description |
---|---|---|
Starting Folder | Path | The path from which to start the search |
Serach Subfolders | Enum | Defines if the VI should include a recursive search of subfolders within the 'Starting Folder' |
Filename Prefix | String | The filename prefix to search for |
Error In | Error Cluster | Default No Error In. |
Indicators
Name | Type | Description |
---|---|---|
Files Detected | Array of Paths | An array containing the pathnames of files within the 'Starting Folder', and optionally its' subfolders, whos filenames begin with the string defined in 'Filename Prefix'. |
Error Out | Error Cluster | Provides the user an indication of any errors encountered by the searcher. |
NOTE: A VI containing the Front Panel shown above is attached and could be used as a starting point for your VI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.