I agree with tbone, and recommend the option of having the script enumerate and filter the files and folders itself, rather than using Find to create a collection.
There's an example here: Scripts (JS & VBS) Snippet: Enumerating files and metadata tags