Compares the specified string against the previously-parsed pattern, and returns True if it matches.
The wildcard object works on strings. It doesn't have anything to do with searching for files in folders, although you can combine it with other things to do that.
For example, you can use FSUtil.ReadDir to get a list of files below a folder, and then use a Wild object to filter those by wildcard.
This works... sad there's no count method on newWild.
Option Explicit
Function OnClick(ByRef clickData)
DOpus.Output " Found matches " & wildExists(clickData,"*.png")
DOpus.Output " Found matches " & wildExists(clickData,"*.not")
end function
Function wildExists(data,spec)
Dim folderEnum, wild, folderItem
Set wild = DOpus.FSUtil.NewWild(spec, "f")
Set folderEnum = DOpus.FSUtil.ReadDir(data.func.sourcetab.path)
wildExists = false
Do While (Not folderEnum.complete)
Set folderItem = folderEnum.Next
If (wild.Match(folderItem.name)) Then
wildExists = true
Exit Do
End If
Loop
End Function