Task

Walk a given directory tree and print files matching a given pattern.


Note: This task is for recursive methods.   These tasks should read an entire directory tree, not a single directory.


Note: Please be careful when running any code examples found here.



Related task

   Walk a directory/Non-recursively   (read a single directory). 


function find_pfile(string pathname, sequence dirent)
    if match("pfile.e",dirent[D_NAME]) then
--      return pathname&dirent[D_NAME] -- as below
        ?pathname&"\\"&dirent[D_NAME]
    end if
    return 0           -- non-zero terminates scan
end function

?walk_dir("C:\\Program Files (x86)\\Phix",find_pfile,1)
