You should take a look at the UDF Forum, it contains UDFs to read a text file into an array and various DIR UDFs. You could also use WMI to enumerate all directories on a filesystem into a second array, maybe even applying filters, and/or use ASCAN to check for directory names in the arrays.
_________________________
There are two types of vessels, submarines and targets.