You could use the tcl glob command which returns a list of all entries found matching a glob pattern. I would use the nocomplain switch so that an empty set would not throw an error.
If you are concerned that a subdirectory might match the pattern, you could then work the list using ‘file isfile’ or ‘file isdirectory’.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.