Table Of Contents

Recursive File List (G Dataflow)

Last Modified: April 3, 2017

Searches a folder recursively and lists the contents of the folder.

connector_pane_image
datatype_icon

folder

Path to the folder whose contents you want this node to return.

datatype_icon

continue recursing on error

A Boolean value that specifies whether to continue recursing directories if an error occurs.

True This node continues recursing directory contents after the error occurs.
False This node stops recursing directory contents when the error occurs.

Default: False

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

pattern

Pattern for which you want to search the files in the specified directory. Use regular expression special characters to specify the pattern.

Definitions of Special Characters

Special Character Description Examples
. (period) Matches any single character except a newline character. Within square brackets, . is literal.

Input String: Welcome to LabVIEW.

Regular Expression: t....

Match: to La

If you use [z.] as the regular expression, the period is literal and matches either . or z. In this example, [z.] returns . as the match.

* Marks the single preceding character or character class as one that can appear zero or more times in the input. Because an asterisk can mark a pattern as one that appears zero times, regular expressions that include an asterisk can return an empty string if the whole pattern is marked with an asterisk. This quantifier applies to as many characters as possible.

Input String: Hello LabVIEW!

Regular Expression: el*

Match: ell

Expressions such as w* or (welcome)* match an empty string if the node finds no other matches.

+ Marks the single preceding character or character class as one that can appear one or more times in the input. This quantifier applies to as many characters as possible.

Input String: Hello LabVIEW!

Regular Expression: el+

Match: ell

? Marks the single preceding character or character class as one that can appear zero or one time in the input. This quantifier applies to as many characters as possible.

Input String: Hello LabVIEW!

Regular Expression: el?

Match: el

[] Creates a character class, which allows you to match any one of a set of characters that you specify. For example, [abc] matches a, b, or c. This node interprets special characters inside square brackets literally, with the following exceptions:
  • - (dash)—Indicates a range when used between digits, or lowercase or uppercase letters; for example, [0-5], [a-g], or [L-Q].
  • ~—Matches any character, including non-displayable characters, except for the characters or range of characters in brackets. For example, [~0-9] matches any character other than 0 through 9.
  • ^—Matches any displayable character, including the space character, except the characters or range of characters enclosed in the brackets. For example, [^0-9] matches all displayable characters, including the space character, except 0 through 9.

Input String: version=14.0.1

Regular Expression: [0-9]+\.[0-9]+\.[0-9]+

Match: 14.0.1

The expression [0-9] matches any digit. The plus sign matches the previous character class, [0-9], one or more times but as many times as possible. The expression \. matches a literal . character. The plus sign matches the previous character class, [0-9], one or more times but matches as many times as possible. You can use this regular expression to match a three-part version number.

^ If ^ is the first character of the specified search string, it anchors the match to the offset in string. The match fails unless the specified search string matches that portion of string that begins with the character at offset. If ^ is not the first character in the regular expression, it is treated as a regular character.

Input String: Hello LabVIEW!

Regular Expression: ^[^ ]+

Match: Hello

From the beginning of the input string, this regular expression matches as many characters – other than a space character – as possible. You can use this regular expression to isolate the first word, numeral, or other character combination of a string.

$ If $ is the last character of the specified search string, it anchors the match to the last element of string. The match fails unless the specified search string matches up to and including the last character in the string. If $ is not the last character in the regular expression, it is treated as a regular character.

Input String: Hello LabVIEW!

Regular Expression: [^ ]+$

Match: LabVIEW!

From the end of the input string, this regular expression matches as many characters – other than a space character – as possible. You can use this regular expression to isolate the last word, numeral, or other character combination of a string.

\ Cancels the interpretation of any special character in this list. For example, \? matches a question mark, \. matches a period, and \\ matches a backslash. You also can use the following constructions for the following non-displayable characters:
  • \b—Backspace
  • \f—Form feed
  • \n—New line
  • \s—Space
  • \r—Carriage return
  • \t—Tab
  • \xx—Any character, where xx is the hex code using 0 through 9 and upper case A through F.
Input String:
Welcome
to   the LabVIEW Help!

Regular Expression: come\nto\tthe\sLabVIEW\sHelp\21

Match:
come
to   the LabVIEW Help!

The expression come\n matches the literal letters followed by a newline character. The expression to\t matches the literal characters to followed by a tab. The two \s expressions match the spaces between the and LabVIEW and LabVIEW and Help!. The expression \21 matches the exclamation point because 21 is the hexadecimal code for an exclamation point.

spd-note-note
Note  

If you want to include special characters in the search string, you must enclose each special character in brackets. For example, to search for the string hz+, enter hz[+] in the specified search string. Otherwise, the node uses the special character to refine the search.

datatype_icon

folders to exclude

Folder names you want to exclude during the recursion. Any folder you exclude does not appear in the all folders output. This input is case insensitive.

datatype_icon

all folders

A list of all subfolders and shortcuts to folders in the folder input.

datatype_icon

all files in folder

A list of all files in the specified folder path. The list also includes shortcuts to files.

datatype_icon

number of files

Number of files in the all files in folder array.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices


Recently Viewed Topics