with the example I have posted, you should apply the filter to the file name,
not to the array and backup the file immediatly (or write the file name in a data file).

So you haven't to maintain a very big array with all files
but just the array for the current disk you scan.

In your last function, you concatenate files name in a string and then split the string.
Be careful that strings are limited to 32000 characters. With a large tree, you could have problems due to this limitation.

_________________________
Christophe