Skip to content

Glob Filtering#

Some nodes provide an input to filter files or directories using glob patterns like in Dir Walk or Storage Walk.

If the syntax of the pattern is not correct, the node will fail through its
Error output.

Pattern Syntax#

  • * - Matches any sequence of non-separator characters
  • ? - Matches any single non-separator character
  • [ ] - Matches any character within the brackets
  • [^ ] - Negates the character class
  • - - Specifies a range of characters
  • \ - Escapes the next character

Examples#

Pattern Description Matches Does Not Match
* Match all files in a directory file.txt, document.pdf, image.png -
*.txt Match specific file extensions notes.txt, readme.txt document.pdf, image.png
file?.txt Single character wildcard file1.txt, fileA.txt file12.txt, fileABC.txt
*/data/*.csv Files in nested directories project/data/file.csv, archive/data/record.csv project/file.csv
*.log;*.txt Combine multiple patterns server.log, data.txt image.png, notes.docx
file[0-9].txt Character ranges file1.txt, file2.txt, ..., file9.txt file10.txt, fileA.txt
file[^a-z].txt Negate character class file1.txt, file9.txt filea.txt, fileb.txt
file\\?.txt Escaping special characters file?.txt fileA.txt, file1.txt

Combining Patterns with Delimiter#

When using multiple glob patterns, separate them with the ; delimiter. If any of the patterns match, the file or directory will be included in the results.

Example#

  • Pattern: *.log;*.md
  • Matches: server.log, README.md
  • Does Not Match: notes.txt, image.png