>Tks Ed for the tip. BTW, can I get adir() to pick up XX200001.dbf in addition to XX199912.dbf at one pass. Currently, I do two passes and add the second array to the 1st array. Tks
Not without pulling more than just those files - you can use standard wildcarding, and then spin through the resulting array, extracting just the ones you want by copying or deleting the unwanted rows using ADEL() and redimensioning, or use SYS(2000) to do a find first, copying the matching names to a target array and advancing through the list using the added ,1 parameter to do a find next.) Wildcarding in ADIR() is limited to the * and ? conventions; it'd be nice to be able to use a regular expression parser, but it's just not available here.
You could do much the same thing using the Scripting.FileSystemObject to return a Folder object, and then spin through its Files collection.