>You are right. Just thought somebody out there might like to know because it can still serve a useful purpose. In my particular situation, it's fast and useful because I'm only interested in file deletion. I'm scanning folders with thousands of files in them and offering to delete all files older than X days, plus give an idea of approximately how many files are older than those X days. So I need the file dates as well as the file names. For me Adir() is handy for that. If adir()is exceeded, the routine just does a deletion run and doesn't worry about it because invariably most of the files are old enough to get zapped anyway. Next time around, it'll get the rest.
Good thinking - but if you're getting close to 13000 files in a single directory, there's something larger that's wrong there, namely the thing which leaves all those files there. If it's so by design, then, well, you may just run this a bit more often.