List Folder Function

Owning Palette: Advanced File VIs and Functions

Requires: Base Development System

Returns two arrays of strings listing the names of all files and folders found in path, filtering both arrays based upon pattern and filtering the filenames array based upon the specified datalog type.

Details  

 Add to the block diagram  Find on the palette
datalog type can be any data type and restricts the filenames returned to only datalog files containing records of the specified data type. Datalog records contain a time stamp cluster and a cluster of the front panel data.
path identifies the folder whose contents you want to determine. If this is not an existing folder, this function sets filenames and folder names to empty arrays and returns an error. If path points to a VI library (*.llb), filenames returns the contents of the VI library and folder names returns an empty array.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
pattern restricts the files and directories returned to those whose names match pattern. The pattern matching in this function is similar to the matching used in matching wildcards in Windows and Linux filenames and is not like the regular expression matching performed by the Match Pattern function and the Match Regular Expression function. If you specify characters other than the question mark character (?) or the asterisk character (*), the function displays only files or directories that contain those characters. You can use the question mark character (?) to match any single character. You can use the asterisk character (*) to match any sequence of zero or more characters.

If pattern is an empty string, the VI returns all files and directories.
path out returns path unchanged.
filenames contains the names of the files found in the specified directory. This function does not return the names of files found in folders within the directory. This function sorts the returned filenames alphabetically.
folder names contains the names of the folders found in the specified directory. This function sorts the folder names alphabetically. If path is an empty path, folder names contains the names of the drives on the computer.
error out contains error information. This output provides standard error out functionality.

List Folder Details

Note  Front panel controls might not update while the function lists files and folders found in the specified directory. The controls update when the function finishes listing the files and folders.