This is not a total solution, but you can use the *dirtree utility to walk a directory tree and return a list of files. (The program is self-documented if you list it.) You can then loop through the file list, opening the files and using the FIB() function to determine their type, and go from there.