Wildcard Masking in Inedo prouducts

KB#1119: Last Updated November 14, 2019

Wildcard masks in BuildMaster and Otter are used to include and/or exclude file/directory paths in the context of an operation. Typically, masks are used for file-based operations. The values for the masks are similar to ant-style masks.

Rules

  • A single asterisk (*) represents a matching file name within a specific directory
  • A double asterisk (**) represents a matching file name within a specific directory and all subdirectories

Masking Examples

For the following examples, consider the working directory for a CopyFilesOperation contains the following files:

BigDoc.pdf
Documentation.pdf
WordDoc.docx
WordDoc2.docx
TextFile1.txt
TextFile2.txt
Subdir\SubBigDoc.pdf
Subdir\SubWordDoc.docx
Subdir\SubText.txt
Subdir\SubSubDir\SubSubPdf.pdf
Include Mask Exclude Mask Files Copied Description
**.docx
  • WordDoc.docx
  • WordDoc2.docx
  • Subdir\SubWordDoc.docx
All .docx files recursively.
@(*.docx, *.pdf)
  • BigDoc.pdf
  • Documentation.pdf
  • WordDoc.docx
  • WordDoc2.docx
Only .docx and .pdf files in the root are transferred.
** *.txt
  • BigDoc.pdf
  • Documentation.pdf
  • WordDoc.docx
  • WordDoc2.docx
  • Subdir\SubBigDoc.pdf
  • Subdir\SubWordDoc.docx
  • Subdir\SubText.txt
  • Subdir\SubSubDir\SubSubPdf.pdf
All files except .txt files in the root directory.
** **.txt
  • BigDoc.pdf
  • Documentation.pdf
  • WordDoc.docx
  • WordDoc2.docx
  • Subdir\SubBigDoc.pdf
  • Subdir\SubWordDoc.docx
  • Subdir\SubSubDir\SubSubPdf.pdf
All files except any .txt file.
Subdir\*
  • Subdir\SubBigDoc.pdf
  • Subdir\SubWordDoc.docx
  • Subdir\SubText.txt
Only files in Subdir, but not Subdir/SubSubDir.
Subdir\**
  • Subdir\SubBigDoc.pdf
  • Subdir\SubWordDoc.docx
  • Subdir\SubText.txt
  • Subdir\SubSubDir\SubSubPdf.pdf
All files within Subdir recursively.
** @(**1**, **2**)
  • BigDoc.pdf
  • Documentation.pdf
  • WordDoc.docx
  • Subdir\SubBigDoc.pdf
  • Subdir\SubWordDoc.docx
  • Subdir\SubText.txt
  • Subdir\SubSubDir\SubSubPdf.pdf
All files except files with the numbers 1 or 2 in any part of the path.