hi, how about scandir()? have a look at the attached patch. I measured 7-18% performance gain, compared to the old function. The bigger the directory is, the more improvement we have. greets rupert